A230026 Primes p such that f(f(p)) is prime, where f(n) = n^2-n-1 = A165900(n).
3, 13, 23, 53, 59, 83, 107, 167, 173, 179, 211, 223, 229, 257, 317, 349, 367, 431, 443, 487, 503, 509, 541, 571, 613, 617, 673, 677, 683, 751, 823, 1021, 1031, 1093, 1103, 1109, 1123, 1201, 1231, 1289, 1301, 1319, 1361, 1373, 1427, 1451
Offset: 1
Keywords
Examples
3 is prime and (3^2-3-1)^2-(3^2-3-1)-1 = 19 is also prime. So, 3 is a member of this sequence.
Programs
-
Python
import sympy from sympy import isprime def f(x): return x**2-x-1 {p for p in range(10**4) if isprime(p) and isprime(f(f(p)))}
-
Sage
f = lambda x: x^2-x-1 [p for p in primes(1452) if is_prime(f(f(p)))] # Peter Luschny, Mar 02 2014
Comments