Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #31 Jul 19 2024 14:25:21
%S 0,0,1,1,1,3,3,3,4,4,6,6,6,8,8,8,8,10,11,11,13,13,13,13,13,15,17,17,
%T 17,19,19,19,20,20,22,22,22,24,24,24,26,28,28,28,28,30,30,30,30,30,33,
%U 33,35,37,37,37,37,37,39,39,39,41,41,41,41,45,45,45,47,47
%N a(n) = number of unit squares in the first quadrant of a disk of radius sqrt(n) centered at the origin of a square lattice.
%H Stefano Spezia, <a href="/A237526/b237526.txt">Table of n, a(n) for n = 0..10000</a>
%F a(A000404(n)) = A232499(n).
%F a(n) = Sum_{k=1..floor(sqrt(n))} floor(sqrt(n-k^2)). - _M. F. Hasler_, Feb 09 2014
%F G.f.: (theta_3(x) - 1)^2/(4*(1 - x)), where theta_3() is the Jacobi theta function. - _Ilya Gutkovskiy_, Apr 17 2018
%F For n > 1, Pi*(n+2-sqrt(8n)) < a(n) < Pi*n. (This is trivial and can probably be improved by methods like Euler-Maclaurin and perhaps even a modification of the Dirichlet hyperbola method.) - _Charles R Greathouse IV_, Jul 17 2024
%t a[n_]:=Sum[Floor[Sqrt[n-k^2]],{k,Floor[Sqrt[n]]}]; Array[a,70,0] (* _Stefano Spezia_, Jul 19 2024 *)
%o (PARI) A237526(n)=sum(k=1,sqrtint(n),sqrtint(n-k^2)) \\ _M. F. Hasler_, Feb 09 2014
%o (Python)
%o from math import isqrt
%o def A237526(n): return sum(isqrt(n-k**2) for k in range(1,isqrt(n)+1)) # _Chai Wah Wu_, Jul 18 2024
%Y Cf. A000404, A001481, A057961, A232499.
%Y Partial sums of A063725.
%K nonn
%O 0,6
%A _L. Edson Jeffery_, Feb 09 2014