login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212091
Number of (w,x,y,z) with all terms in {1,...,n} and w^2=x^2+y^2+z^2.
3
0, 0, 0, 3, 3, 3, 6, 12, 12, 24, 24, 33, 36, 42, 48, 63, 63, 72, 84, 99, 99, 132, 141, 159, 162, 174, 180, 219, 225, 243, 258, 282, 282, 330, 339, 369, 381, 405, 420, 465, 465, 492, 525, 558, 567, 627, 645, 681, 684, 732, 744, 804, 810, 846, 885, 930
OFFSET
0,4
COMMENTS
Every term is divisible by 3. For a guide to related sequences, see A211795.
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w^2 == x^2 + y^2 + z^2, s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 50]] (* A212091 *)
%/3 (* integers *)
(* Peter J. C. Moses, Apr 13 2012 *)
CROSSREFS
Cf. A211795.
Partial sums of A181787.
Sequence in context: A113920 A081848 A079988 * A061021 A126608 A088195
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 02 2012
STATUS
approved