OFFSET
0,2
COMMENTS
Number of distinct sums of 6 squares of integers from 0 through n.
EXAMPLE
a(1) = 7 because the 7 distinct sums of squares from 0 through 1 are permutations of 1^2 + 1^1 + 1^2 + 1^2 + 1^2 + 1^2 = 6; 1^1 + 1^2 + 1^2 + 1^2 + 1^2 + 0^2 = 5; 1^1 + 1^2 + 1^2 + 1^2 + 0^2 + 0^2 = 4; 1^1 + 1^2 + 1^2 + 0^2 + 0^2 + 0^2 = 3; 1^1 + 1^2 + 0^2 + 0^2 + 0^2 + 0^2 = 2; 1^1 + 0^2 + 0^2 + 0^2 + 0^2 + 0^2 = 1; 0^2 + 0^1 + 0^2 + 0^2 + 0^2 + 0^2 = 0.
MATHEMATICA
Table[Length@ Union@Flatten@ Table[i^2 + j^2 + k^2 + l^2 + m^2 + n^2, {i, 0, p}, {j, i, p}, {k, j, p}, {l, k, p}, {m, l, p}, {n, m, p}], {p, 0, 40}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Nov 13 2007, Nov 14 2007
EXTENSIONS
Offset corrected by Giovanni Resta, Jun 19 2016
STATUS
approved