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
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 10 2022
STATUS
approved