A180466 The number of representations of n as a minimal number of squares, A002828(n).
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 3, 3, 1, 2, 1, 2, 3, 1, 2, 4, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 2, 1, 2, 3, 4, 1, 1, 1, 1, 3, 1, 2, 3, 1, 1, 1, 3, 1
Offset: 1
Keywords
Examples
27 has the following representations as the sum of 4 or fewer squares: 1+1+25, 9+9+9, and 1+1+9+16. The minimal number of squares is 3 and there are 2 such representations. Hence a(27)=2.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Table[r=PowersRepresentations[n,4,2]; Sort[Tally[4-Count[#,0]& /@ r]][[1,2]], {n,100}]
Comments