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.

Showing 1-3 of 3 results.

A123984 Primes p such that p^3 is a sum of three successive primes, or primes in A076306(n).

Original entry on oeis.org

11, 47, 223, 229, 313, 353, 397, 409, 571, 641, 661, 887, 1051, 1297, 1451, 1789, 2459, 2671, 2801, 2851, 3671, 4463, 4583, 4813, 4861, 5167, 5273, 5437, 5479, 5717, 5879, 6661, 6679, 6763, 6779, 7019, 7109, 7393, 7517, 7589, 7639, 7681, 7993, 8179, 8191, 9241
Offset: 1

Views

Author

Alexander Adamchuk, Oct 30 2006

Keywords

Comments

A076306(n) = {11, 47, 145, 223, 229, 267, 313, 353, ...} Numbers n such that n^3 is a sum of three successive primes.

Crossrefs

Cf. A076306, A076304. Cf. A122560 - Primes p such that p^2 is a sum of three successive primes. Cf. A122706 - Smallest prime p such that p^n is equal to the sum of 3 consecutive primes.

Programs

  • Mathematica
    spQ[n_]:=Module[{n3=n^3,a,b,c,d,e},c=NextPrime[Floor[n3/3]];b=NextPrime[ c,-1];a=NextPrime[b,-1];d=NextPrime[c];e=NextPrime[d];n3==a+b+c || n3==b+c+d || n3==c+d+e];Select[Prime[Range[1200]],spQ] (* Harvey P. Dale, Sep 23 2011 *)
  • PARI
    { p1=prime(1) ; p2=prime(2) ; p3=prime(3) ; n3=p1+p2+p3 ; for(i=1,100000000, if( ispower(n3,3,&n), if(isprime(n), print(n) ) ; ) ; n3 -= p1 ; p1=p2 ; p2=p3 ; p3=nextprime(p3+1) ; n3 += p3 ; ) ; } \\ R. J. Mathar, Jan 13 2007

Formula

A000040 INTERSECT A076306. - R. J. Mathar, Jan 13 2007

Extensions

More terms from R. J. Mathar, Jan 13 2007
a(15)-a(46) from Donovan Johnson, Apr 27 2008

A158796 Index of first of three successive primes which sum to a cube.

Original entry on oeis.org

85, 3696, 79700, 263166, 283353, 434935, 678277, 950264, 1043678, 1266169, 1321463, 1436753, 2629623, 3568796, 3604676, 3676738, 3713180, 5096401, 5558697, 7162624, 9303565, 9504536, 10988577, 12778681, 13108392, 18730119
Offset: 1

Views

Author

Zak Seidov, Nov 12 2009

Keywords

Examples

			a(1)=85 because prime(85)+prime(86)+prime(87)=439+443+449=11^3=(A076306(1))^3
a(2)=3696 because prime(3696)+prime(3697)+prime(3698)=34603+34607+34613=47^3=(A076306(2))^3.
		

Crossrefs

Programs

  • Maple
    count:= 0:
    for x from 3 while count < 30 do
      y:= x^3;
      r:= floor(y/3);
      p0:= prevprime(r); p1:= nextprime(p0); p2:= nextprime(p1);
      while p0 + p1 + p2 > y do
        p2:= p1;
        p1:= p0;
        p0:= prevprime(p0);
      od:
      while p0 + p1 + p2 < y do
        p0:= p1;
        p1:= p2;
        p2:= nextprime(p2);
      od:
      if p0 + p1 + p2 = y then
        count:= count+1;
        A[count]:= numtheory:-pi(p0);
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Feb 10 2017
  • Python
    from _future_ import division
    from sympy import prevprime, nextprime, isprime, primepi
    A158796_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:
                A158796_list.append(primepi(pm))
        else:
            if nextprime(nm) == k:
                A158796_list.append(primepi(pm))
            elif prevprime(pm) == k:
                A158796_list.append(primepi(pm)-1)
        i += 1 # Chai Wah Wu, Jun 01 2017

A227475 Cubes which are sum of three consecutive primes.

Original entry on oeis.org

1331, 103823, 3048625, 11089567, 12008989, 19034163, 30664297, 43986977, 48627125, 59776471, 62570773, 68417929, 130323843, 180362125, 182284263, 186169411, 188132517, 263374721, 288804781, 377933067, 498677257, 510082399, 594823321, 697864103, 716917375
Offset: 1

Views

Author

K. D. Bajpai, Sep 02 2013

Keywords

Examples

			a(2) = 103823 because prime(3696) + prime(3697) + prime(3698) = 34603 + 34607 + 34613 = 103823 = 47^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Total[#]&/@Partition[Prime[Range[132*10^5]],3,1],IntegerQ[ Surd[ #,3]]&] (* Harvey P. Dale, May 08 2018 *)
  • 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("b227475.txt", n " " c))) /* Donovan Johnson, Sep 02 2013 */

Formula

a(n) = (A076306(n))^3. - R. J. Mathar, Sep 02 2013
Showing 1-3 of 3 results.