cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A298464 The first of two consecutive primes the sum of which is equal to the sum of two consecutive pentagonal numbers.

Original entry on oeis.org

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
Offset: 1

Views

Author

Colin Barker, Jan 19 2018

Keywords

Examples

			79 is in the sequence because 79+83 (consecutive primes) = 162 = 70+92 (consecutive pentagonal numbers).
		

Crossrefs

Programs

  • 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 *)
  • 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