OFFSET
1,1
COMMENTS
All odd numbers less than 3,000,000 have been checked and it appears that most primes of the form 8N +/- 3 (e.g. 3,5,11,13,19,37 ...) meet the test with some exceptions, (e.g. 29) and no primes of the form 8N +/-1 or composites meet the test.
MATHEMATICA
f=Compile[{{Co, _Integer}, {S0, _Integer}, {S1, _Integer}, {Caa, _Integer}}, Module[{xCo=Co, xS0=S0, xS1=S1, Temp}, While[Temp=Mod[6 xS1-xS0-6, Caa]; xCo>0 && Temp>0, xS0=xS1; xS1=Temp; xCo--]; xCo]]; Caa=5; Reap[While[Caa<1000, Co=(Caa-3)/2; S0=2; S1=3; If[f[Co, S0, S1, Caa] == 1, Sow[Caa]]; Caa+=2]] (* prime 3 skipped to simplify code. The above code, provided by Bill Simpson, is 20 times faster than my original code. Note that it also appears possible to increase speed by a factor of 10 by not searching numbers of the form 8n+/-1 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Kenneth J Ramsey, Feb 16 2012
STATUS
approved