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”).

A211339
Number of integer pairs (x,y) such that 1 < x <= y <= n and x^2 + y^2 <= n.
1
0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 19, 19, 20, 21, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 25, 25, 25, 26, 26, 26, 26, 27, 28, 29
OFFSET
1,5
COMMENTS
Partial sums of A025426.
For a guide to related sequences, see A211266.
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
Cf. A211266.
Sequence in context: A152595 A176844 A085182 * A087739 A375814 A127763
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 08 2012
STATUS
approved