Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Oct 31 2024 16:26:16
%S 5,7,17,43,61,73,241,739,1297,4211,98519
%N Primes p such that (2^p+p^2)/3 is prime.
%C Intersection with A242929 (primes p such that 2^p-p^2 is prime) includes 5, 7 and 17. Any others?
%C a(12) > 4*10^5. - _Michael S. Branicky_, Oct 31 2024
%e a(3) = 17 is a term because (2^17+17^2)/3 = 43787 is prime.
%p filter:= proc(p) isprime(p) and isprime((2^p+p^2)/3) end proc:
%p select(filter, [seq(i,i=5..10000,2)]);
%t Select[Prime[Range[600]], PrimeQ[(2^# + #^2)/3] &] (* _Amiram Eldar_, Jun 23 2022 *)
%o (PARI) isok(p) = if (isprime(p), my(q=(2^p+p^2)/3); (denominator(q)==1) && ispseudoprime(q)); \\ _Michel Marcus_, Jun 23 2022
%o (Python)
%o from itertools import islice
%o from sympy import isprime, nextprime
%o def agen():
%o p = 2
%o while True:
%o t = 2**p+p**2
%o if t%3 == 0 and isprime(t//3):
%o yield p
%o p = nextprime(p)
%o print(list(islice(agen(), 10))) # _Michael S. Branicky_, Jun 23 2022
%Y Cf. A242929.
%K nonn,more
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Jun 23 2022
%E a(11) from _Daniel Suteu_, Jun 25 2022