The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A298312 The first of three consecutive octagonal numbers the sum of which is equal to the sum of three consecutive primes. 2
12160, 74576, 158240, 181056, 269400, 371008, 601216, 606600, 848008, 980408, 1242920, 2075008, 3292816, 3680776, 4477408, 4685000, 5627960, 7505008, 8263480, 9289280, 10397408, 10419760, 10735208, 10757920, 12726680, 13000008, 14200576, 15426936, 15700256 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..70 from Colin Barker)
EXAMPLE
12160 is in the sequence because 12160+12545+12936 (consecutive octagonal numbers) = 37641 = 12541+12547+12553 (consecutive primes).
PROG
(PARI) L=List(); forprime(p=2, 20000000, q=nextprime(p+1); r=nextprime(q+1); t=p+q+r; if(issquare(36*t-180, &sq) && (sq-12)%18==0, u=(sq-12)\18; listput(L, 3*u^2-2*u))); Vec(L)
(Python)
from __future__ import division
from sympy import prevprime, nextprime
A298312_list, n, m = [], 1, 30
while len(A298312_list) < 10000:
k = prevprime(m//3)
k2 = nextprime(k)
if prevprime(k) + k + k2 == m or k + k2 + nextprime(k2) == m:
A298312_list.append(n*(3*n-2))
n += 1
m += 18*n + 3 # Chai Wah Wu, Jan 22 2018
CROSSREFS
Sequence in context: A018235 A250837 A234079 * A167729 A115674 A013819
KEYWORD
nonn
AUTHOR
Colin Barker, Jan 17 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 June 12 10:07 EDT 2024. Contains 373329 sequences. (Running on oeis4.)