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 A303669 #34 May 22 2025 10:21:47 %S A303669 0,2,13,21,36,56,81,103,144,166,215,239,298,342,405,447,514,568,655, %T A303669 707,796,864,961,1019,1128,1208,1337,1405,1524,1614,1749,1847,1990, %U A303669 2082,2249,2333,2502,2600,2789,2899,3064,3192,3383,3519,3718,3832,4047,4175 %N A303669 a(n) is the number of lattice points in a Cartesian grid between a circle of radius n, centered at the origin, and an inscribed equilateral triangle; one of the sides of triangle is perpendicular to X-axis. %H A303669 Kirill Ustyantsev, <a href="/A303669/b303669.txt">Table of n, a(n) for n = 1..1000</a> %H A303669 Kirill Ustyantsev, <a href="https://www.desmos.com/calculator/fgmos9xgo9"> Illustration of this configuration for n=1..10</a> %e A303669 For n = 2 we have two lattice points between the defined circle and its inscribed equilateral triangle: (1, 1) and (1, -1). %o A303669 (Python) %o A303669 import math %o A303669 tan=math.sqrt(3)/3 %o A303669 for n in range (1,70): %o A303669 count=0 %o A303669 count1=0 %o A303669 for x in range (-n, n): %o A303669 for y in range (-n,n): %o A303669 if (x*x+y*y<n*n and y>-tan*x+tan*n): %o A303669 count=count+1 %o A303669 if (x*x+y*y<n*n and y<-n/2): %o A303669 count1=count1+1 %o A303669 print(2*count+count1) %o A303669 (PARI) a(n) = sum(x=-n, +n, sum(y=-n, +n, ((x^2+y^2) < n^2) && ((2*x < - n) || (3*y^2 > (n-x)^2)))); \\ _Michel Marcus_, May 22 2018 %Y A303669 Cf. A302829, A303642, A303706. %K A303669 nonn %O A303669 1,2 %A A303669 _Kirill Ustyantsev_, Apr 28 2018