login
A023347
Primes which remain prime through 5 iterations of function f(x) = 8x + 1.
3
831167, 1154567, 2502767, 3019787, 3675197, 5056577, 6352487, 14519177, 26724377, 43003577, 47378927, 47695607, 56406197, 86332457, 86611757, 99568757, 121967987, 126435527, 127990997, 128149127, 128975057, 145281557, 155715407
OFFSET
1,1
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 *)
KEYWORD
nonn
STATUS
approved