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-9 of 9 results.

A173255 Smaller member p of a twin prime pair (p, p+2) such that the sum p+(p+2) is a fifth power: 2*(p+1) = k^5 for some integer k.

Original entry on oeis.org

4076863487, 641194278911, 16260080320511, 174339220049999, 420586798122287, 388931440807883087, 1715002302605720111, 2051821692518399999, 4617724356355049999, 5873208011345484287, 58698987193722272687, 76578949263222449999, 180701862444484649999, 562030251929933709311
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 14 2010

Keywords

Comments

Since k^5 = 2*(p+1) is even, k is also even.
The lesser of twin primes p (except for 3) are congruent to -1 modulo 3 (see third comment in A001359), the greater of twin primes p+2 (except for 5) are congruent to 1 modulo 3. Therefore p+1 is a multiple of 3. Since k^5 = 2*(p+1) is a multiple of 3, k is also a multiple of 3. Hence k is divisible by 2 and by 3, i.e. a multiple of 6.
The lesser of twin primes except for 3 (A001359) are congruent to 1, 7 or 9 modulo 10; this applies also to the terms of the present sequence, a subsequence of A001359.

Examples

			p = 4076863487 and p+2 form a twin prime pair, their sum 8153726976 = 96^5 is a fifth power. Hence 4076863487 is in the sequence.
p = 641194278911 and p+2 form a twin prime pair, their sum 1282388557824 = 264^5 is a fifth power. Hence 641194278911 is in the sequence.
p = 388931440807883087 and p+2 form a twin prime pair, their sum 777862881615766176 = 3786^5 is a fifth power. Hence 388931440807883087 is in the sequence.
3786 is the smallest value of k that gives a prime when divided by 6, it corresponds to a(6): 3786 = 6*631 and 631 is prime. The next value of k that gives a prime when divided by 6 is 10326 and corresponds to a(11): 10326 = 6*1721 and 1721 is prime.
If p is a term and k^5 the corresponding fifth power, then a fifth-power multiple c^5*k^5 does not necessarily correspond to a term q. The fifth power 96^5 corresponds to a(1), but q = 2^5*96^5/2-1 = 130459631615 = 5*7607*3429989 is not prime, much less is (q, q+2) a twin prime pair.
If p is a term and k^5 the corresponding fifth power, and if k^5 is the product c^5*d^5 of two fifth powers where d is even, then d^5 does not necessarily correspond to a term q. The fifth power 3786^5 = 3^5*1262^5 corresponds to a(6), but q = 1262^5/2-1 = 1600540908674415 = 3*5*577*55171*3351883 is not prime, much less is (q, q+2) a twin prime pair.
		

Crossrefs

Programs

  • Magma
    /* gives triples  */ [ : k in [2..10500 by 2] | IsPrime(p) and IsPrime(p+2) where p is (k^5 div 2)-1 ];
  • Mathematica
    Select[Range[2, 10^5, 2]^5/2 - 1, And@@PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 24 2019 *)

Extensions

Edited, non-specific references and keywords base, hard removed, MAGMA program added and listed terms verified by the Associate Editors of the OEIS, Feb 26 2010
More terms from Amiram Eldar, Dec 24 2019

A172271 Smaller member p of a twin prime pair (p,p+2) with a cube sum N^3.

Original entry on oeis.org

3, 107, 2634011, 29659499, 57395627, 104792291, 271669247, 485149499, 568946591, 588791807, 752530067, 863999999, 2032678367, 2772616499, 2945257307, 3505869971, 4473547487, 4670303507, 5470523999, 6911999999, 7498065347, 8646803027, 8828622431, 8951240447
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Jan 30 2010

Keywords

Comments

It is conjectured that the number of twin prime pairs is infinite, one of the great open questions in number theory.
It is conjectured that this sequence is infinite.
Necessarily the cube base is even: N=2n => p = (2n)^3 / 2 - 1.
For n>1: necessarily n=3k since for n=3k+1, p = (2n)^3 / 2 - 1 is divisible by 3, and for n=3k+2, p+2 = (2n)^3 / 2 + 1 is divisible by 3.
It has been proved that the pair (p,p+2) is a twin prime couple iff 4((p-1)! + 1) == -p (mod p*(p+2)).
Equivalently, primes of the form 4n^3-1 such that 4n^3+1 is also prime. - Charles R Greathouse IV, Aug 27 2013

Examples

			3 + 5 = 2^3;
107 + 109 = (2*3)^3;
2634011 + 2634013 = (2*87)^3.
		

References

  • G. H. Hardy, E. M. Wright, An Introduction to the Theory of Numbers (Fifth Edition), Oxford University Press, 1980.
  • N. J. A. Sloane, Simon Plouffe: The Encyclopedia of Integer Sequences, Academic Press, 1995.

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime(t+2), [seq(4*n^3-1, n=1..2000)]); # Robert Israel, Feb 10 2015
  • Mathematica
    lst={}; Do[a=Prime[n]; b=Prime[n+1]; If[b-a==2,c=a+b; If[Mod[c^(1/3),1]==0,AppendTo[lst,a]]],{n,11!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 13 2010 *)
    Select[Partition[Prime[Range[31*10^6]],2,1],#[[2]]-#[[1]]==2&&IntegerQ[CubeRoot[Total[#]]]&][[;;,1]] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, May 31 2025 *)
  • PARI
    v=List([3]); for(n=1,1e3,if(isprime(t=108*n^3-1) && isprime(t+2), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Aug 27 2013

Extensions

Edits and more terms from Jon E. Schoenfield, Feb 10 2015

A172494 Numbers k with (p,p+2) = ((2*k)^3/2 - 1,(2*k)^3/2 + 1) is a twin prime pair.

Original entry on oeis.org

1, 3, 87, 195, 243, 297, 408, 495, 522, 528, 573, 600, 798, 885, 903, 957, 1038, 1053, 1110, 1200, 1233, 1293, 1302, 1308, 1368, 1473, 1482, 1578, 1623, 1797, 1953, 2028, 2142, 2238, 2370, 2772, 2868, 2973, 3033, 3393, 3483, 3582, 3777, 3822, 3840, 3912
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 05 2010

Keywords

Comments

a(n) is necessarily a multiple of 3 for n > 1.

Examples

			3 = (2*1)^3/2 - 1 = prime(2), 3 + 2 = 5 = (2*1)^3/2 + 1, (3,5) is the first twin prime pair => a(1) = 1.
107 = (2*3)^3/2 - 1 = prime(28), 107 + 2 = 109 = (2*3)^3/2 + 1, (107,109) is the 10th twin prime pair => a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4000],AllTrue[(2#)^3/2+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 21 2015 *)
  • PARI
    select(n -> isprime((2*n)^3/2-1) && isprime((2*n)^3/2+1), [1..4000]) \\ Satish Bysany, Mar 03 2017

Formula

2*a(n) = (2*A172271(n) + 2)^(1/3). - R. J. Mathar, Aug 21 2014

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

Original entry on oeis.org

2, 28, 1332, 3928, 16886, 157576, 192181, 369440, 378904, 438814, 504718, 539873, 847252, 1291597, 1708511, 1837979, 3416685, 3914319, 5739049, 6021420, 7370101, 7634355, 8608315, 9660008, 10378270, 14797144, 15423070, 18450693
Offset: 1

Views

Author

Labos Elemer, May 17 2002

Keywords

Comments

The corresponding primes are in A061308; n^3 is a sum of two successive primes in A074925.
Prime(n)+ Prime(n+1) is a square in A064397; n^2 is a sum of two successive primes in A074924;

Examples

			28 is in the list because prime(28)+prime(29) = 107+109 =216 = 6^3.
n=1291597: prime(1291597)+prime(1291598) = 344*344*344.
		

Crossrefs

Programs

  • Mathematica
    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}]
    Flatten[Position[Total/@Partition[Prime[Range[20000000]],2,1],?(IntegerQ[ Surd[ #,3]]&)]] (* _Harvey P. Dale, May 28 2014 *)
  • Python
    from _future_ import division
    from sympy import isprime, prevprime, nextprime, primepi
    A071220_list, i = [], 2
    while i < 10**6:
        n = i**3
        m = n//2
        if not isprime(m) and prevprime(m) + nextprime(m) == n:
            A071220_list.append(primepi(m))
        i += 1 # Chai Wah Wu, May 31 2017

Formula

A001043(x)=m^3 for some m; if p(x+1)+p(x) is a cube, then x is here.
a(n) = primepi(A061308(n)). - Michel Marcus, Oct 24 2014

Extensions

Edited and extended by Robert G. Wilson v, Oct 07 2002

A174370 Lesser member p of a twin prime pair (p, p + 2) such that 2p + 3(p + 2) is a perfect square.

Original entry on oeis.org

71, 191, 6551, 9767, 18119, 21647, 27527, 35447, 46271, 79631, 103391, 103967, 121367, 127679, 161639, 207671, 241559, 254927, 264959, 273311, 380327, 421079, 450599, 479879, 592367, 700127, 745751, 949607, 986567, 1011599, 1013399
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 17 2010

Keywords

Comments

2p + 3(p + 2) = 5p + 6.
There are two parametric solutions for natural numbers:
(a) p = 5t^2 + 2t - 1, k = 5t + 1, necessarily for a prime p: t = 2s => p = 20s^2 + 4s - 1, k = 10s + 1.
If s = 3k + 2 => p of (a) is not prime but a multiple of 3.
If the least significant digit of k is 1, solution of (a) for s = (k - 1)/10).
(b) p = 5t^2 + 8t + 2, k = 5t + 4, necessarily for a prime p: t = 2s - 1 => p = 20s^2 - 4s - 1, N = 10s-1.
If s = 3k + 1 => p of (b) is not prime but a multiple of 3.
If the least significant digit of k is 9, solution of (b) for s = (k + 1)/10).

Examples

			71 and 73 are twin primes, 2 * 71 + 3 * 73 = 19^2.
191 and 193 are twin primes, 2 * 191 + 3 * 193 = 31^2.
		

References

  • Leonard E. Dickson, History of the Theory of numbers, vol. 2: Diophantine Analysis, Dover Publications 2005.
  • Richard K. Guy, Unsolved Problems in Number Theory, New York, Springer-Verlag, 1994.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, 1909.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[10^5]], PrimeQ[# + 2] && IntegerQ[Sqrt[2# + 3(# + 2)]] &] (* Alonso del Arte, Dec 05 2011 *)
    Select[(Range[2251]^2 - 6)/5, And @@ PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 24 2019 *)
    Select[Partition[Prime[Range[80000]],2,1],#[[2]]-#[[1]]==2&&IntegerQ[Sqrt[ 2#[[1]]+ 3#[[2]]]]&][[All,1]] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    forstep(n=1,1e4,[10,8,10,2],if(isprime(p=n^2\5-1)&&isprime(p+2),print1(p", "))) \\ Charles R Greathouse IV, Dec 05 2011

A226524 Cubes which are the sum of two consecutive primes.

Original entry on oeis.org

8, 216, 21952, 74088, 373248, 4251528, 5268024, 10648000, 10941048, 12812904, 14886936, 16003008, 25934336, 40707584, 54872000, 59319000, 114791256, 132651000, 199176704, 209584584, 259694072, 269586136, 306182024, 345948408, 373248000, 543338496, 567663552
Offset: 1

Views

Author

K. D. Bajpai, Aug 31 2013

Keywords

Examples

			a(2) = 216: prime(28) + prime(29) = 107 + 109 = 216 = 6^3.
		

Crossrefs

Cubes in A001043.
Cf. A062703 (analog for squares), A061308 (lesser of the consecutive primes), A071220 (index of that prime), A074925 (a(n)^(1/3)).

Programs

  • Maple
    KD: = proc() local a,b,c;  a: = ithprime(n) + ithprime(n+1); b:= evalf(a^(1/3)); if b=floor(b) then RETURN(a):  fi; end: seq(KD(), n=1..1000000);
  • Mathematica
    Select[Total/@Partition[Prime[Range[155*10^5]],2,1],IntegerQ[Surd[#,3]]&] (* or *) stcpQ[n_]:=Module[{p1=NextPrime[Floor[n/2],-1],p2=NextPrime[Ceiling[n/2]]},n==p1+p2]; Select[Range[850]^3,stcpQ] (* The second program is much more efficient than the first. *) (* Harvey P. Dale, May 15 2022 *)
  • PARI
    n=0; forstep(j=2, 55778, 2, c=j^3; c2=c/2; if(precprime(c2)+nextprime(c2)==c, n++; write("b226524.txt", n " " c))) /* Donovan Johnson, Sep 02 2013 */
    
  • PARI
    A226524(n)=A074925(n)^3 \\ M. F. Hasler, Jan 03 2020
    
  • Python
    from itertools import count, islice
    from sympy import nextprime, prevprime
    def agen(): yield from (c for c in (k**3 for k in count(2, step=2)) if prevprime(c//2+1) + nextprime(c//2-1) == c)
    print(list(islice(agen(), 27))) # Michael S. Branicky, May 24 2022

Formula

a(n) = A074925(n)^3 = A000040(i) + A000040(i+1) with i = A071220(n) = A000720(A061308(n)). - M. F. Hasler, Jan 03 2020

Extensions

Edited by M. F. Hasler, Jan 03 2020

A210205 The sum of three consecutive prime numbers, beginning with a(n), is a cube.

Original entry on oeis.org

439, 34603, 1016201, 3696493, 4002991, 6344687, 10221397, 14662309, 16209029, 19925483, 20856907, 22805969, 43441271, 60120691, 60761413, 62056457, 62710787, 87791567, 96268243, 125977651, 166225747, 170027449
Offset: 1

Views

Author

Pablo Martínez, Mar 18 2012

Keywords

Examples

			prime(85) + prime(86) + prime(87) = 439 + 443 + 449 = 1331 = 11^3.
		

Crossrefs

Cf. A061308.

Programs

  • Mathematica
    t = {}; p = 2; q = 3; Do[r = NextPrime[q]; If[IntegerQ[(p + q + r)^(1/3)], AppendTo[t, p]; Print[p]]; p = q; q = r, {1000000}]; t (* T. D. Noe, Mar 24 2012 *)
    Select[Partition[Prime[Range[9505000]],3,1],IntegerQ[Surd[Total[#],3]]&][[All,1]] (* Harvey P. Dale, May 22 2020 *)
  • Python
    from _future_ import division
    from sympy import nextprime, prevprime
    A210205_list = []
    for i in range(3,10**6):
        n = i**3
        p2 = prevprime(n//3)
        p1, p3 = prevprime(p2), nextprime(p2)
        q = p1+p2+p3
        while q <= n:
            if q == n:
                A210205_list.append(p1)
            p1, p2, p3 = p2, p3, nextprime(p3)
            q = p1+p2+p3 # Chai Wah Wu, Dec 31 2015

Extensions

Extended by T. D. Noe, Mar 24 2012

A248587 The smallest of four consecutive primes whose sum is a perfect cube.

Original entry on oeis.org

4812191, 6353029, 8039333, 8821867, 19876711, 60742631, 85017061, 108879847, 127042367, 138853049, 170367959, 238190951, 259108427, 414949357, 485941193, 512095739, 529218559, 582868471, 623331491, 648485381, 771656657, 1001132351, 1098706507, 1172752457
Offset: 1

Views

Author

K. D. Bajpai, Oct 09 2014

Keywords

Examples

			a(2) = 6353029 is prime. Next three primes are 6353033, 6353051 and 6353071. Their sum = 6353029 + 6353033 + 6353051 + 6353071 = 25412184 = 294^3.
a(3) = 8039333 is prime. Next three primes are 8039359, 8039363 and 8039377. Their sum = 8039333 + 8039359 + 8039363 + 8039377 = 32157432 = 318^3.
		

Crossrefs

Cf. A000040 (primes), A000578 (cubes).
Cf. A061308 (two consecutive primes), A210205 (three consecutive primes).

Programs

  • Mathematica
    t = {}; p = 2; q = 3; r = 5; Do[v = NextPrime[r]; If[IntegerQ[(p + q + r + v)^(1/3)], AppendTo[t, p]; Print[p]]; p = q; q = r; r = v, {5*10^8}]; t
    Select[Partition[Prime[Range[6*10^7]], 4, 1],IntegerQ[Surd[Total[#], 3]] &] [[All, 1]] (* Harvey P. Dale, Oct 07 2016 *)
  • PARI
    lista(nn) = {vp = primes(nn); for (i=1, #vp - 3, if (ispower(vp[i]+vp[i+1]+vp[i+2]+vp[i+3], 3), print1(vp[i], ", ")););} \\ Michel Marcus, Oct 24 2014
    
  • Python
    from sympy import nextprime, prevprime
    A248587_list = []
    for i in range(3,10**6):
        n = i**3
        p3 = prevprime(n//4)
        p2, p4 = prevprime(p3), nextprime(p3)
        p1 = prevprime(p2)
        q = p1+p2+p3+p4
        while q <= n:
            if q == n:
                A248587_list.append(p1)
            p1, p2, p3, p4 = p2, p3, p4, nextprime(p4)
            q = p1+p2+p3+p4 # Chai Wah Wu, Dec 31 2015

A173560 Numbers m such that (6*m)^5 is a sum of a twin prime pair.

Original entry on oeis.org

16, 44, 84, 135, 161, 631, 849, 880, 1035, 1086, 1721, 1815, 2155, 2704, 2871, 2975, 3011, 3159, 3220, 3365, 3390, 3669, 3996, 4075, 4704, 4761, 5025, 5090, 5299, 5585, 5640, 5970, 6314, 6606, 7035, 7785, 8104, 8129, 8610, 9116, 9665, 9966, 10249
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 21 2010

Keywords

Comments

The twin prime pairs are characterized in A173255.
No such m has least significant digit (LSD) e = 2 or 7 because a = (6 * e)^5/2 - 1, representing the smaller of the twin primes, would get LSD 5.
No such m has LSD e = 3 or 8, because a+2 = (6 * e)^5/2 + 1, representing the larger prime, would get LSD 5.
The primes in this sequence here are a(6) = 631 = prime(115), a(11) = 1721 = prime(268),
a(17) = 3011 = prime(432), a(49) = 10859 = prime(1320), ...

Examples

			p = (6 * 16)^5/2 - 1 = 4076863487 = A000040(193435931); p+2 = A000040(193435932), so a(1) = 16.
p = (6 * 44)^5/2 - 1 = 641194278911 = A000040(24524572848); p+2 = A000040(24524572849), so a(2) = 44.
p = (6 * 84)^5/2 - 1 = 16260080320511 = A000040(553382827197); p+2 = A000040(553382827198), so a(3) = 84.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[700],AllTrue[((6*#)^5-2)/2+{0,2},PrimeQ]&] (* Harvey P. Dale, Dec 21 2024 *)
  • PARI
    isok(m) = {my(k = (6*m)^5/2); isprime(k-1) && isprime(k+1);} \\ Amiram Eldar, Jul 19 2025
Showing 1-9 of 9 results.