OFFSET
1,1
COMMENTS
Primes p such that, if q is the next prime, 1+4*(p+q)/3 is a square.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 29 is a term because 29 is prime, the next prime is 31, and (29+31)/6 = 10 is a triangular number.
MAPLE
P:= select(isprime, [seq(i, i=3..10^5, 2)]):
S:= (P[1..-2]+P[2..-1])/3:
P[select(i -> S[i]::integer and issqr(1+4*S[i]), [$1..nops(S)])];
MATHEMATICA
Select[Partition[Prime[Range[5000]], 2, 1], IntegerQ[Sqrt[4*Total[#]/3 + 1]] &][[;; , 1]] (* Amiram Eldar, Aug 03 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 02 2022
STATUS
approved