login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A076306 Numbers k such that k^3 is a sum of three successive primes. 4

%I #40 May 19 2019 14:52:52

%S 11,47,145,223,229,267,313,353,365,391,397,409,507,565,567,571,573,

%T 641,661,723,793,799,841,887,895,1015,1051,1089,1293,1297,1411,1451,

%U 1469,1789,1909,1943,2043,2077,2171,2401,2459,2497,2671,2801,2851,2871,2921,3211

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

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

%H Chai Wah Wu, <a href="/A076306/b076306.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..252 from Zak Seidov, terms 253..1000 from Donovan Johnson)

%e 11 is a term because 11^3 = 1331 = prime(85) + prime(86) + prime(87) = 439 + 443 + 449.

%e 47 is a term because 47^3 = 103823 = prime(3696) + prime(3697) + prime(3698) = 34603 + 34607 + 34613.

%t 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 *)

%o (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

%o (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 */

%o (Python)

%o from __future__ import division

%o from sympy import nextprime, prevprime, isprime

%o A070306_list, i = [], 3

%o while i < 10**6:

%o n = i**3

%o m = n//3

%o pm, nm = prevprime(m), nextprime(m)

%o k = n - pm - nm

%o if isprime(m):

%o if m == k:

%o A070306_list.append(i)

%o else:

%o if nextprime(nm) == k or prevprime(pm) == k:

%o A070306_list.append(i)

%o i += 1 # _Chai Wah Wu_, May 30 2017

%Y Cf. A076304, A076305, A034961, A158796, A227475.

%K nonn

%O 1,1

%A _Zak Seidov_, Oct 05 2002, Nov 12 2009

%E More terms from _R. J. Mathar_, Jan 13 2007

%E a(29)-a(48) from _Donovan Johnson_, Apr 27 2008

%E Edited by _N. J. A. Sloane_, Nov 12 2009 at the suggestion of _R. J. Mathar_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:21 EDT 2024. Contains 371936 sequences. (Running on oeis4.)