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 15 results. Next

A003072 Numbers that are the sum of 3 positive cubes.

Original entry on oeis.org

3, 10, 17, 24, 29, 36, 43, 55, 62, 66, 73, 80, 81, 92, 99, 118, 127, 129, 134, 136, 141, 153, 155, 160, 179, 190, 192, 197, 216, 218, 225, 232, 244, 251, 253, 258, 270, 277, 281, 288, 307, 314, 342, 344, 345, 349, 352, 359, 368, 371, 375, 378, 397, 405, 408, 415, 433, 434
Offset: 1

Views

Author

Keywords

Comments

A119977 is a subsequence; if m is a term then there exists at least one k>0 such that m-k^3 is a term of A003325. - Reinhard Zumkeller, Jun 03 2006
A025456(a(n)) > 0. - Reinhard Zumkeller, Apr 23 2009
Davenport proved that a(n) << n^(54/47 + e) for every e > 0. - Charles R Greathouse IV, Mar 26 2012

Examples

			a(11) = 73 = 1^3 + 2^3 + 4^3, which is sum of three cubes.
a(15) = 99 = 2^3 + 3^3 + 4^3, which is sum of three cubes.
		

Crossrefs

Subsequence of A004825.
Cf. A003325, A024981, A057904 (complement), A010057, A000578, A023042 (subsequence of cubes).
Cf. A###### (x, y) = Numbers that are the sum of x nonzero y-th powers:
- squares: A000404 (2, 2), A000408 (3, 2), A000414 (4, 2), A047700 (5, 2);
- cubes: A003325 (2, 3), A003072 (3, 3), A003327 (4, 3), A003328 (5, 3), A003329 (6, 3), A003330 (7, 3), A003331 (8, 3), A003332 (9, 3), A003333 (10, 3), A003334 (11, 3), A003335 (12, 3);
- fourth powers: A003336 (2, 4), A003337 (3, 4), A003338 (4, 4), A003339 (5, 4), A003340 (6, 4), A003341 (7, 4), A003342 (8, 4), A003343 (9, 4), A003344 (10, 4), A003345 (11, 4), A003346 (12, 4);
- fifth powers: A003347 (2, 5), A003348 (3, 5), A003349 (4, 5), A003350 (5, 5), A003351 (6, 5), A003352 (7, 5), A003353 (8, 5), A003354 (9, 5), A003355 (10, 5), A003356 (11, 5), A003357 (12, 5);
- sixth powers: A003358 (2, 6), A003359 (3, 6), A003360 (4, 6), A003361 (5, 6), A003362 (6, 6), A003363 (7, 6), A003364 (8, 6), A003365 (9, 6), A003366 (10, 6), A003367 (11, 6), A003368 (12, 6);
- seventh powers: A003369 (2, 7), A003370 (3, 7), A003371 (4, 7), A003372 (5, 7), A003373 (6, 7), A003374 (7, 7), A003375 (8, 7), A003376 (9, 7), A003377 (10, 7), A003378 (11, 7), A003379 (12, 7);
- eighth powers: A003380 (2, 8), A003381 (3, 8), A003382 (4, 8), A003383 (5, 8), A003384 (6, 8), A003385 (7, 8), A003386 (8, 8), A003387 (9, 8), A003388 (10, 8), A003389 (11, 8), A003390 (12, 8);
- ninth powers: A003391 (2, 9), A003392 (3, 9), A003393 (4, 9), A003394 (5, 9), A003395 (6, 9), A003396 (7, 9), A003397 (8, 9), A003398 (9, 9), A003399 (10, 9), A004800 (11, 9), A004801 (12, 9);
- tenth powers: A004802 (2, 10), A004803 (3, 10), A004804 (4, 10), A004805 (5, 10), A004806 (6, 10), A004807 (7, 10), A004808 (8, 10), A004809 (9, 10), A004810 (10, 10), A004811 (11, 10), A004812 (12, 10);
- eleventh powers: A004813 (2, 11), A004814 (3, 11), A004815 (4, 11), A004816 (5, 11), A004817 (6, 11), A004818 (7, 11), A004819 (8, 11), A004820 (9, 11), A004821 (10, 11), A004822 (11, 11), A004823 (12, 11).

Programs

  • Haskell
    a003072 n = a003072_list !! (n-1)
    a003072_list = filter c3 [1..] where
       c3 x = any (== 1) $ map (a010057 . fromInteger) $
                           takeWhile (> 0) $ map (x -) $ a003325_list
    -- Reinhard Zumkeller, Mar 24 2012
  • Maple
    isA003072 := proc(n)
        local x,y,z;
        for x from 1 do
            if 3*x^3 > n then
                return false;
            end if;
            for y from x do
                if x^3+2*y^3 > n then
                    break;
                end if;
                if isA000578(n-x^3-y^3) then
                    return true;
                end if;
            end do:
        end do:
    end proc:
    for n from 1 to 1000 do
        if isA003072(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 23 2016
  • Mathematica
    Select[Range[435], (p = PowersRepresentations[#, 3, 3]; (Select[p, #[[1]] > 0 && #[[2]] > 0 && #[[3]] > 0 &] != {})) &] (* Jean-François Alcover, Apr 29 2011 *)
    With[{upto=500},Select[Union[Total/@Tuples[Range[Floor[Surd[upto-2,3]]]^3,3]],#<=upto&]] (* Harvey P. Dale, Oct 25 2021 *)
  • PARI
    sum(n=1,11,x^(n^3),O(x^1400))^3 /* Then [i|i<-[1..#%],polcoef(%,i)] gives the list of powers with nonzero coefficient. - M. F. Hasler, Aug 02 2020 */
    
  • PARI
    list(lim)=my(v=List(),k,t); lim\=1; for(x=1,sqrtnint(lim-2,3), for(y=1, min(sqrtnint(lim-x^3-1,3),x), k=x^3+y^3; for(z=1,min(sqrtnint(lim-k,3), y), listput(v, k+z^3)))); Set(v) \\ Charles R Greathouse IV, Sep 14 2015
    

Formula

{n: A025456(n) >0}. - R. J. Mathar, Jun 15 2018

Extensions

Incorrect program removed by David A. Corneth, Aug 01 2020

A226903 Shiraishi numbers: a parametrized family of solutions c to the Diophantine equation a^3 + b^3 + c^3 = d^3 with d = c+1.

Original entry on oeis.org

5, 18, 53, 102, 197, 306, 491, 684, 989, 1290, 1745, 2178, 2813, 3402, 4247, 5016, 6101, 7074, 8429, 9630, 11285, 12738, 14723, 16452, 18797, 20826, 23561, 25914, 29069, 31770, 35375, 38448, 42533, 46002, 50597, 54486, 59621, 63954, 69659, 74460, 80765, 86058
Offset: 1

Views

Author

Jonathan Sondow, Jun 22 2013

Keywords

Comments

Shiraishi's solutions to a^3 + b^3 + c^3 = d^3 are a = 3n^2; b = 6n^2 - 3n + 1 or 6n^2 + 3n + 1; c = 9n^3 - 6n^2 + 3n - 1 or 9n^3 + 6n^2 + 3n, respectively, for n > 0; and d = c+1. See Smith and Mikami for a derivation.
Shiraishi's formulas show that the sequence is infinite. Hence the sequences A023042 (solutions to x^3 + y^3 + z^3 = w^3), A225908 (solutions to a^3 + b^3 = c^3 - d^3), A225909 (solutions to a^3 + b^3 = (c+1)^3 - c^3) and A226902 (numbers c in A225909) are also infinite.
Shiraishi's solution b = 6n^2 +/- 3n + 1 is the centered triangular numbers A005448 except 1.

Examples

			The first two terms are a(1) = 9 - 6 + 3 - 1 = 5 and a(2) = 9 + 6 + 3 = 18. Then Shiraishi's formulas give 3^3 + 4^3 + 5^3 = 6^3 and 3^3 + 10^3 + 18^3 = 19^3.
		

References

  • Shiraishi Chochu (aka Shiraishi Nagatada), Shamei Sampu (Sacred Mathematics), 1826.

Crossrefs

Formula

a(2n-1) = 9n^3 - 6n^2 + 3n - 1.
a(2n) = 9n^3 + 6n^2 + 3n.
G.f.: x*(5 + 13*x + 20*x^2 + 10*x^3 + 5*x^4 + x^5) / ((1 + x)^3*(1 - x)^4). [Bruno Berselli, Jun 22 2013]
a(n) = (18*n^3 + 27*n^2 + 27*n + 1 - (3*n^2 + 3*n + 1)*(-1)^n)/16. [Bruno Berselli, Jun 22 2013]
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n > 7. - Chai Wah Wu, Aug 05 2025

A114923 Primes p such that there exist three primes q, r and s with p^3=q^3+r^3+s^3.

Original entry on oeis.org

709, 1033, 2767, 2791, 2917, 3727, 3769, 5647, 5657, 5737, 7039, 7321, 8089, 8291, 8387, 9433, 9473, 9851, 12073, 12343, 13417, 14083, 14561, 14723, 14831, 14969, 15313, 18127, 19841, 25033, 28081, 28477, 29153, 29179, 32771, 33161, 33199, 33377, 34337, 36713
Offset: 1

Views

Author

Keywords

Comments

The sets of three primes corresponding to the first seven terms of the sequence are respectively {193,461,631}, {599,691,823}, {103,2179,2213}, {769,1879,2447}, {31,1951,2591}, {1399,1667,3541} and {11,1783,3631}. - Robert G. Wilson v, Jan 09 2006
The sets of three primes corresponding to the next eight terms of the sequence are respectively {2251, 3121, 5171}, {1487, 2731, 5399}, {839, 3691, 5167}, {2099, 2377, 6883}, {3163, 5443, 5843}, {1621, 6323, 6481}, {2357, 4999, 7559} and {1621, 5297, 7589}. - Robert G. Wilson v, Jan 09 2006
The indices of the primes: 127,174,403,406,422,520,525,742,745,754,905,933,1017,1040,1050, ..., . - Robert G. Wilson v, Jan 09 2006
The sets of three primes corresponding to the terms 12073, 12343, 13417, 14083, 14561, 14723, 14831, 14969, 15313, 18127, 19841 and 25033 are respectively {4007, 4327, 11731}, {373, 9209, 10321}, {5099, 7561, 12277}, {4639, 7129, 13259}, {1997, 8599, 13469}, {3881, 6427, 14207}, {6257, 9439, 12959}, {2239, 5189, 14741}, {2269, 2969, 15259}, {2129, 5227, 17971}, {3931, 15263, 16127} and {4093, 19391, 20269}. The indices of the primes: 127, 174, 403, 406, 422, 520, 525, 742, 745, 754, 905, 933, 1017, 1040, 1050, 1168, 1174, 1215, 1446, 1474, 1591, 1661, 1707, 1723, 1738, 1753, 1789, 2077, 2244, 2765. - Farideh Firoozbakht, Jan 27 2006

Examples

			The prime number 3769 is in the sequence because we have 3769^3=11^3+1783^3+3631^3 and three numbers 11, 1783 and 3631 are primes.
		

Crossrefs

Subset of A023042.

Programs

  • Maple
    N:= 20000: # to get all terms <= N
    Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
    P2:= {seq(seq(Primes[i]^3 + Primes[j]^3, j=1..i),i=1..nops(Primes))}:
    Q:= convert(map(t->-t^3,Primes),set):
    filter:= p -> P2 intersect map(`+`,Q,p^3) <> {}:
    select(filter, Primes); # Robert Israel, Jan 11 2016
  • Mathematica
    t = {}; Do[ If[p = (Prime[q]^3 + Prime[r]^3 + Prime[s]^3)^(1/3); PrimeQ[p], AppendTo[t, p]; Print[{p, Prime[s], Prime[r], Prime[q]}]], {q, 3, 1059}, {r, q-1}, {s, r-1}]; t (* Robert G. Wilson v, Jan 09 2006 *)
  • PARI
    is(p)=my(p3=p^3,a3,A,c);if(isprimepower(p3-16)==3, return(1)); forprime(a=sqrtnint(p3\3,3),sqrtnint(p3-54,3), a3=a^3; A=p3-a3; forprime(b=3,min(sqrtnint(A,3),a), if(ispower(A-b^3,3,&c) && isprime(c), return(isprime(p))))) \\ Charles R Greathouse IV, Nov 24 2017

Extensions

a(8)-a(18) from Robert G. Wilson v, Jan 09 2006
a(19)-a(30) from Farideh Firoozbakht, Jan 27 2006
a(31)-a(40) from Chai Wah Wu, Jan 10 2016

A225908 Numbers that are both a sum and a difference of two positive cubes.

Original entry on oeis.org

91, 152, 189, 217, 513, 728, 1027, 1216, 1512, 1736, 2457, 3087, 4104, 4706, 4921, 4977, 5103, 5256, 5824, 5859, 6832, 7657, 8216, 8587, 9728, 10712, 11375, 12096, 12691, 13851, 13888, 14911, 15093, 15561, 16120, 16263, 19000, 19656, 21014, 23058, 23625, 24696
Offset: 1

Views

Author

Jonathan Sondow, Jun 21 2013

Keywords

Comments

Solutions x to the equations x = a^3 + b^3 = c^3 - d^3 in positive integers.
The intersection of A003325 and A181123. See those sequences for additional comments, references, links and cross-refs.
Suggested by Shiraishi's solutions to Gokai Ampon's equation u^3 + v^3 + w^3 = n^3 (transpose a term from the left side to the right side). See A023042 and A226903.
An infinite subsequence is (A226904(n)+1)^3 - A226904(n)^3.

Examples

			3^3 + 4^3 + 5^3 = 6^3, so 3^3 + 4^3 = 91 and 3^3 + 5^3 = 152 and 4^3 + 5^3 = 189 are members.
		

References

  • Shiraishi Chochu (aka Shiraishi Nagatada), Shamei Sampu (Sacred Mathematics), 1826.

Crossrefs

Programs

  • Mathematica
    nn = 3*10^4; t1 = Union[Flatten[Table[x^3 + y^3, {x, nn^(1/3)}, {y, x, (nn - x^3)^(1/3)}]]]; p = 3; t2 = Union[Reap[Do[n = i^p - j^p; If[n <= nn, Sow[n]], {i, Ceiling[(nn/p)^(1/(p - 1))]}, {j, i}]][[2, 1]]]; Intersection[t1, t2] (* T. D. Noe, Jun 21 2013 *)

A306213 Numbers that are the sum of cubes of three distinct positive integers in arithmetic progression.

Original entry on oeis.org

36, 99, 153, 216, 288, 405, 408, 495, 645, 684, 792, 855, 972, 1071, 1197, 1224, 1407, 1548, 1584, 1701, 1728, 1968, 2079, 2241, 2304, 2403, 2541, 2673, 2736, 3051, 3060, 3240, 3264, 3537, 3540, 3888, 3960, 4059, 4131, 4257, 4500, 4587, 4833, 5049, 5160, 5256, 5472, 5643, 5832, 5940, 6336, 6369, 6669
Offset: 1

Views

Author

Antonio Roldán, Jan 29 2019

Keywords

Comments

Numbers that can be written as 3*a*(a^2 + 2*b^2) = (a-b)^3 + a^3 + (a+b)^3 where 0 < b < a. - Robert Israel, Dec 15 2022

Examples

			153 = 1^3 + 3^3 + 5^3, with 3 - 1 = 5 - 3 = 2;
972 = 3^3 + 6^3 + 9^3, with 6 - 3 = 9 - 6 = 3.
		

Crossrefs

Programs

  • Maple
    N:= 10000: # for terms <= N
    S:= {}:
    for a from 1 while a^3 + (a+1)^3 + (a+2)^3 <= N do
      for d from 1 do
        x:= a^3 + (a+d)^3 + (a+2*d)^3;
        if x > N then break fi;
        S:= S union {x}
    od od:
    sort(convert(S,list)); # Robert Israel, Dec 14 2022
  • PARI
    for(n=3, 7000, k=(n/3)^(1/3); a=2; v=0; while(a<=k&&v==0, b=(n-3*a^3)/(6*a); if(b==truncate(b)&&issquare(b), d=sqrt(b), d=0); if(d>=1&&d<=a-1, v=1; print1(n,", ")); a+=1))
    
  • PARI
    w=List(); for(n=3, 7000, k=(n/3)^(1/3); for(a=2, k, for(c=1, a-1, v=(a-c)^3+a^3+(a+c)^3; if(v==n, listput(w,n))))); print(vecsort(Vec(w),,8))

A297305 Numbers k such that k^4 can be written as a sum of five positive 4th powers.

Original entry on oeis.org

5, 10, 15, 20, 25, 30, 31, 35, 40, 45, 50, 55, 60, 62, 65, 70, 75, 80, 85, 89, 90, 93, 95, 100, 103, 105, 110, 115, 120, 124, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 178, 180, 185, 186, 190, 195, 200, 205, 206, 210, 215, 217, 220, 225, 230, 233
Offset: 1

Views

Author

Seiichi Manyama, Mar 16 2018

Keywords

Comments

If k is in the sequence, then k*m is in the sequence for every positive integer m.

Examples

			    5^4 =  2^4 +  2^4 +  3^4 +  4^4 +   4^4 (=       625).
   31^4 = 10^4 + 10^4 + 10^4 + 17^4 +  30^4 (=    923521).
   89^4 = 10^4 + 35^4 + 52^4 + 60^4 +  80^4 (=  62742241).
  103^4 =  4^4 + 15^4 + 50^4 + 50^4 + 100^4 (= 112550881).
		

Crossrefs

Extensions

a(43)-a(57) from Jon E. Schoenfield, Mar 17 2018

A328149 Numbers whose set of divisors contains a quadruple (x, y, z, w) satisfying x^3 + y^3 + z^3 = w^3.

Original entry on oeis.org

60, 72, 120, 144, 180, 216, 240, 288, 300, 360, 420, 432, 480, 504, 540, 576, 600, 648, 660, 720, 780, 792, 840, 864, 900, 936, 960, 1008, 1020, 1080, 1140, 1152, 1200, 1224, 1260, 1296, 1320, 1368, 1380, 1440, 1500, 1512, 1560, 1584, 1620, 1656, 1680, 1710
Offset: 1

Views

Author

Michel Lagneau, Jun 07 2020

Keywords

Comments

The subsequence of numbers of the form 2^i*3^j is 72, 144, 216, 288, 432, 576, 648, 864, 1152, 1296, ...
The corresponding number of quadruples of the sequence is 1, 1, 2, 2, 2, 2, 3, 3, 2, 6, 2, 4, 4, 2, 3, 4, 4, 3, 2, 10, ... (see the sequence A328204).
The set of divisors of a(n) contains at least one primitive quadruple.
Examples:
The set of divisors of a(1) = 60 contains only one primitive quadruple: (3, 4, 5, 6).
The set of divisors of a(10) = 360 contains two primitive quadruples: (1, 6, 8, 9) and (3, 4, 5, 6).
From Robert Israel, Jul 06 2020: (Start)
Every multiple of a member of the sequence is in the sequence.
The first member of the sequence not divisible by 6 is a(68) = 2380, which has the quadruple (7, 14, 17, 20).
The first odd member of the sequence is a(1230) = 43065, which has the quadruple (11, 15, 27, 29). (End)

Examples

			120 is in the sequence because the set of divisors {1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120} contains the quadruples {3, 4, 5, 6} and {6, 8, 10, 12}. The first quadruple is primitive.
		

References

  • Y. Perelman, Solutions to x^3 + y^3 + z^3 = u^3, Mathematics can be Fun, pp. 316-9 Mir Moscow 1985.

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 3 to 2000 do :
       d:=divisors(n):n0:=nops(d):it:=0:
        for i from 1 to n0-3 do:
         for j from i+1 to n0-2 do :
          for k from j+1 to n0-1 do:
          for m from k+1 to n0 do:
           if d[i]^3 + d[j]^3 + d[k]^3 = d[m]^3
            then
            it:=it+1:
            else
           fi:
          od:
         od:
        od:
        od:
        if it>0 then
        printf(`%d, `,n):
        else fi:
       od:
  • Mathematica
    nq[n_] := If[ Mod[n, 6]>0, 0, Block[{t, u, v, c = 0, d = Divisors[n], m}, m = Length@ d; Do[ t = d[[i]]^3 + d[[j]]^3; Do[u = t + d[[h]]^3; If[u > n^3, Break[]]; If[ Mod[n^3, u] == 0 && IntegerQ[v = u^(1/3)] && Mod[n, v] == 0, c++], {h, j+1, m - 1}], {i, m-3}, {j, i+1, m - 2}]; c]]; Select[ Range@ 1026, nq[#] > 0 &] (* program from Giovanni Resta adapted for the sequence. See A330893 *)
  • PARI
    isok(n) = {my(d=divisors(n), m); if (#d > 3, for (i=1, #d-3, for (j=i+1, #d-2, for (k=j+1, #d-1, if (ispower(d[i]^3+d[j]^3+d[k]^3, 3, &m) && !(n%m), return (1));););););} \\ Michel Marcus, Nov 15 2020

A225909 Numbers that are both a sum of two positive cubes and a difference of two consecutive cubes.

Original entry on oeis.org

91, 217, 1027, 4921, 8587, 14911, 31519, 39331, 106597, 117019, 136747, 185257, 195841, 265519, 281827, 616987, 636181, 684019, 712969, 724717, 736561, 955981, 1200169, 1352737, 1405621, 1771777, 2481571, 2756167, 2937331, 4251871, 4996171, 5262901
Offset: 1

Views

Author

Jonathan Sondow, Jun 21 2013

Keywords

Comments

Solutions x to the equations x = a^3 + b^3 = (c+1)^3 - c^3 in positive integers. The values of c are A226902.
The intersection of A003325 and A003215.
Subsequence of A225908 = numbers that are both a sum and a difference of two positive cubes.
Shiraishi's solution to Gokai Ampon's equation u^3 + v^3 + w^3 = n^3 (see A023042 and A226903) shows that the sequence is infinite.

Examples

			3^3 + 4^3 = 6^3 - 5^3 = 91, so 91 is a member.
		

References

  • Shiraishi Chochu (aka Shiraishi Nagatada), Shamei Sampu (Sacred Mathematics), 1826.

Crossrefs

Programs

Formula

a(n) = (A226902(n)+1)^3 - A226902(n)^3.

A346071 a(n) is the smallest number m such that m^3 = x^3 + y^3 + z^3, x > y > z > 0, has at least n different solutions.

Original entry on oeis.org

6, 18, 54, 87, 108, 174, 174, 324, 324, 324, 492, 492, 492, 984, 984, 1296, 1296, 1296, 1440, 1440, 2592, 2592, 2592, 2592, 3960, 3960, 3960, 3960, 4320, 4320, 4320, 5760, 5940, 5940, 5940, 5940, 5940, 5940, 8640, 9900, 9900, 9900, 11880, 11880, 11880, 11880, 11880
Offset: 1

Views

Author

Sebastian Magee, Jul 30 2021

Keywords

Comments

a(n) is the smallest number for which there are at least n sets of positive integers (b_i, c_i, d_i) i=1..n which satisfy the equation a(n)^3 = b_i^3 + c_i^3 + d_i^3.
This sequence is related to Euler's sum of powers conjecture. In particular to the case k=3, a(n) is the smallest number that has at least n different solutions to the equation.
The sequences of numbers whose cubes can be expressed as the sum of 3 positive cubes in at least n ways for n = 1, 2, 3, ... form a family of related sequences. This sequence is the sequence of first terms in that family of sequences.
The first of this family is A023042.

Examples

			a(1) = 6 because 6^3 = 5^3 + 4^3 + 3^3; 6 = a(1) = A023042(1).
a(2) = 18 because 18^3 = 15^3 + 12^3 + 9^3 = 16^3 + 12^3 + 2^3.
a(3) = 54 because 54^3 = 45^3 + 36^3 + 27^3 = 48^3 + 36^3 + 6^3 = 53^3 + 19^3 + 12^3.
		

Crossrefs

Programs

  • Python
    import numpy as np
    def residual(a,b,c,d, exp=3):
        return a**exp-b**exp-c**exp-d**exp
    def test(max_n,k=3):
        ans=dict()
        for a in range(max_n):
            #print(a)
            for b in range(int(np.ceil((a**k/3)**(1/k))),a):
                n3=a**k-b**k
                for c in range(int(np.ceil((n3/2)**(1/k))),b):
                    m3=n3-c**k
                    if m3<0:
                        break;
                    l=int(np.ceil((m3)**(1/k)))
                    options=[l,l-1]
                    for d in options:
                        res=residual(a,b,c,d, exp=k)
                        if res==0:
                            if a in ans.keys():
                                ans[a].append((a,b,c,d))
                            else:
                                ans[a]=[(a,b,c,d)]
                            #print("found:",(a,b,c,d))
                            break
                        else:
                            #print("tested: {0}, residual: {1}".format((a,b,c,d),res))
                            if res>0:
                                break
        return ans
    def serie(N):
        result=test(N)
        results_by_number_of_answers=[]
        results_by_number_of_answers.append(result)
        temp=dict()
        for k in result.keys():
            if len(result[k])>=2:
                temp[k]=result[k]
        results_by_number_of_answers.append(temp)
        i=3
        while len(temp)>0:
            temp=dict()
            for k in results_by_number_of_answers[-1].keys():
                if len(results_by_number_of_answers[-1][k])>=i:
                    temp[k]=result[k]
            if len(temp)>0:
                results_by_number_of_answers.append(temp)
            i+=1
        return [next(iter(a)) for a in results_by_number_of_answers]
    #Get the elements of the serie up until A_n>1000
    A=serie(1000)
    print(A)
    
  • Python
    from itertools import combinations
    from collections import Counter
    from sympy import integer_nthroot
    def icbrt(n): return integer_nthroot(n, 3)[0]
    def aupto(mmax):
        cbs = [i**3 for i in range(mmax+1)]
        cbsset = set(cbs)
        c = Counter(sum(c) for c in combinations(cbs, 3) if sum(c) in cbsset)
        nmax = max(c.values())
        return [min(icbrt(s) for s in c if c[s] >= n) for n in range(1, nmax+1)]
    print(aupto(500)) # Michael S. Branicky, Sep 04 2021

Extensions

a(16)-a(31) from Jinyuan Wang, Aug 02 2021
More terms from David A. Corneth, Sep 04 2021

A066890 Cubes that are the sum of three distinct positive cubes.

Original entry on oeis.org

216, 729, 1728, 5832, 6859, 8000, 13824, 15625, 19683, 21952, 24389, 27000, 46656, 54872, 64000, 68921, 74088, 85184, 91125, 97336, 110592, 125000, 148877, 157464, 175616, 185193, 195112, 216000, 250047, 287496, 300763, 328509, 343000, 357911, 373248, 421875
Offset: 1

Views

Author

Harvey P. Dale, Jan 22 2002

Keywords

Examples

			729 is included because it is 9^3 and 1^3 + 6^3 + 8^3 = 729.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), pp. 130, 147.

Programs

  • Mathematica
    maxCube = (m = 67)^3; Reap[ Do[ bmax = (maxCube - a^3)^(1/3) // Ceiling; Do[ cmax = (maxCube - b^3)^(1/3) // Ceiling; Do[ n = a^3 + b^3 + c^3; If[n <= maxCube, If[ IntegerQ[n^(1/3)], Sow[n]]], {c, b, cmax}], {b, a, bmax}], {a, 1, (maxCube - 2)^(1/3) // Ceiling}]][[2, 1]] // Flatten // Union (* Jean-François Alcover, Mar 07 2013 *)

Formula

a(n) = (A023042(n))^3. - Christian N. K. Anderson, Aug 10 2014

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 06 2012
Showing 1-10 of 15 results. Next