OFFSET
1,1
LINKS
John Cerkan, Table of n, a(n) for n = 1..10000
FORMULA
{p, 8p+1, 64p+9, 512p+73, 4096p+585, 32768p+4681} are all primes, where the initial p is prime.
a(n) == 197 (mod 210). - John Cerkan, Nov 04 2016
EXAMPLE
First chain is {831167, 6649337, 53194697, 425557577, 3404460617, 27235684937};
If p is congruent to {1,3,7,9} mod 10, then consecutive iterates are congruent to {9,5,7,3}, {3,1,7,5}, {5,9,7,1} respectively; so only 10k+7 may remain prime through five iterations, as sequence demonstrates nicely. - Labos Elemer, Jul 23 2003
MATHEMATICA
k=0; m=8; Do[s=Prime[n]; s1=m*s+1; s2=m*s1+1; s3=m*s2+1; s4=m*s3+1; s5=m*s4+1; If[PrimeQ[s]&&PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3] &&primeQ[s4]&&PrimeQ[s5], k=k+1; Print[{k, n, s, s1, s2, s3, s4, s5}]], {n, 1, 1000000}]
it5Q[n_]:=AllTrue[Rest[NestList[8#+1&, n, 5]], PrimeQ]; Select[Prime[Range[ 9*10^6]], it5Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 12 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved