1

I run this simple query:

for(x=1,10, p=prime(x);a=Mod(100, p);print(a);print(znorder(a)))

This gives me:

Mod(0, 2)
  ***   at top-level: ...od(100,p);print(a);print(znorder(a));)
  ***                                             ^-------------
  *** znorder: not an element of (Z/nZ)* in order.
  ***   Break loop: type 'break' to go back to GP

Replacing p by 3 run normally. What am I doing wrong?

LeeNeverGup
  • 1,096
  • 8
  • 23

1 Answers1

1

I found it. The problem was where p divides 100, and then it's order is undefined.

LeeNeverGup
  • 1,096
  • 8
  • 23