login
Primes p such that f(f(p)) is prime, where f(x) = x^5-x^4-x^3-x^2-x-1.
0

%I #13 Jun 26 2020 05:32:35

%S 3,13,61,103,193,199,307,431,569,977,1201,1451,1481,1609,1669,1889,

%T 2371,2381,2711,2819,3083,3469,4289,4337,4567,5231,5501,6733,7043,

%U 7253,7351,7549,8707,9257,9497,10039,10687,11491,12227,12517,12941,13397

%N Primes p such that f(f(p)) is prime, where f(x) = x^5-x^4-x^3-x^2-x-1.

%e 3 is prime. 3^5-3^4-3^3-3^2-3-1 = 122 and 122^5-122^4-122^3-122^2-122-1 = 26803717321 is a prime number. Thus, 3 is a member of this sequence.

%o (Python)

%o import sympy

%o from sympy import isprime, primerange

%o def f(x):

%o return x**5-x**4-x**3-x**2-x-1

%o [p for p in primerange(2, 10**5) if isprime(f(f(p)))]

%Y Cf. A125083, A237640.

%K nonn

%O 1,1

%A _Derek Orr_, Feb 26 2014