OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
19380 is a term since 19380-1 = 19379, 19380+1 = 19381, 19380^2+1 = 375584401, 19380^4+1 = 141063641523360001 and 19380^8+1 = 19898950959831015581425689600000001 are primes.
MATHEMATICA
Do[p = Prime[n] + 1; If[ PrimeQ[p + 1] && PrimeQ[1 + p^2] && PrimeQ[1 + p^4] && PrimeQ[1 + p^8], Print[p]], {n, 1, 115000000}]
Select[Range[2665*10^5], AllTrue[{#-1, #+1, #^2+1, #^4+1, #^8+1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 03 2019 *)
PROG
(PARI) is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1) && isprime(k^4+1) && isprime(k^8+1); \\ Amiram Eldar, Jun 26 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 23 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 04 2002
STATUS
approved