login
A352954
Primes p such that (p^2+3*p+1)/5 is prime.
2
11, 31, 71, 131, 151, 181, 191, 271, 311, 331, 401, 521, 571, 641, 691, 821, 971, 1061, 1171, 1321, 1361, 1471, 1621, 1721, 1741, 1801, 1901, 2111, 2281, 2341, 2351, 2381, 2441, 2551, 2731, 2791, 3001, 3191, 3221, 3331, 3391, 3491, 3541, 3671, 4271, 4451, 4561, 4651, 5351, 5431, 5441, 5521, 5641
OFFSET
1,1
COMMENTS
All terms == 1 (mod 10). Also if p is a term, (p^2+3*p+1)/5 == 1 (mod 10).
LINKS
EXAMPLE
a(3) = 71 is a term because it is prime and (71^2+3*71+1)/5 = 1051 is prime.
MAPLE
select(t -> isprime(t) and isprime((t^2+3*t+1)/5), [seq(i, i=1..30000, 10)]);
MATHEMATICA
Select[Prime[Range[800]], PrimeQ[(#^2 + 3*# + 1)/5] &] (* Amiram Eldar, Apr 11 2022 *)
PROG
(Python)
from sympy import isprime
def ok(n): return n%10 == 1 and isprime(n) and isprime((n**2+3*n+1)//5)
print([k for k in range(1, 5000, 10) if ok(k)]) # Michael S. Branicky, Apr 11 2022
CROSSREFS
Sequence in context: A090233 A139836 A085715 * A040973 A141884 A139634
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 10 2022
STATUS
approved