login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes p such that f(f(p)) is prime where f(x) = x^8 + 1.
0

%I #12 Dec 17 2022 15:20:20

%S 7,59,163,929,977,1373,1549,1619,1913,2113,2593,4397,5417,5651,6397,

%T 6659,6833,7351,7793,7883,8641,9719,10091,10477,10949,11243,12239,

%U 13441,13457,13691,14753,15349,15467,15971,17747,19051

%N Primes p such that f(f(p)) is prime where f(x) = x^8 + 1.

%F a(n) = (A235983(n)-1)^(1/8).

%e 1619 is prime and (1619^8+1)^8+1 is also prime.

%t Select[Prime[Range[2500]],PrimeQ[(#^8+1)^8+1]&] (* _Harvey P. Dale_, Dec 17 2022 *)

%o (Python)

%o import sympy

%o from sympy import isprime

%o {print(p) for p in range(10**5) if isprime(p) and isprime((p**8+1)**8+1)}

%o (PARI) isok(p) = isprime(p) && (q = p^8+1) && isprime(q^8+1); \\ _Michel Marcus_, Jan 19 2014

%Y Cf. A235983.

%K nonn

%O 1,1

%A _Michel Marcus_ and _Derek Orr_, Jan 19 2014