cp's OEIS Frontend

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.

A303642 a(n) is the number of lattice points in Cartesian grid between circle of radius n and its inscribed square. The sides of the square are parallel to coordinate axes.

This page as a plain text file.
%I A303642 #24 May 22 2025 10:21:47
%S A303642 0,0,0,20,20,28,64,72,80,80,148,148,156,248,256,264,264,380,396,404,
%T A303642 528,552,560,700,716,740,764,928,936,960,1148,1180,1196,1212,1440,
%U A303642 1448,1472,1700,1740,1764,2000,2040,2064,2104,2380,2396,2428,2720,2760,2784,2832,3156
%N A303642 a(n) is the number of lattice points in Cartesian grid between circle of radius n and its inscribed square. The sides of the square are parallel to coordinate axes.
%C A303642 If the sides of the inscribed square are parallel to bisector of coordinate axes we have a different sequence.
%H A303642 Kirill Ustyantsev, <a href="https://www.desmos.com/calculator/ravtawi4o9">illustrated example</a>
%o A303642 (Python)
%o A303642 import math
%o A303642 for n in range(1, 100):
%o A303642  count = 0
%o A303642  for x in range(0, n):
%o A303642   for y in range(-n, n):
%o A303642    if (x * x + y * y < n * n and x > n / math.sqrt(2)):
%o A303642     count = count + 1
%o A303642  print(4 * count)
%Y A303642 Cf. A302829, A303644, A303646.
%K A303642 nonn
%O A303642 1,4
%A A303642 _Kirill Ustyantsev_, Apr 27 2018
%E A303642 Offset corrected by _Andrey Zabolotskiy_, May 05 2018