login
A355188
Primes p such that (2^p+p^2)/3 is prime.
0
5, 7, 17, 43, 61, 73, 241, 739, 1297, 4211, 98519
OFFSET
1,1
COMMENTS
Intersection with A242929 (primes p such that 2^p-p^2 is prime) includes 5, 7 and 17. Any others?
a(12) > 4*10^5. - Michael S. Branicky, Oct 31 2024
EXAMPLE
a(3) = 17 is a term because (2^17+17^2)/3 = 43787 is prime.
MAPLE
filter:= proc(p) isprime(p) and isprime((2^p+p^2)/3) end proc:
select(filter, [seq(i, i=5..10000, 2)]);
MATHEMATICA
Select[Prime[Range[600]], PrimeQ[(2^# + #^2)/3] &] (* Amiram Eldar, Jun 23 2022 *)
PROG
(PARI) isok(p) = if (isprime(p), my(q=(2^p+p^2)/3); (denominator(q)==1) && ispseudoprime(q)); \\ Michel Marcus, Jun 23 2022
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen():
p = 2
while True:
t = 2**p+p**2
if t%3 == 0 and isprime(t//3):
yield p
p = nextprime(p)
print(list(islice(agen(), 10))) # Michael S. Branicky, Jun 23 2022
CROSSREFS
Cf. A242929.
Sequence in context: A113282 A323200 A096741 * A106955 A030785 A019404
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Jun 23 2022
EXTENSIONS
a(11) from Daniel Suteu, Jun 25 2022
STATUS
approved