OFFSET
1,1
COMMENTS
All numbers are congruent to 1 mod 10.
EXAMPLE
1451 is prime and f(f(1451)) = 387147304469214558406348338836395337085545589397781 is prime. Thus, 1451 is a member of this sequence.
PROG
(Python)
import sympy
from sympy import isprime
{print(n) for n in range(10**5) if isprime(n) and isprime((n**4+n**3+n**2+n+1)**4+(n**4+n**3+n**2+n+1)**3+(n**4+n**3+n**2+n+1)**2+(n**4+n**3+n**2+n+1)+1)}
(PARI) f(x)=x^4+x^3+x^2+x+1; forprime(p=1, 35000, ispseudoprime(f(f(p)))&&print1(p", ")) \\ M. F. Hasler, Feb 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 08 2014
STATUS
approved