0

If we have a natural $n$ (not $0$), and a prime $p$, is it possible to calculate

$$a^{n i} \mod p$$

where $i$ is the imaginary number $\sqrt{-1}$?

SOME THOUGHTS

Knowing that $a^{i \cdot i} = a^{-1}$ may help. Also, modulo a prime $p$, we of course have $e^{2 i \pi/(p-1)}$, and all integer multiples of that power.

Matt Groff
  • 6,117
  • 1
    If $p\equiv1\pmod4$ and $a\equiv1\pmod p$, then we could treat $i$ as a $p$-adic integer and use $p$-adic exponentiation, and get to define $a^{ni}$ modulo any higher power of $p$ (or as a $p$-adic number). I doubt that's useful for your purposes (unless you tell us differently). But IMHO it would be a better fit here than the usual complex exponentiation, because the latter takes you outside any domain, where you can reduce modulo powers of $p$ (see @RobertIsrael's answer). – Jyrki Lahtonen Apr 28 '14 at 04:23

1 Answers1

2

Don't ask if it's possible to calculate, ask what the result could possibly mean. "$\ldots \mod p$" implies membership in the field of integers mod $p$, or at least some vector space over that field. Your $a^{ni}$ exists in the complex numbers, the wrong field entirely.

Robert Israel
  • 448,999
  • If we have complexes modulo $p$, would this change things? In other words, if we take a number $a + b \cdot i$ and represent it as $a \mod p$ and $b \mod p$, would this help? – Matt Groff Apr 27 '14 at 20:22
  • If you make a new definition of "mod $p$" that has meaning for complex numbers, then in that context $a^{ni} \mod p$ might make sense. – Robert Israel Apr 27 '14 at 20:28
  • I'd like to explore that. I can't seem to remember or figure out how to split something like $3^i$ into real and complex parts. Would I just split it up into $r \cdot e^{2 i \pi*m}$, for appropriate $r$ and $m$? – Matt Groff Apr 27 '14 at 20:32
  • 1
    By definition, for $a\ne 0$ and complex $b$, $a^b = e^{b \ln a}$, so $3^i = e^{i \ln 3} = \cos(\ln 3) + i \sin(\ln 3)$. – Robert Israel Apr 28 '14 at 04:03