My question relates to square roots of unity modulo N, ie $r^2 = 1 \mod N$.
I have an efficient algorithm for obtaining these for arbitrary $N$. But for a given $N$ what I really want is to obtain the roots for all $N_f = \frac {N^2}{f^2}$ for all $f|N$.
My question is simply this - can these all be deduced from the square roots of unity mod $N$? Or do I need multiple invocations of my root finder?
|
|
|||||
|
|
If $N$ is odd, then every root of unity modulo $N^2 / f^2$ is equivalent (modulo $N^2 / f^2$) to a root of unity modulo $N^2$. This can be seen by observing there are two roots of unity modulo any $p^k$, and each contributes a factor of 2 to the number of roots. (So no roots of unity are "lost" when passing from $N^2 / f^2$ to $N^2$) The even case is, well odd. IIRC, there are four roots of unity modulo $2^k$ for $k > 2$. Two of them: $1$ and $-1$ are persistent as $k$ grows. The other two are always $\pm 1 + 2^{k-1}$, which cannot extend to roots of unity modulo $2^{k+1}$. However, it's probably easier to organize your program to work one prime at a time then CRT, in which case you don't have to worry about the fact $2$ is weird. |
|||||||||||
|
|
You'll get a set of square roots of 1 modulo $p^n$ for each prime $p$ such that $p^n$ is the highest power of $p$ dividing $N$, combine them by the chinese remainder theorem to get the full set. |
|||
|