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.

A076306 Numbers k such that k^3 is a sum of three successive primes.

Original entry on oeis.org

11, 47, 145, 223, 229, 267, 313, 353, 365, 391, 397, 409, 507, 565, 567, 571, 573, 641, 661, 723, 793, 799, 841, 887, 895, 1015, 1051, 1089, 1293, 1297, 1411, 1451, 1469, 1789, 1909, 1943, 2043, 2077, 2171, 2401, 2459, 2497, 2671, 2801, 2851, 2871, 2921, 3211
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002, Nov 12 2009

Keywords

Comments

prime(k) + prime(k+1) + prime(k+2) is a cube in A034961, k=A158796(n).

Examples

			11 is a term because 11^3 = 1331 = prime(85) + prime(86) + prime(87) = 439 + 443 + 449.
47 is a term because 47^3 = 103823 = prime(3696) + prime(3697) + prime(3698) = 34603 + 34607 + 34613.
		

Crossrefs

Programs

  • Mathematica
    okQ[n_]:=Module[{x=n^3,low,hi}, low=PrimePi[Round[x/3]]-4; hi=low+8; MemberQ[Total/@Partition[Prime[Range[low,hi]],3,1],x]]; Select[Range[5,3300],okQ]  (* Harvey P. Dale, Jan 27 2011 *)
  • PARI
    { p1=prime(1) ; p2=prime(2) ; p3=prime(3) ; n3=p1+p2+p3 ; for(i=1,100000000, if( ispower(n3,3,&n), print(n) ; ) ; n3 -= p1 ; p1=p2 ; p2=p3 ; p3=nextprime(p3+1) ; n3 += p3 ; ) ; } \\ R. J. Mathar, Jan 13 2007
    
  • PARI
    n=0; forstep(j=3, 86231, 2, c=j^3; c3=c/3; f=0; if(denominator(c3)==1, if(isprime(c3), if(precprime(c3-1)+c3+nextprime(c3+1)==c, f=1))); p2=precprime(c3); p1=precprime(p2-1); p3=nextprime(c3); p4=nextprime(p3+1); if(p1+p2+p3==c, f=1); if(p2+p3+p4==c, f=1); if(f==1, n++; write("b076306.txt", n " " j))) /* Donovan Johnson, Sep 02 2013 */
    
  • Python
    from _future_ import division
    from sympy import nextprime, prevprime, isprime
    A070306_list, i = [], 3
    while i < 10**6:
        n = i**3
        m = n//3
        pm, nm = prevprime(m), nextprime(m)
        k = n - pm - nm
        if isprime(m):
            if m == k:
                A070306_list.append(i)
        else:
            if nextprime(nm) == k or prevprime(pm) == k:
                A070306_list.append(i)
        i += 1 # Chai Wah Wu, May 30 2017

Extensions

More terms from R. J. Mathar, Jan 13 2007
a(29)-a(48) from Donovan Johnson, Apr 27 2008
Edited by N. J. A. Sloane, Nov 12 2009 at the suggestion of R. J. Mathar