Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Apr 20 2022 00:07:50
%S 11,31,71,131,151,181,191,271,311,331,401,521,571,641,691,821,971,
%T 1061,1171,1321,1361,1471,1621,1721,1741,1801,1901,2111,2281,2341,
%U 2351,2381,2441,2551,2731,2791,3001,3191,3221,3331,3391,3491,3541,3671,4271,4451,4561,4651,5351,5431,5441,5521,5641
%N Primes p such that (p^2+3*p+1)/5 is prime.
%C All terms == 1 (mod 10). Also if p is a term, (p^2+3*p+1)/5 == 1 (mod 10).
%H Robert Israel, <a href="/A352954/b352954.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3) = 71 is a term because it is prime and (71^2+3*71+1)/5 = 1051 is prime.
%p select(t -> isprime(t) and isprime((t^2+3*t+1)/5), [seq(i,i=1..30000,10)]);
%t Select[Prime[Range[800]], PrimeQ[(#^2 + 3*# + 1)/5] &] (* _Amiram Eldar_, Apr 11 2022 *)
%o (Python)
%o from sympy import isprime
%o def ok(n): return n%10 == 1 and isprime(n) and isprime((n**2+3*n+1)//5)
%o print([k for k in range(1, 5000, 10) if ok(k)]) # _Michael S. Branicky_, Apr 11 2022
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Apr 10 2022