login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298464 The first of two consecutive primes the sum of which is equal to the sum of two consecutive pentagonal numbers. 5
79, 3643, 10909, 37123, 56053, 70849, 78889, 125551, 178877, 209063, 258743, 330409, 350411, 395261, 439559, 469279, 479387, 499969, 620813, 663997, 754723, 828811, 878597, 901709, 1026709, 1087147, 1170397, 1202429, 1213189, 1234873, 1340477, 1510013 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A205496 A017795 A017742 * A078114 A038531 A032910
KEYWORD
nonn
AUTHOR
Colin Barker, Jan 19 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 23:08 EDT 2024. Contains 372341 sequences. (Running on oeis4.)