OFFSET
1,5
FORMULA
a(n) = -1/2(-1 + floor(sqrt(n/2)))(floor(sqrt(n/2))) + Sum_{k=1..floor(sqrt(n/2))} floor(sqrt(n - k^2)). - Nicholas Stearns, Apr 03 2017
MATHEMATICA
a = 1; b = n; z1 = 120;
t[n_] := t[n] = Flatten[Table[x^2 + y^2, {x, a, b - 1}, {y, x, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
TableForm[Table[c[n, k], {n, 1, 10}, {k, 1, 2 n}]]
Table[c[n, n], {n, 1, z1}] (* A025426 *)
c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, a, m}]
Table[c1[n, n], {n, 1, z1}] (* A211339 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 08 2012
STATUS
approved