OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
79 is in the sequence because 79+83 (consecutive primes) = 162 = 70+92 (consecutive pentagonal numbers).
MATHEMATICA
Block[{s = Total /@ Partition[PolygonalNumber[5, Range[10^3]], 2, 1], t}, t = Partition[Prime@ Range@ PrimePi[2 Last[s]], 2, 1]; Select[t, MemberQ[s, Total@ #] &][[All, 1]]] (* Michael De Vlieger, Jan 21 2018 *)
PROG
(PARI) L=List(); forprime(p=2, 1600000, q=nextprime(p+1); t=p+q; if(issquare(12*t-8, &sq) && (sq-2)%6==0, u=(sq-2)\6; listput(L, p))); Vec(L)
(Python)
from __future__ import division
from sympy import prevprime, nextprime
A298464_list, n, m = [], 1 , 6
while len(A298464_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298464_list.append(k)
n += 1
m += 6*n-1 # Chai Wah Wu, Jan 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Jan 19 2018
STATUS
approved