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-10 of 12 results. Next

A086120 Natural numbers of the form p^3 - q^3, where p and q are primes.

Original entry on oeis.org

19, 98, 117, 218, 316, 335, 866, 988, 1206, 1304, 1323, 1854, 1946, 2072, 2170, 2189, 2716, 3582, 4570, 4662, 4788, 4886, 4905, 5308, 5402, 5528, 6516, 6734, 6832, 6851, 7254, 9970, 10586, 10836, 11824, 12042, 12140, 12159, 12222, 17530, 17624, 18268
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Comments

To find all differences p^3 - q^3 less than N, it is required that all primes p and q up to sqrt(N/6) be tested.

Examples

			117 belongs to the sequence because it can be written as 5^3 - 2^3.
		

Crossrefs

Cf. A086119, A086121. Also see A045636, A045699.

Programs

  • Mathematica
    sumList[x_List, y_List] := (punchline = {}; Do[punchline = Union[punchline, x[[i]] + y], {i, Length[x]}]; punchline); posPart[x_List] := (punchline = {}; Do[If[x[[i]] > 0, punchline = Union[punchline, {x[[i]]}]], {i, Length[x]}]; punchline); posPart[sumList[Prime[Range[10]]^3, - Prime[Range[10]]^3]]
    nn=10^5; Union[Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[Sqrt[nn/6]]}, {j,i-1}]][[2,1]]] (* T. D. Noe, Oct 04 2010 *)
    With[{upto=20000},Select[Abs[#[[1]]-#[[2]]]&/@Subsets[Prime[ Range[ Sqrt[ upto/6]]]^3,{2}]//Union,#<=upto&]] (* Harvey P. Dale, Dec 10 2017 *)

Extensions

Corrected by T. D. Noe, Oct 04 2010

A346917 Numbers that are a sum of the cubes of four primes, not necessarily distinct.

Original entry on oeis.org

32, 51, 70, 89, 108, 149, 168, 187, 206, 266, 285, 304, 367, 383, 386, 402, 405, 424, 484, 500, 503, 522, 601, 620, 702, 718, 721, 740, 819, 838, 936, 1037, 1056, 1154, 1355, 1372, 1374, 1393, 1412, 1472, 1491, 1510, 1589, 1608, 1690, 1706, 1709, 1728, 1807, 1826
Offset: 1

Views

Author

Amiram Eldar, Aug 07 2021

Keywords

Comments

Roth (1951) proved that the number of terms below x is >> x/log(x)^8.
Ren (2001) proved that this sequence has a positive lower density.
The lower density was proven to be larger than 0.003125 (Ren, 2003), 0.005776 (Liu, 2012), and 0.009664 (Elsholtz and Schlage-Puchta, 2019).

Examples

			a(1) = 32 = 2^3 + 2^3 + 2^3 + 2^3.
a(2) = 51 = 2^3 + 2^3 + 2^3 + 3^3.
a(3) = 70 = 2^3 + 2^3 + 3^3 + 3^3.
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := Module[{s = Select[Range[Floor @ Surd[max, 3]], PrimeQ]}, Select[Union[Plus @@@ (Tuples[s, 4]^3)], # <= max &]]; seq[2000]
  • PARI
    list(lim)=my(v=List(), P=apply(p->p^3,primes(sqrtnint(lim\=1,3)))); foreach(P,p, foreach(P,q, foreach(P,r, my(s=p+q+r,t); for(i=1,#P, t=s+P[i]; if(t>lim, break); listput(v,t))))); Set(v) \\ Charles R Greathouse IV, Aug 09 2021
    
  • Python
    from sympy import integer_nthroot, primerange
    from itertools import combinations_with_replacement as cwr
    def aupto(limit):
        cubes = [p**3 for p in primerange(2, integer_nthroot(limit, 3)[0])]
        return sorted(sum(c) for c in cwr(cubes, 4) if sum(c) <= limit)
    print(aupto(2000)) # Michael S. Branicky, Apr 09 2022

A086121 Positive sums or differences of two cubes of primes.

Original entry on oeis.org

16, 19, 35, 54, 98, 117, 133, 152, 218, 250, 316, 335, 351, 370, 468, 686, 866, 988, 1206, 1304, 1323, 1339, 1358, 1456, 1674, 1854, 1946, 2072, 2170, 2189, 2205, 2224, 2322, 2540, 2662, 2716, 3528, 3582, 4394, 4570, 4662, 4788, 4886, 4905, 4921, 4940, 5038
Offset: 1

Views

Author

Hollie L. Buchanan II, Jul 11 2003

Keywords

Examples

			117 and 133 each belong to the (set) sequence because can be written as 117 = 5^3 - 2^3 and 133 = 5^3 + 2^3.
		

Crossrefs

Cf. A086119, A086120. Also see A045636, A045699.

Programs

  • Mathematica
    nn=10^6; td=Reap[Do[n=Prime[i]^3-Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[Sqrt[nn/6]]}, {j,i-1}]][[2,1]]; ts=Reap[Do[n=Prime[i]^3+Prime[j]^3; If[n<=nn, Sow[n]], {i,PrimePi[nn^(1/3)]}, {j,i}]][[2,1]]; Union[td,ts] (* T. D. Noe, Oct 04 2010 *)
    n = 100; Select[Sort@Flatten@ Table[Prime[i]^3 + (-1)^k Prime[j]^3, {i, n}, {j, i}, {k, 2}], 0 < # < (Prime[n] + 2)^3 - Prime[n]^3 &] (* Ray Chandler, Oct 05 2010 *)

Extensions

Edited by N. J. A. Sloane, Oct 05 2010 to remove a discrepancy between the terms of the sequence and the b-file. The old Mma program and b-file were wrong.

A145767 Numbers n such that n^2 = p^3 + q^3, p, q primes (p<=q).

Original entry on oeis.org

4, 228, 812340, 4935504, 13608420, 14218512, 25354032, 29463060, 48880608, 135516108, 194057640, 223078944, 412662012, 763311948, 764539380, 1409359200, 1998370272, 3408412644, 5397667572, 7650577620, 8224333236, 9401817516
Offset: 1

Views

Author

Zak Seidov, Oct 18 2008

Keywords

Comments

a(23) > 10^10. [From Donovan Johnson, Nov 18 2009]

Examples

			Corresponding values of p and q (p <= q) are: 2, 11, 2137, 8929, 1801, 44111, 6637, 57241, 16931, 151477, 54083, 3889; 2, 37, 8663, 28703, 56999, 48817, 86291, 87959, 133597, 246011, 334717, 367823.
		

Crossrefs

Cf. A086119 Numbers of the form p^3 + q^3, p, q primes.
Cf. A145797, A145798. [From Donovan Johnson, Nov 18 2009]

Programs

  • PARI
    {n1 = 40000; for(ia= 1, n1,a3 = prime(ia)^3; for ( ib= ia, n1,b3 = prime(ib)^3; c = a3 + b3; if(issquare(c), print([c, a3, b3]))))}

Formula

n^2=p^3+q^3, p, q primes (p<=q).

Extensions

a(13)-a(22) from Donovan Johnson, Nov 18 2009

A145797 Values of p in A145767.

Original entry on oeis.org

2, 11, 2137, 8929, 1801, 44111, 6637, 57241, 16931, 151477, 54083, 3889, 127717, 457511, 571019, 765983, 38557, 1662229, 2437751, 16139, 2305883, 2747449
Offset: 1

Views

Author

Zak Seidov, Oct 19 2008

Keywords

Crossrefs

Extensions

a(13)-a(22) from Donovan Johnson, Nov 18 2009

A145798 Values of q in A145767.

Original entry on oeis.org

2, 37, 8663, 28703, 56999, 48817, 86291, 87959, 133597, 246011, 334717, 367823, 552011, 786697, 735781, 1154017, 1586531, 1915163, 2446777, 3882661, 3811669, 4074743
Offset: 1

Views

Author

Zak Seidov, Oct 19 2008

Keywords

Crossrefs

Extensions

a(13)-a(22) from Donovan Johnson, Nov 18 2009

A294073 Numbers that are the sum of 2 cubes > 1.

Original entry on oeis.org

16, 35, 54, 72, 91, 128, 133, 152, 189, 224, 243, 250, 280, 341, 351, 370, 407, 432, 468, 520, 539, 559, 576, 637, 686, 728, 737, 756, 793, 854, 855, 945, 1008, 1024, 1027, 1064, 1072, 1125, 1216, 1241, 1339, 1343, 1358, 1395, 1456, 1458, 1512, 1547, 1674, 1729, 1736, 1755, 1792, 1843, 1853, 1944, 2000, 2060
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 07 2018

Keywords

Examples

			133 is in the sequence because 133 = 2^3 + 5^3.
		

Crossrefs

Programs

  • Maple
    N:= 3000: # to get all terms <= N
    M := floor(N^(1/3)):
    sort(convert(select(`<=`, {seq(seq(i^3+j^3, j = 2 .. i), i = 2 .. M)}, N), list)) # Robert Israel, Feb 08 2018
  • Mathematica
    nmax = 2060; f[x_] := Sum[x^k^3, {k, 2, 14}]^2; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]

A320662 Numbers k for which there are numbers 0 < m <= k such that k^3 + m^3 is a square.

Original entry on oeis.org

2, 8, 18, 21, 26, 32, 37, 46, 50, 65, 70, 72, 84, 88, 91, 98, 104, 105, 112, 128, 148, 162, 184, 189, 190, 200, 234, 242, 249, 260, 273, 280, 288, 312, 330, 333, 336, 338, 345, 352, 354, 364, 371, 392, 407, 414, 416, 420
Offset: 1

Views

Author

Marius A. Burtea, Oct 18 2018

Keywords

Comments

The sequence is infinite since if u is in the sequence then so is u*t^2, t, u >= 1. - Marius A. Burtea and David A. Corneth, Oct 23 2018
For the subsequence k= 8, 18, 32, 50,65, 72, 98, 104, 105,... two or more m exist satisfying the equation. - R. J. Mathar, Jan 22 2025

Examples

			8^3 + 4^3 = 512 + 64 = 576 = 24^2, so 8 is part of the sequence.
18^3 + 9^3 = 5832 + 729 = 6561 = 81^2, so 18 is part of the sequence.
91^3 + 65^3 = 753571 + 274625 = 1028196 = 1014^2, so 91 is part of the sequence.
7^3 + 0^3 = 343 + 0 = 343, 7^3 + 1^3 = 343 + 1 = 344, 7^3 + 2^3 = 343 + 8 = 351,7^3 + 4^3 = 343 + 64 = 407, 7^3 + 5^3 = 343 + 125 = 468, 7^3 + 6^3 = 343 + 216 = 559 and 7^3 + 7^3 = 343 + 343 = 686. Numbers 343, 344, 351, 407, 468, 559 and 686 are not squares, so 7 is not part of the sequence.
		

Crossrefs

Cf. A003325, A003997, A004999, A024670, A086119, A282639 (subsequence for coprime m,k), A050801 (bases of the squares).

Programs

  • Maple
    A320662 := proc(n)
        option remember ;
        local m,k ;
        if n =1 then
            2
        else
            for k from procname(n-1)+1 do
                for m from 1 to k do
                    if issqr(k^3+m^3) then
                        return k ;
                    end if;
                end do:
            end do:
        end if;
    end proc:
    seq(A320662(n),n=1..40) ; # R. J. Mathar, Jan 22 2025
  • Mathematica
    Select[Range@ 420, AnyTrue[Range[#1]^3 + #2, IntegerQ@ Sqrt@ # &] & @@ {#, #^3} &] (* Michael De Vlieger, Nov 05 2018 *)
  • PARI
    is(n) = for(m=1, n, if(issquare(n^3+m^3), return(1))); 0 \\ Felix Fröhlich, Oct 22 2018

A359448 a(n) is the least number that is the sum of two cubes of primes and is 2^n times an odd number.

Original entry on oeis.org

35, 54, 468, 152, 16, 9056, 81088, 527744, 4532992, 33900032, 268684288, 2148866048, 17185288192, 137439174656, 1099611160576, 8797884612608, 70369850097664, 562950041894912, 4503607335190528, 36028810622664704, 288230406982991872, 2305843633483415552, 18446744212436156416, 147573952867129622528
Offset: 0

Views

Author

Robert Israel, Jan 01 2023

Keywords

Comments

a(n) is the least member k of A086119 such that A007814(k) = n.
a(n) <= A359447(n) if A359447(n) > 0.
Since p^3 + q^3 = (p+q)*(p^2 - p*q + q^2), except for n=4 we must have A007814(p+q) = n.
There is no analogous sequence for squares, because if p and q are odd primes p^2 + q^2 == 2 (mod 4).

Examples

			a(0) = 35 = 2^3 + 3^3 = 2^0 * 35 with 2 and 3 prime and 35 odd.
a(1) = 54 = 3^3 + 3^3 = 2^1 * 27 with 3 and 3 prime and 27 odd.
a(2) = 468 = 5^3 + 7^3 = 2^2 * 117 with 5 and 7 prime and 117 odd.
a(3) = 152 = 3^3 + 5^3 = 2^3 * 19 with 3 and 5 prime and 19 odd.
a(4) = 16 = 2^3 + 2^3 = 2^4 * 1 with 2 and 2 prime and 1 odd.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,q,b,t,r;
      r:= infinity;
      for b from 1 by 2 while 2^(3*n-2)*b^3 < r do
        t:= 2^n*b;
        p:= nextprime(t/2);
        while p > 3 do
          p:= prevprime(p);
          q:= t-p;
          if p^3 + q^3 > r then break fi;
          if isprime(q) then r:= p^3 + q^3; break fi;
        od
      od;
        r
    end proc:
    f(0):= 35: f(4):= 16:
    map(f, [$0..30]);

A137632 Sums of 2 cubes of distinct odd primes.

Original entry on oeis.org

152, 370, 468, 1358, 1456, 1674, 2224, 2322, 2540, 3528, 4940, 5038, 5256, 6244, 6886, 6984, 7110, 7202, 8190, 9056, 11772, 12194, 12292, 12510, 13498, 14364, 17080, 19026, 24416, 24514, 24732, 25720, 26586, 29302, 29818, 29916, 30134
Offset: 1

Views

Author

M. F. Hasler, Apr 13 2008

Keywords

Examples

			3^3 + 5^3 = 152 = a(1).
3^3 + 7^3 = 370 = a(2).
5^3 + 7^3 = 468 = a(3).
		

Crossrefs

A subset of A120398 and A086119. Cf. A138853, A138854.

Programs

  • Maple
    A137632 := proc(amax) local a,p,q; a := {} ; p := 3 ; while p^3 < amax do q := nextprime(p) ; while p^3+q^3 < amax do a := a union {p^3+q^3} ; q := nextprime(q) ; od: p := nextprime(p) ; od: sort(convert(a,list)) ; end: A137632(80000) ; # R. J. Mathar, May 04 2008
  • Mathematica
    f[upto_]:=Module[{max=Ceiling[Power[upto-27, (3)^-1]],prs}, prs=Prime[Range[2,max]]; Select[Union[Total/@(Subsets[prs,{2}]^3)], #<=upto&]]; f[31000] (* Harvey P. Dale, Apr 20 2011 *)

Extensions

More terms from R. J. Mathar, Apr 13 2008, May 04 2008
Showing 1-10 of 12 results. Next