This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A237641 #11 May 22 2025 10:21:36 %S A237641 5,236681,380071,457651,563249,1441199,1660231,2491661,3050261, %T A237641 4106701,5137021,5146091,5329171,10617821,15574861,19860391,20852921, %U A237641 21349019,21497131,23025601,24507449,32495699,36342811,48867089,51129649,59082281 %N A237641 Primes p of the form n^2-n-1 (for prime n) such that p^2-p-1 is also prime. %C A237641 Except a(1), all numbers are congruent to 1 mod 10 or 9 mod 10. %C A237641 These are the primes in the sequence A237527. %e A237641 5 = 3^2-3^1-1 (3 is prime) and 5^2-5-1 = 19 is prime. Since 5 is prime too, 5 is a member of this sequence. %t A237641 Select[Table[n^2-n-1,{n,Prime[Range[1000]]}],AllTrue[{#,#^2-#-1},PrimeQ]&] (* _Harvey P. Dale_, Aug 14 2024 *) %o A237641 (Python) %o A237641 import sympy %o A237641 from sympy import isprime %o A237641 def poly2(x): %o A237641 if isprime(x): %o A237641 f = x**2-x-1 %o A237641 if isprime(f**2-f-1): %o A237641 return True %o A237641 return False %o A237641 x = 1 %o A237641 while x < 10**5: %o A237641 if poly2(x): %o A237641 if isprime(x**2-x-1): %o A237641 print(x**2-x-1) %o A237641 x += 1 %o A237641 (PARI) %o A237641 s=[]; forprime(n=2, 40000, p=n^2-n-1; if(isprime(p) && isprime(p^2-p-1), s=concat(s, p))); s \\ _Colin Barker_, Feb 11 2014 %Y A237641 Cf. A237527, A091567, A091568. %K A237641 nonn %O A237641 1,1 %A A237641 _Derek Orr_, Feb 10 2014