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!)
A071220 Numbers n such that prime(n) + prime(n+1) is a cube. 6

%I #17 May 31 2017 22:54:39

%S 2,28,1332,3928,16886,157576,192181,369440,378904,438814,504718,

%T 539873,847252,1291597,1708511,1837979,3416685,3914319,5739049,

%U 6021420,7370101,7634355,8608315,9660008,10378270,14797144,15423070,18450693

%N Numbers n such that prime(n) + prime(n+1) is a cube.

%C The corresponding primes are in A061308; n^3 is a sum of two successive primes in A074925.

%C Prime(n)+ Prime(n+1) is a square in A064397; n^2 is a sum of two successive primes in A074924;

%H Chai Wah Wu, <a href="/A071220/b071220.txt">Table of n, a(n) for n = 1..1000</a>

%F A001043(x)=m^3 for some m; if p(x+1)+p(x) is a cube, then x is here.

%F a(n) = primepi(A061308(n)). - _Michel Marcus_, Oct 24 2014

%e 28 is in the list because prime(28)+prime(29) = 107+109 =216 = 6^3.

%e n=1291597: prime(1291597)+prime(1291598) = 344*344*344.

%t PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ If[ n^3 == PrevPrim[Floor[(n^3)/2]] + NextPrim[Floor[(n^3)/2]], Print[ PrimePi[ Floor[(n^3)/2]]]], {n, 2, 10^4}]

%t Flatten[Position[Total/@Partition[Prime[Range[20000000]],2,1],_?(IntegerQ[ Surd[ #,3]]&)]] (* _Harvey P. Dale_, May 28 2014 *)

%o (Python)

%o from __future__ import division

%o from sympy import isprime, prevprime, nextprime, primepi

%o A071220_list, i = [], 2

%o while i < 10**6:

%o n = i**3

%o m = n//2

%o if not isprime(m) and prevprime(m) + nextprime(m) == n:

%o A071220_list.append(primepi(m))

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

%Y Cf. A064397, A074925, A074924, A001043.

%K nonn

%O 1,1

%A _Labos Elemer_, May 17 2002

%E Edited and extended by _Robert G. Wilson v_, Oct 07 2002

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 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)