View Single Post
Old 2015-09-06, 19:32   #15
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by T.Rex View Post
About proving the sufficiency, I think that an issue (as I already said) is that s can be equal to sn before i==n-1 .
Finding s(n-1)==sn only after n-1 iterations and not before is important I think.
I think that it is important to add a check s!=sn after the computation of s from i=1,n-2 .
if it loops multiple times it should in theory loop at multiples of a divisor of n-2 if it's going to have the final result match, but of course that would mean n = all multiples of that divisor +2, should give prime N.
science_man_88 is offline   Reply With Quote