OFFSET
1,1
COMMENTS
Except a(1), all numbers are congruent to 1 mod 10 or 9 mod 10.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
11 is prime and equals 4^2-4-1, and 11^2-11-1 = 109 is prime. So, 11 is a member of this sequence.
MATHEMATICA
Select[Table[n^2-n-1, {n, 500}], AllTrue[{#, #^2-#-1}, PrimeQ]&] (* Harvey P. Dale, Feb 27 2023 *)
PROG
(Python)
import sympy
from sympy import isprime
{print(n**2-n-1) for n in range(10**3) if isprime(n**2-n-1) and isprime((n**2-n-1)**2-(n**2-n-1)-1)}
(PARI)
s=[]; for(n=1, 1000, p=n^2-n-1; if(isprime(p) && isprime(p^2-p-1), s=concat(s, p))); s \\ Colin Barker, Feb 11 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 10 2014
STATUS
approved