This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A303644 #56 Mar 21 2023 06:12:51 %S A303644 0,0,0,4,4,12,24,32,40,48,68,92,100,120,136,168,192,220,244,268,312, %T A303644 336,376,420,444,484,524,576,624,664,724,764,820,868,912,992,1040, %U A303644 1116,1156,1220,1304,1368,1440,1496,1564,1660,1732,1816,1888,1960,2032,2116,2220,2308 %N A303644 a(n) is the number of lattice points in a Cartesian grid between a square of side length 2*n, centered at the origin, and its inscribed circle. The sides of the square are parallel to the coordinate axes. %C A303644 The borders of the square and the circle are not included. Rotating the square by 45 degrees (so that its vertices lie on the coordinate axes) results in sequence A303646 instead. %H A303644 Kirill Ustyantsev, <a href="https://www.desmos.com/calculator/ihsmmyt7c0">illustrated example</a> %F A303644 a(n) = A016754(n-1) - A000328(n) - 4. %e A303644 For n = 4, we have 4 points with integer coordinates; the point in the first quadrant is at (3,3): %e A303644 . %e A303644 o . . + . . o %e A303644 . . . + . . . %e A303644 . . . + . . . %e A303644 -+-+-+-+-+-+-+- %e A303644 . . . + . . . %e A303644 . . . + . . . %e A303644 o . . + . . o %e A303644 . %e A303644 Similarly, for n = 5, we have 4 points with integer coordinates; the point in the first quadrant is at (4,4): %e A303644 . %e A303644 o . . . + . . . o %e A303644 . . . . + . . . . %e A303644 . . . . + . . . . %e A303644 . . . . + . . . . %e A303644 -+-+-+-+-+-+-+-+-+- %e A303644 . . . . + . . . . %e A303644 . . . . + . . . . %e A303644 . . . . + . . . . %e A303644 o . . . + . . . o %e A303644 . %e A303644 For n = 6, we have 12 points, of which the 3 points in the first quadrant are at (4,5), (5,4), and (5,5): %e A303644 . %e A303644 o o . . . + . . . o o %e A303644 o . . . . + . . . . o %e A303644 . . . . . + . . . . . %e A303644 . . . . . + . . . . . %e A303644 . . . . . + . . . . . %e A303644 -+-+-+-+-+-+-+-+-+-+-+- %e A303644 . . . . . + . . . . . %e A303644 . . . . . + . . . . . %e A303644 . . . . . + . . . . . %e A303644 o . . . . + . . . . o %e A303644 o o . . . + . . . o o %o A303644 (Python) %o A303644 import math %o A303644 for n in range(1, 100): %o A303644 count = 0 %o A303644 for x in range(1, n): %o A303644 for y in range(1, n): %o A303644 if x * x + y * y > n * n and x < n and y < n: %o A303644 count = count + 1 %o A303644 print(4 * count, end=", ") %o A303644 (PARI) a(n) = sum(x=-n+1, n-1, sum(y=-n+1, n-1, (x^2+y^2) > n^2)); \\ _Michel Marcus_, May 22 2018 %Y A303644 Cf. A000328, A016754, A302829, A303642, A303646. %K A303644 nonn %O A303644 1,4 %A A303644 _Kirill Ustyantsev_, Apr 27 2018