login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100499 Smallest cube that is the sum of n positive squares. 2
1, 8, 27, 27, 8, 27, 27, 8, 27, 27, 27, 27, 27, 64, 27, 27, 64, 27, 27, 64, 27, 64, 64, 27, 64, 64, 27, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 125, 64, 64, 125, 64, 64, 125, 64, 125, 125, 64, 125, 125, 64, 125, 125, 125, 125 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

It appears that for n in [k^3+1,(k+1)^3], a(n) is either (k+1)^3 or (k+2)^3. The Mathematica code uses backtracking to find the least cube for each n. - T. D. Noe (noe(AT)sspectra.com), Jan 03 2005

EXAMPLE

Here are the initial solutions: cube = {list of n numbers whose squares sum to the smallest cube}:

1 = {1}

8 = {2, 2}

27 = {1, 1, 5}

27 = {1, 1, 3, 4}

8 = {1, 1, 1, 1, 2}

27 = {1, 1, 1, 2, 2, 4}

27 = {1, 1, 2, 2, 2, 2, 3}

8 = {1, 1, 1, 1, 1, 1, 1, 1}

27 = {1, 1, 1, 1, 1, 1, 1, 2, 4}

MATHEMATICA

$RecursionLimit=1000; try2[lev_] := Module[{t, j, ss}, ss=Plus@@(Take[soln, lev-1]^2); If[lev>n, If[ss<=sumMax&&IntegerQ[ss^(1/3)]&&ss<minSum, minSum=ss; bestSoln={ss, soln}], If[lev==1, t=1, t=soln[[lev-1]]]; j=t; While[ss+(n-lev+1)*j^2<=sumMax, soln[[lev]]=j; try2[lev+1]; soln[[lev]]=t; j++ ]]]; Table[minSum=Infinity; bestSoln={}; sumMax=(Ceiling[n^(1/3)]+1)^3; soln=Table[1, {n}]; try2[1]; bestSoln[[1]], {n, 100}]

CROSSREFS

Cf. A102313 (least k such that k^3 is the sum of n positive squares).

Sequence in context: A070721 A070501 A070500 * A070499 A077107 A070498

Adjacent sequences:  A100496 A100497 A100498 * A100500 A100501 A100502

KEYWORD

easy,nonn

AUTHOR

Giovanni Teofilatto (g.teofilatto(AT)tiscalinet.it), Dec 31 2004

EXTENSIONS

Corrected and extended by T. D. Noe, Jan 01, 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 06:44 EST 2012. Contains 205865 sequences.