A352604 Primes p such that p^2+3*p+1 and p^2+p-1 are also prime.
2, 3, 5, 19, 53, 59, 163, 263, 349, 373, 419, 449, 499, 1013, 1093, 1259, 1303, 1423, 1489, 1493, 1669, 1759, 2069, 2729, 2879, 3463, 3943, 4159, 4243, 4283, 4493, 4603, 4793, 4969, 5113, 5303, 5563, 6323, 6599, 6803, 6829, 6883, 7369, 7523, 7529, 7963, 8039, 8713, 8969, 9043, 9173, 9293, 9623
Offset: 1
Keywords
Examples
a(3) = 5 is a term because 5, 5^2+3*5+1 = 41 and 5^2+5-1 = 29 are all prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
select(t -> isprime(t^2+3*t+1) and isprime(t^2+t-1), [seq(ithprime(i),i=1..10000)]);
-
Python
from itertools import islice from sympy import isprime, nextprime def agen(): p = 2 while True: if isprime(p**2 + 3*p + 1) and isprime(p**2 + p - 1): yield p p = nextprime(p) print(list(islice(agen(), 53))) # Michael S. Branicky, Mar 22 2022
Comments