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!)
A298463 The first of two consecutive pentagonal numbers the sum of which is equal to the sum of two consecutive primes. 5
70, 3577, 10795, 36895, 55777, 70525, 78547, 125137, 178365, 208507, 258130, 329707, 349692, 394497, 438751, 468442, 478555, 499105, 619852, 663005, 753667, 827702, 877455, 900550, 1025480, 1085876, 1169092, 1201090, 1211852, 1233520, 1339065, 1508512 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
70 is in the sequence because 70+92 (consecutive pentagonal numbers) = 162 = 79+83 (consecutive primes).
MATHEMATICA
Select[Partition[PolygonalNumber[5, Range[1500]], 2, 1], CompositeQ[Total[#]/2]&&Total[#] == NextPrime[ Total[#]/2]+NextPrime[Total[#]/2, -1]&][[;; , 1]] (* Harvey P. Dale, Jan 20 2024 *)
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, (3*u^2-u)/2))); Vec(L)
(Python)
from __future__ import division
from sympy import prevprime, nextprime
A298463_list, n, m = [], 1 , 6
while len(A298463_list) < 10000:
k = prevprime(m//2)
if k + nextprime(k) == m:
A298463_list.append(n*(3*n-1)//2)
n += 1
m += 6*n-1 # Chai Wah Wu, Jan 20 2018
CROSSREFS
Sequence in context: A089274 A266739 A227273 * A275295 A306984 A292986
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 April 24 11:01 EDT 2024. Contains 371936 sequences. (Running on oeis4.)