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

A137365 Prime numbers n such that n = p1^3 + p2^3 + p3^3, a sum of cubes of 3 distinct prime numbers.

Original entry on oeis.org

1483, 5381, 6271, 7229, 9181, 11897, 13103, 13841, 14489, 17107, 20357, 25747, 26711, 27917, 30161, 30259, 31247, 32579, 36161, 36583, 36677, 36899, 36901, 42083, 48817, 54181, 55511, 55691, 56377, 56897, 57637, 59093, 64151, 66347
Offset: 1

Views

Author

Keywords

Comments

Numbers n may have multiple decompositions; for example, n=185527 and n=451837 have two, and n=8627527 and n=32816503 have three. The smallest n with more than one decomposition is n = 185527 = 13^3+43^3+47^3 = 19^3+31^3+53^3, the 94th in the sequence. - R. J. Mathar, May 01 2008
Primes in A138853 and A138854. - M. F. Hasler, Apr 13 2008
The least prime, p, which has n decompositions {with its primes} is 1483 = {3, 5, 11}; 185527 = {13, 43, 47} & {19, 31, 53}; 8627527 = {19, 151, 173}, {33, 139, 181} & {71, 73, 199} and 1122871751 = {113, 751, 887}, {131, 701, 919}, {151, 659, 941} & {29, 107, 1039}. - Robert G. Wilson v, May 04 2008
The number of terms < 10^n: 0, 0, 0, 5, 56, 327, 2172, 13417, 86264, 567211, ..., . - Robert G. Wilson v, May 04 2008
The number of decompositions < 10^n: 0, 0, 0, 5, 56, 330, 2201, 13609, 87200, 571770, ..., . - Robert G. Wilson v, May 04 2008

Examples

			1483=3^3+5^3+11^3, 5381=17^3+7^3+5^3, 6271=3^3+11^3+17^3, etc.
		

Crossrefs

Cf. A137366.
Cf. A024975 (a^3+b^3+c^3, a>b>c>0), A122723 (primes in A024975), A138853-A138854.

Programs

  • Maple
    # From R. J. Mathar: (Start)
    isA030078 := proc(n) local cbr; cbr := floor(root[3](n)) ; if cbr^3 = n and isprime(cbr) then true ; else false; fi ; end:
    isA137365 := proc(n) local p1,p2,p3,p3cub ; if isprime(n) then p1 := 2 ; while p1^3 <= n-16 do p2 := nextprime(p1) ; while p1^3+p2^3 <= n-8 do p3cub := n-p1^3-p2^3 ; if p3cub> p2^3 and isA030078(p3cub) then RETURN(true) ; fi ; p2 := nextprime(p2) ; od: p1 := nextprime(p1) ; od; RETURN(false) ; else RETURN(false) ; fi ; end:
    for i from 1 do if isA137365( ithprime(i)) then printf("%d\n",ithprime(i)) ; fi ; od:
    # (End)
  • Mathematica
    Array[r, 99]; Array[y, 99]; For[i = 0, i < 10^2, r[i] = y[i] = 0; i++ ]; z = 4^2; n = 0; For[i1 = 1, i1 < z, a = Prime[i1]; a2 = a^3; For[i2 = i1 + 1, i2 < z, b = Prime[i2]; b2 = b^3; For[i3 = i2 + 1, i3 < z, c = Prime[i3]; c2 = c^3; p = a2 + b2 + c2; If[PrimeQ[p], Print[a2, " + ", b2, " + ", c2, " = ", p]; n++; r[n] = p]; i3++ ]; i2++ ]; i1++ ]; Sort[Array[r, 88]] (* Vladimir Joseph Stephan Orlovsky *)
    lst = {}; Do[p = Prime[q]^3 + Prime[r]^3 + Prime[s]^3; If[PrimeQ@ p, AppendTo[lst, p]], {q, 13}, {r, q - 1}, {s, r - 1}]; Take[Sort@ lst, 36] (* Robert G. Wilson v, Apr 13 2008 *)
    nn=20; lim=Prime[nn]^3+3^3+5^3; Union[Select[Total[#^3]& /@ Subsets[Prime[Range[2,nn]], {3}], #Harvey P. Dale, Jan 15 2011 *)
  • PARI
    c=0; forprime(p=1,10^6, isA138853(p) & write("b137365.txt",c++," ",p)) \\ M. F. Hasler, Apr 13 2008

Formula

A137365 = A000040 intersect A138853 = A000040 intersect A138854. - M. F. Hasler, Apr 13 2008

Extensions

Corrected and extended by Zak Seidov, R. J. Mathar and Robert G. Wilson v, Apr 12 2008
Further edits by R. J. Mathar and N. J. A. Sloane, Jun 07 2008

A138853 Numbers which are the sum of 3 cubes of distinct odd primes.

Original entry on oeis.org

495, 1483, 1701, 1799, 2349, 2567, 2665, 3555, 3653, 3871, 5065, 5283, 5381, 6271, 6369, 6587, 7011, 7137, 7229, 7235, 7327, 7453, 8217, 8315, 8441, 8533, 9083, 9181, 9399, 10387, 11799, 11897, 12115, 12319, 12537, 12635, 13103, 13525, 13623, 13841
Offset: 1

Views

Author

M. F. Hasler, Apr 13 2008

Keywords

Comments

Dropping the restriction to odd primes would add to this sequence of odd terms the sequence of even terms of the form 8+p(i)^3+p(j)^3 (i>j>1), i.e. 8+{ even terms of A120398 }, cf. A138854.

Crossrefs

Cf. A024975 (a^3+b^3+c^3, a>b>c>0), A138854, A120398.

Programs

  • PARI
    isA138853(n)= local( c,d); n>494 && forprime( p=floor( sqrtn( n\3+1,3))+1, floor( sqrtn( n-151,3)), d=n-p^3; forprime( q=floor( sqrtn( d\2+1,3))+1, min( p-1, floor( sqrtn( d-26,3))), round( sqrtn( c=d-q^3,3 ))^3==c || next; isprime( round( sqrtn( c,3 ))) && return(1)))
    forstep(n=3^3+5^3+7^3,10^5,2, isA138853(n)&print1(n", "))

Formula

A138853={ p(i)^3+p(j)^3+p(k)^3 ; i>j>k>1 }

A258865 Numbers that are a sum of the cubes of three primes.

Original entry on oeis.org

24, 43, 62, 81, 141, 160, 179, 258, 277, 359, 375, 378, 397, 476, 495, 593, 694, 713, 811, 1029, 1347, 1366, 1385, 1464, 1483, 1581, 1682, 1701, 1799, 2017, 2213, 2232, 2251, 2330, 2349, 2447, 2548, 2567, 2665, 2670, 2689, 2787, 2883, 3005, 3536, 3555
Offset: 1

Views

Author

R. J. Mathar, Jun 12 2015

Keywords

Comments

The subsequence of cubes in the sequence starts 505^3, 535^3, 709^3, 865^3, 1033^3, 1037^3, 1067^3, 1133^3, 1513^3, ... See A258262.

Examples

			2^3+2^3+2^3=24. 2^3+2^3+3^3=43. 2^3+3^3+3^3=62. 3^3+3^3+3^3=81.
		

Crossrefs

Cf. A030078, A258262 (subsequence).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, fromList)
    import qualified Data.Set as Set (union)
    import qualified Data.List.Ordered as List (union)
    a258865 n = a258865_list !! (n-1)
    a258865_list = tail $ f (singleton 1) 1 [] [] a030078_list where
       f s z vs qcs pcs'@(pc:pcs)
         | m < z = m : f s' z vs qcs pcs'
         | otherwise = f (Set.union s $ fromList $ map (+ pc) ws)
                         pc ws (pc:qcs) pcs
         where ws = List.union vs $ map (+ pc) (pc : qcs)
               (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Jun 13 2015
    
  • Maple
    A258865 := proc(lim)
        local a,p,q,r ;
        a := {} ;
        p := 2 ;
        while p^3 < lim do
            q := p ;
            while p^3 +q^3< lim do
                r := q ;
                while p^3+q^3+r^3 <= lim do
                    a := a union {p^3+q^3+r^3} ;
                    r := nextprime(r) ;
                end do:
                q := nextprime(q) ;
            end do:
            p := nextprime(p) ;
        end do ;
        a ;
    end proc:
    A258865(30000) ;
  • Mathematica
    lim = 15; Take[Sort@ DeleteDuplicates[Total /@ (Tuples[Prime@ Range@ lim, 3]^3)], 3 lim] (* Michael De Vlieger, Jun 12 2015 *)
  • PARI
    list(lim)=my(v=List(), P=apply(p->p^3,primes(sqrtnint(lim\=1,3)))); foreach(P,p, foreach(P,q, my(s=p+q,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

Formula

a(n) = A030078(i)+A030078(j)+A030078(k) for some triple (i,j,k).
By a counting argument a(n) >> n log^3 n and hence the sequence is of density 0. - Charles R Greathouse IV, Aug 09 2021

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

A138855 Half-sum (or average) of cubes of two distinct odd primes.

Original entry on oeis.org

76, 185, 234, 679, 728, 837, 1112, 1161, 1270, 1764, 2470, 2519, 2628, 3122, 3443, 3492, 3555, 3601, 4095, 4528, 5886, 6097, 6146, 6255, 6749, 7182, 8540, 9513, 12208, 12257, 12366, 12860, 13293, 14651, 14909, 14958, 15067, 15561, 15624, 15994
Offset: 1

Views

Author

M. F. Hasler, Apr 13 2008

Keywords

Comments

Even terms of A120398, divided by two. (Terms in A120398 are even iff they are the sum of two odd prime cubes.) Also, even terms of A138854 divided by two minus 4

Crossrefs

Programs

  • Mathematica
    With[{nn=40},Take[Union[Mean/@(Subsets[Prime[Range[2,nn/2]],{2}]^3)],nn]] (* Harvey P. Dale, Nov 16 2013 *)
  • PARI
    for(n=1,10^5, isA120398(2*n) & print1(n", "))

Formula

A138855 = { ( prime(i)^3+prime(j)^3 )/2 ; i>j>1 } = (1/2) { even terms in A120398 } = { even terms in A138854 } / 2 - 4.
Showing 1-5 of 5 results.