The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A253264 Primes p such that q = p^2 - 2, r = q^2 - 2, s = r^2 - 2 and t = s^2 - 2 are all prime. 2
 2, 1644103, 3892831, 5178193, 5497949, 5657699, 11078437, 13379917, 14471147, 14890693, 19861879, 25219343, 27671803, 28012511, 29878997, 31848277, 32550769, 34190399, 40630441, 42081719, 47187919, 53964661, 54795553, 55912781, 59327927, 64749281, 68818993 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Subsequence of A257552, A257551 and A062326. LINKS Chai Wah Wu, Table of n, a(n) for n = 1..1000 MATHEMATICA Select[Prime@Range@6000000, PrimeQ[#^2 - 2] && PrimeQ[#^4 - 4 #^2 + 2] && PrimeQ[#^8 - 8 #^6 + 20 #^4 - 16 #^2 + 2] && PrimeQ[(#^8 - 8 #^6 + 20 #^4 - 16 #^2 + 2)^2 - 2] &] (* Vincenzo Librandi, May 01 2015 *) apQ[p_]:=Module[{q=p^2-2, r, s}, r=q^2-2; s=r^2-2; AllTrue[ {q, r, s, s^2-2}, PrimeQ]]; Select[Prime[Range[4053000]], apQ] (* Harvey P. Dale, Mar 27 2022 *) PROG (Magma) [p: p in PrimesUpTo(2*10^7) | IsPrime(p^2-2) and IsPrime(p^4-4*p^2+2) and IsPrime(p^8-8*p^6+20*p^4-16*p^2+2) and IsPrime((p^8-8*p^6+20*p^4-16*p^2+2)^2-2)]; // Vincenzo Librandi, May 01 2015 (Python) from gmpy2 import is_prime, next_prime A253264_list, p = [], 2 for _ in range(10**10): ....q = p**2 - 2 ....if is_prime(q): ........r = q**2 -2 ........if is_prime(r): ............s = r**2-2 ............if is_prime(s) and is_prime(s**2-2): ................A253264_list.append(p) ....p = next_prime(p) # Chai Wah Wu, May 02 2015 (Perl) use Math::GMP ":constant"; use ntheory ":all"; my(\$q, \$r, \$s, \$t); forprimes { say if is_prime(\$q=\$_**2-2) && is_prime(\$r=\$q**2-2) && is_prime(\$s=\$r**2-2) && is_prime(\$t=\$s**2-2); } 1e12; # Dana Jacobsen, May 02 2015 CROSSREFS Cf. A062326, A257551, A257552. Sequence in context: A218169 A168535 A303433 * A124368 A272238 A303255 Adjacent sequences: A253261 A253262 A253263 * A253265 A253266 A253267 KEYWORD nonn,changed AUTHOR Zak Seidov, Apr 30 2015 EXTENSIONS First term and additional terms added from Vincenzo Librandi, May 01 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 29 09:18 EDT 2023. Contains 361598 sequences. (Running on oeis4.)