OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
53 is in the sequence because it is prime, nextprime(53) = 59 and (53+59)/2 = 56 = 8*7, an oblong number.
MATHEMATICA
f[n_] := NextPrime[n*(n + 1), -1] ; f /@ Select[Range[200], (ob = #*(# + 1)) == (NextPrime[ob, -1] + NextPrime[ob])/2 &] (* Amiram Eldar, May 06 2020 *)
Select[Partition[Prime[Range[4000]], 2, 1], OddQ[Sqrt[1+4*Mean[#]]]&][[All, 1]] (* Harvey P. Dale, Oct 25 2020 *)
PROG
(PARI){for(i=3, 10^5, if(isprime(i), k=(i+nextprime(i+1))/4; if(issquare(8*k+1), print1(i, ", "))))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Antonio Roldán, May 12 2014
STATUS
approved