|
Search: id:A101412
|
|
|
| A101412 |
|
Least number of odd squares that sum to n. |
|
+0 2
|
|
| 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 8, 1
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
EXAMPLE
|
a(13) = 5: 13 = 1+1+1+1+9.
|
|
MAPLE
|
A101412 := proc(n) local lsq; lsq := [seq((2*j+1)^2, j=0..floor((sqrt(n)-1)/2))] ; lsq := convert(lsq, set) ; a := n ; for p in combinat[partition](n) do if convert(p, set) minus lsq = {} then a := min(a, nops(p)) ; fi; od: a ; end: for n from 1 do printf("%d, \n", A101412(n)) ; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 08 2009]
|
|
CROSSREFS
|
Cf. A002828, A151925.
Sequence in context: A031076 A053844 A010887 this_sequence A053830 A033929 A025482
Adjacent sequences: A101409 A101410 A101411 this_sequence A101413 A101414 A101415
|
|
KEYWORD
|
nonn,easy,more
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com), Aug 08 2009
|
|
EXTENSIONS
|
More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 08 2009
|
|
|
Search completed in 0.002 seconds
|