login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136485 Number of unit square lattice cells enclosed by origin centered circle of diameter n. 4

%I #15 Jul 30 2023 02:14:21

%S 0,0,4,4,12,16,24,32,52,60,76,88,112,120,148,164,192,216,256,276,308,

%T 332,376,392,440,476,524,556,608,648,688,732,796,832,904,936,1012,

%U 1052,1124,1176,1232,1288,1372,1428,1508,1560,1648,1696,1788,1860,1952,2016

%N Number of unit square lattice cells enclosed by origin centered circle of diameter n.

%C a(n) is the number of complete squares that fit inside the circle with diameter n, drawn on squared paper.

%H G. C. Greubel, <a href="/A136485/b136485.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = 4 * Sum_{k=1..floor(n/2)} floor(sqrt((n/2)^2 - k^2)).

%F a(n) = 4 * A136483(n).

%F a(n) = 2 * A136513(n).

%F Lim_{n -> oo} a(n)/(n^2) -> Pi/4 (A003881).

%F a(n) = [x^(n^2)] (theta_3(x^4) - 1)^2 / (1 - x). - _Ilya Gutkovskiy_, Nov 24 2021

%e a(3) = 4 because a circle centered at the origin and of radius 3/2 encloses (-1,-1), (-1,1), (1,-1), (1,1).

%t Table[4*Sum[Floor[Sqrt[(n/2)^2 - k^2]], {k,Floor[n/2]}], {n,100}]

%o (Magma)

%o A136485:= func< n | n le 1 select 0 else 4*(&+[Floor(Sqrt((n/2)^2-j^2)): j in [1..Floor(n/2)]]) >;

%o [A136485(n): n in [1..100]]; // _G. C. Greubel_, Jul 29 2023

%o (SageMath)

%o def A136485(n): return 4*sum(floor(sqrt((n/2)^2-k^2)) for k in range(1,(n//2)+1))

%o [A136485(n) for n in range(1,101)] # _G. C. Greubel_, Jul 29 2023

%Y Cf. A003881, A136483, A136513.

%Y Alternating merge of A119677 of A136485.

%K easy,nonn

%O 1,3

%A Glenn C. Foster (gfoster(AT)uiuc.edu), Jan 02 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)