OFFSET
0,8
COMMENTS
For a guide to related sequences, see A211422.
LINKS
David A. Corneth, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = A211639(n-1). - R. J. Mathar, Jun 16 2023
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w^2 + x^2 + y^2 < n, s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 80]] (* A211638 *)
(* Peter J. C. Moses, Apr 13 2012 *)
PROG
(PARI) first(n) = {n = max(n, 2); n-=2; my(res = vector(n), v = vector(n)); forvec(x = vector(3, i, [1, sqrtint(n)]), c = sum(i = 1, 3, x[i]^2); if(c <= n, v[c]++)); for(i = 2, #v, v[i]+=v[i-1]); concat([0, 0], v)} \\ David A. Corneth, Jun 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 18 2012
STATUS
approved