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.

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

Original entry on oeis.org

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

Views

Author

Colin Barker, Jan 19 2018

Keywords

Examples

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

Crossrefs

Programs

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