Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A100499
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A100499 Smallest cube that is the sum of n positive squares. +0
3
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; listen)
OFFSET

1,2

COMMENT

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).

Adjacent sequences: A100496 A100497 A100498 this_sequence A100500 A100501 A100502

Sequence in context: A070721 A070501 A070500 this_sequence A070499 A077107 A070498

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 7 08:31 EDT 2008. Contains 144667 sequences.


AT&T Labs Research