View Single Post
Old 2007-05-28, 02:38   #29
Citrix's Avatar
Jun 2003

2×787 Posts

I don't think this is the problem.

Assume that p-1%720=20

Then I want to look at ar[10-1], since the values in the array are 2,4,6,8... ie they start at 2. So the ar[9]=20.

Is there anything else that could be going wrong? Are you sure returning j=0 causes the prime to be skipped.

edit: By the way when you do gcd(p-1,N), N does not have to have any factors as powers of 2. Powers of 2 can be calculated by looking at the number of zero bits in the end of p-1.

Last fiddled with by Citrix on 2007-05-28 at 03:17
Citrix is offline   Reply With Quote