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!)
A302829 a(n) is the number of lattice points in a Cartesian grid between a circle of radius n and an inscribed square whose vertices lie on the coordinate axes. 4

%I #43 May 29 2018 16:43:47

%S 0,0,4,8,12,28,36,52,72,88,112,128,156,192,220,252,280,324,368,408,

%T 448,504,548,592,644,708,776,828,880,952,1016,1096,1164,1236,1324,

%U 1388,1472,1548,1648,1736,1808,1912,2004,2116,2212,2300,2408,2508,2624,2728,2860,2976,3076

%N a(n) is the number of lattice points in a Cartesian grid between a circle of radius n and an inscribed square whose vertices lie on the coordinate axes.

%C Points are not lying on the borders of the circle and the square.

%C Note that if the square is rotated so that its sides are parallel to the coordinate axes, the resulting sequence is A303642 instead.

%H Kirill Ustyantsev, <a href="https://www.desmos.com/calculator/dcmkh2uyqm">Desmos graph calculator</a>

%F a(n) = A281795(n) - 4*A034856(n). - _Andrey Zabolotskiy_, Apr 29 2018

%o (Python)

%o for n in range (1,100):

%o .count=0

%o .for x in range (0, n):

%o ..for y in range (0,n):

%o ...if (x*x+y*y<n*n and x+y>n):

%o ....count=count+1

%o .print(4*count)

%o (PARI) a(n) = sum(x=-n, +n, sum(y=-n, +n, ((x^2+y^2) < n^2) && ((abs(x)+abs(y))^2 > n^2))); \\ _Michel Marcus_, May 22 2018

%Y Cf. A034856, A281795, A303642, A303644, A303646.

%K nonn

%O 1,3

%A _Kirill Ustyantsev_, Apr 27 2018

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 August 14 11:22 EDT 2024. Contains 375159 sequences. (Running on oeis4.)