Max Alekseyev on Wed, 12 Jan 2011 05:50:26 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Roots of unity modulo a prime power


On Tue, Jan 11, 2011 at 11:18 PM, Kevin Acres
<research@research-systems.com> wrote:

> For example for prime p I am trying to derive the solutions for x for:
>
> Â Â Â Âx^(p-1) % p^2 = 1
>
> I'd be grateful for any help on this.

{ myroots(p) = local(g); g=znprimroot(p^2)^p; vector(p-1,i,lift(g^i)) }

should do the trick.

Regards,
Max