login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298313 The first of three consecutive primes the sum of which is equal to the sum of three consecutive octagonal numbers. 2
12541, 75521, 159617, 182519, 271181, 373091, 603901, 609289, 851197, 983819, 1246757, 2079997, 3299081, 3687421, 4484737, 4692497, 5636171, 7514477, 8273437, 9299831, 10408577, 10430921, 10746557, 10769281, 12739037, 13012487, 14213621, 15440531, 15713959 (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

12541 is in the sequence because 12541+12547+12553 (consecutive primes) = 37641 = 12160+12545+12936 (consecutive octagonal numbers).

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, p))); Vec(L)

(Python)

from __future__ import division

from sympy import prevprime, nextprime

A298313_list, n, m = [], 1, 30

while len(A298313_list) < 10000:

    k = prevprime(m//3)

    k2 = prevprime(k)

    k3 = nextprime(k)

    if k2 + k + k3 == m:

        A298313_list.append(k2)

    elif k + k3 + nextprime(k3) == m:

        A298313_list.append(k)

    n += 1

    m += 18*n + 3 # Chai Wah Wu, Jan 22 2018

CROSSREFS

Cf. A000040, A000567, A054643, A298073, A298168, A298169, A298222, A298223, A298250, A298251, A298272, A298273, A298301, A298302, A298312.

Sequence in context: A231956 A252164 A045217 * A225151 A237907 A251296

Adjacent sequences:  A298310 A298311 A298312 * A298314 A298315 A298316

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 31 11:50 EDT 2020. Contains 338101 sequences. (Running on oeis4.)