Quote:
Originally Posted by LiquidNitrogen
I'm not sure I follow. Here is what I did.
1. Proving p = 2^n  1 is prime for n = 5, p = 31.
2. S(0) = 4 {defined}
3. Need to generate up to S(n2) where S(x+1) = [S(x) * S(x)]  2
3a. S(1) = 4^2  2 = 14
3b. S(2) = 14^2  2 = 194
3c. S(3) = 194^2  2 = 37634
4. Test S(n2)/p = S(3)/p = 37634/31. If remainder is 0, p is prime.
37634/31 = 1214.0 so p is prime.
What would this involve doing it the way you mentioned?

3. Need to generate up to S(n2) where S(x+1) = {[S(x) * S(x)]  2} mod p