OFFSET
1,1
COMMENTS
Subsequence of A188546.
Numbers n which generate 4 primes under the first four iterations of the map n-> A002731(n).
Among first 10000 terms, there are 1072 primes, the first a(3) = 169219 and the last a(10000) = 16541600731. - Zak Seidov, Jan 16 2019
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000, replacing an earlier file from Zak Seidov
MATHEMATICA
s={}; Do[If[PrimeQ[m=(n^2+1)/2] && PrimeQ[p=(m^2+1)/2] && PrimeQ[q=(p^2+1)/2] && PrimeQ[r=(q^2+1)/2], AppendTo[s, n]], {n, 1, 10000000, 2}]; s
PROG
(PARI) v=vector(10^4); i=0; forstep(n=1, 9e99, 2, if(isprime(m=(n^2+1)/2) && isprime(p=(m^2+1)/2) && isprime(q=(p^2+1)/2) && isprime(r=(q^2+1)/2), v[i++]=n; if(i==#v, return))) \\ Charles R Greathouse IV, Apr 12 2011
(Magma) r:=func< k | (k^2+1) div 2 >; [ n: n in [1..1000000 by 2] | IsPrime(r(n)) and IsPrime(r(r(n))) and IsPrime(r(r(r(n))))and IsPrime(r(r(r(r(n)))))]; // Vincenzo Librandi, Jan 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 03 2011
STATUS
approved