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

A211340
Number of integer pairs (x,y) such that 1<x<=y<=n and x^2+y^2<=n^2.
3
0, 1, 3, 5, 9, 13, 17, 23, 30, 38, 45, 53, 64, 74, 86, 97, 110, 123, 138, 154, 168, 186, 203, 220, 241, 261, 282, 302, 324, 348, 370, 396, 421, 448, 476, 501, 531, 558, 591, 622, 651, 684, 717, 753, 788, 821, 858, 894, 933, 973, 1014, 1054, 1093, 1135
OFFSET
1,3
COMMENTS
For a guide to related sequences, see A211266.
LINKS
MAPLE
N:= 100: # for a(1)..a(N)
V:= Vector(N):
for y from 1 to N-1 do
for x from 1 to y do
r:= x^2 + y^2;
if r > N^2 then break fi;
t:= ceil(sqrt(r));
V[t]:= V[t]+1
od od:
ListTools:-PartialSums(convert(V, list)); # Robert Israel, Jun 04 2019
MATHEMATICA
a = 1; b = n; z1 = 120;
t[n_] := t[n] = Flatten[Table[x^2 + y^2, {x, a, b - 1}, {y, x, b}]] (* 1<=x<=y<=n *)
c[n_, k_] := c[n, k] = Count[t[n], k]
TableForm[Table[c[n, k], {n, 1, 7}, {k, 1, n^2}]]
Table[c[n, n^2], {n, 1, z1}] (* A046080 *)
c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, a, m}]
Table[c1[n, n^2], {n, 1, z1/2}] (* A211340 *)
CROSSREFS
Sequence in context: A183859 A096228 A185170 * A061571 A049690 A080075
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 08 2012
STATUS
approved