login
A119677
a(n) is the number of complete squares that fit inside the circle with radius n, drawn on squared paper at (0, 0).
5
0, 0, 4, 16, 32, 60, 88, 120, 164, 216, 276, 332, 392, 476, 556, 648, 732, 832, 936, 1052, 1176, 1288, 1428, 1560, 1696, 1860, 2016, 2180, 2340, 2512, 2700, 2876, 3080, 3276, 3488, 3712, 3908, 4144, 4360, 4620, 4864, 5096, 5356, 5616, 5900
OFFSET
0,3
FORMULA
a(n) = 4 * A001182(n).
Limit_{n->oo} a(n)/(n^2) = Pi.
MATHEMATICA
a[n_] := 4 Sum[Floor[Sqrt[n^2 - k^2]], {k, n - 1}];
Array[a, 45, 0] (* David Dewan, May 27 2024 *)
PROG
(Python)
from math import isqrt
def A119677(n): return sum(isqrt(k*((n<<1)-k)) for k in range(1, n))<<2 # Chai Wah Wu, Jul 18 2024
CROSSREFS
Cf. A001182.
Sequence in context: A373077 A031050 A243980 * A326873 A126032 A296819
KEYWORD
nonn
AUTHOR
Tomas Kyselica (Tomas.Kyselica(AT)gmail.com), Jul 29 2006
EXTENSIONS
More terms from Don Reble, Aug 01 2006
Name clarified by Kirill Zolotuskiy, Apr 15 2023
STATUS
approved