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.

A167807 Square pyramidal numbers which are sums of three consecutive primes.

Original entry on oeis.org

1015, 25585, 1623245, 2127685, 7838831, 8865649, 19849115, 52051769, 73998155, 88409285, 91753025, 161553785, 216862421, 289872105, 347016319, 382029011, 466430159, 835713879, 1077314939, 1223359835, 1509659555, 1584781241
Offset: 1

Views

Author

Zak Seidov, Nov 12 2009

Keywords

Comments

Intersection of A000330 (Square pyramidal numbers) and A034961 (Sums of three consecutive primes).

Examples

			1015=A034961(67)=A000330(14)
25585=A034961(1062)=A000330(42).
		

Crossrefs

Programs

  • Python
    from _future_ import division
    from sympy import nextprime, prevprime
    A167807_list = []
    for i in range(3,10**6):
        n = i*(i+1)*(2*i+1)//6
        p2 = prevprime(n//3)
        p1, p3 = prevprime(p2), nextprime(p2)
        q = p1+p2+p3
        while q <= n:
            if q == n:
                A167807_list.append(n)
            p1, p2, p3 = p2, p3, nextprime(p3)
            q = p1+p2+p3 # Chai Wah Wu, Dec 31 2015

Extensions

a(6)-a(22) from Donovan Johnson, Nov 15 2009