A211648 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2+x^2+y^2=3n.
0, 1, 3, 3, 1, 0, 3, 6, 3, 4, 6, 6, 3, 0, 6, 6, 1, 6, 12, 6, 0, 0, 12, 12, 3, 7, 6, 12, 6, 0, 12, 6, 3, 9, 6, 12, 4, 0, 12, 12, 6, 6, 18, 18, 6, 0, 12, 12, 3, 7, 15, 15, 0, 0, 12, 12, 6, 15, 18, 6, 6, 0, 18, 24, 1, 12, 15, 18, 6, 0, 12, 12, 12, 12, 18, 15, 6, 0, 24, 18, 0, 13, 18
Offset: 0
Keywords
Crossrefs
Cf. A211422.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w^2 + x^2 + y^2 == 3 n, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 100]] (* A211648 *) (* Peter J. C. Moses, Apr 13 2012 *)
Comments