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 A361192 #27 Oct 16 2023 07:41:44 %S A361192 1,4,12,8,12,20,12,20,16,20,28,20,28,20,28,36,28,36,32,36,28,36,28,44, %T A361192 36,44,36,44,40,44,36,44,52,44,52,44,52,44,52,44,52,60,48,60,52,60,52, %U A361192 60,52,60,52,60,68,52,68,60,68,64,68,60,68,60,68,60,68,76,68,76,60,76,68,76,68 %N A361192 Number of intersections of a grid and (growing) circle with center at a lattice point. %C A361192 Counted intersections are intersections of the circumference of a circle and the grid (all the grid lines together). Beginning with the smallest circle, the radius is increasing, and a new term is added only when the number of intersections changes. %C A361192 a(n) is a multiple of 4 for all n except 1. %e A361192 a(1)=1 because at the beginning it's just a point. If we start increasing the circle, there would be 4 intersections, so a(2)=4, this holds while the radius is between 0 and 1 (assuming the cells of the grid have side length 1). If the radius is between 1 and sqrt(2), there are 12 intersections, so a(3)=12. After that: r=sqrt(2), a(4)=8; sqrt(2) < r < 2, a(5)=12. %e A361192 The number of intersections changes when the squared radius reaches a sum of two nonzero squares (A000404) and when it starts exceeding a sum of two squares, so in the latter case there are three consecutive terms of the sequence corresponding to the squared radius smaller than a term of A001481, equal to it, and exceeding it, like a(3)-a(5) in the example above. %t A361192 issq[n_] := n == Floor[Sqrt[n]]^2; %t A361192 ss[1] = 0; ss[n_] := Product[If[Mod[First@pe, 4] == 1, Last@pe + 1, Boole[EvenQ[Last@pe] || First@pe == 2]], {pe, FactorInteger[n]}] - Boole[issq[n]]; (* A063725, after _Charles R Greathouse IV_ *) %t A361192 t = 4; a = {1}; %t A361192 Do[AppendTo[a, t - 4 ss[n]]; If[issq[n], t += 8]; AppendTo[a, t], {n, 40}]; %t A361192 First /@ Split[a] (* _Andrey Zabolotskiy_, Sep 20 2023 *) %Y A361192 Cf. A000404, A001481, A063725. %Y A361192 A242118 (without 0) and A017113 are subsequences. %K A361192 nonn %O A361192 1,2 %A A361192 _Volodymyr Dykun_, Mar 03 2023 %E A361192 a(16) and beyond from _Andrey Zabolotskiy_, Sep 20 2023