OFFSET
1,1
COMMENTS
All numbers are congruent to 1 mod 10, 5 mod 10, or 9 mod 10.
FORMULA
EXAMPLE
5 = 3^2-3-1 (3 is prime) and 5^2-5-1 = 19 is also prime. So, 5 is a member of this sequence.
PROG
(Python)
import sympy
from sympy import isprime
{print(n**2-n-1) for n in range(10**4) if isprime(n) and isprime((n**2-n-1)**2-(n**2-n-1)-1)}
(PARI) s=[]; forprime(p=2, 40000, n=p^2-p-1; if(isprime(n^2-n-1), s=concat(s, n))); s \\ Colin Barker, Feb 10 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 09 2014
STATUS
approved