I don't think this is the problem.
Assume that p1%720=20
Then I want to look at ar[101], 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(p1,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 p1.
Last fiddled with by Citrix on 20070528 at 03:17
