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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257552 Primes p such that q = p^2 - 2, r = q^2 - 2 and s = r^2 - 2 are also prime. 3
2, 3, 3299, 6323, 9127, 9697, 26357, 27061, 27809, 77513, 83299, 83641, 87701, 99721, 117307, 152123, 197969, 202987, 243461, 248179, 249397, 262121, 285721, 285823, 351217, 379273, 388009, 397763, 436477, 502063, 523777, 531263, 541661, 583501, 651881 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Are there primes p > 2 such that t = s^2 - 2 is also prime?
t = s^2 - 2 is prime for p = 1644103, 3892831, 5178193, 5497949, 5657699, ... - Chai Wah Wu, Apr 30 2015
LINKS
EXAMPLE
3 is in the sequence because 3^2 - 2 = 7, 7^2 - 2 = 47 and 47^2 - 2 = 2207 are all primes.
5 is not in the sequence, because, although 5^2 - 2 = 23 is prime, 23^2 - 2 = 527 = 17 * 31.
MATHEMATICA
Select[Prime@ Range@ 100000, PrimeQ[#^2 - 2] && PrimeQ[Nest[#^2 - 2 &, #, 2]] && PrimeQ[Nest[#^2 - 2 &, #, 3]] &] (* Michael De Vlieger, Apr 29 2015 *)
Select[Prime@Range@60000, PrimeQ[#^2 - 2] && PrimeQ[#^4 - 4 #^2 + 2] && PrimeQ[#^8 - 8 #^6 + 20 #^4 - 16 #^2 + 2] &] (* Vincenzo Librandi, Apr 30 2015 *)
Select[Prime[Range[10^4]], Union[PrimeQ[{#^2 - 2, #^4 - 4#^2 + 2, #^8 - 8#^6 + 20#^4 - 16#^2 + 2}]] == {True} &] (* Alonso del Arte, May 01 2015 *)
PROG
(Magma) [p: p in PrimesUpTo(1500000)| IsPrime(p^4-4*p^2+2)and IsPrime(p^2-2)and IsPrime(p^8-8*p^6+20*p^4-16*p^2+2)]; // Vincenzo Librandi, Apr 30 2015
(Python)
from gmpy2 import is_prime, next_prime
A257552_list, p = [], 2
for _ in range(10**9):
....q = p**2 - 2
....if is_prime(q):
........r = q**2 -2
........if is_prime(r):
............s = r**2-2
............if is_prime(s):
................A257552_list.append(p)
....p = next_prime(p) # Chai Wah Wu, Apr 30 2015
(Perl) use Math::GMP ":constant"; use ntheory ":all"; my($q, $r, $s); forprimes { say if is_prime($q=$_**2-2) && is_prime($r=$q**2-2) && is_prime($s=$r**2-2); } 1e9; # Dana Jacobsen, May 02 2015
CROSSREFS
Subsequence of A257551 and A062326.
Cf. A253264.
Sequence in context: A185156 A235935 A182383 * A038104 A290972 A097301
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 29 2015
EXTENSIONS
More terms from Vincenzo Librandi, Apr 30 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)