OFFSET
1,3
COMMENTS
FORMULA
EXAMPLE
T(2,2)=9 counts 1 pair (0,0) with sum 0, 4 pairs (-1,0),(1,0),(0,-1),(0,1) with sum 1 and 4 pairs (-1,-1),(-1,1),(1,1),(1,-1) with sum 2.
Array T(d,n) with rows d=1,2,3... and columns n=0,1,2,3.. reads
1 3 3 3 5 5 5 5 5 7 7
1 5 9 9 13 21 21 21 25 29 37
1 7 19 27 33 57 81 81 93 123 147
1 9 33 65 89 137 233 297 321 425 569
1 11 51 131 221 333 573 893 1093 1343 1903
1 13 73 233 485 797 1341 2301 3321 4197 5757
1 15 99 379 953 1793 3081 5449 8893 12435 16859
1 17 129 577 1713 3729 6865 12369 21697 33809 47921
1 19 163 835 2869 7189 14581 27253 49861 84663 129303
1 21 201 1161 4541 12965 29285 58085 110105 198765 327829
MAPLE
T := proc(d, n) local i, cnts ; cnts := 0 ; for i from -trunc(sqrt(n)) to trunc(sqrt(n)) do if n-i^2 >= 0 then if d > 1 then cnts := cnts+T(d-1, n-i^2) ; else cnts := cnts+1 ; fi ; fi ; od ; RETURN(cnts) ; end: for diag from 1 to 14 do for n from 0 to diag-1 do d := diag-n ; printf("%d, ", T(d, n)) ; od ; od;
MATHEMATICA
t[d_, n_] := t[d, n] = t[d, n-1] + SquaresR[d, n]; t[d_, 0] = 1; Table[t[d-n, n], {d, 1, 12}, {n, 0, d-1}] // Flatten (* Jean-François Alcover, Jun 13 2013 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
R. J. Mathar, Oct 29 2006, Oct 31 2006
STATUS
approved