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!)
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. 1
0, 2, 13, 21, 36, 56, 81, 103, 144, 166, 215, 239, 298, 342, 405, 447, 514, 568, 655, 707, 796, 864, 961, 1019, 1128, 1208, 1337, 1405, 1524, 1614, 1749, 1847, 1990, 2082, 2249, 2333, 2502, 2600, 2789, 2899, 3064, 3192, 3383, 3519, 3718, 3832, 4047, 4175 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
For n = 2 we have two lattice points between the defined circle and its inscribed equilateral triangle: (1, 1) and (1, -1).
PROG
(Python)
import math
tan=math.sqrt(3)/3
for n in range (1, 70):
.count=0
.count1=0
.for x in range (-n, n):
..for y in range (-n, n):
...if (x*x+y*y<n*n and y>-tan*x+tan*n):
....count=count+1
...if (x*x+y*y<n*n and y<-n/2):
....count1=count1+1
.print(2*count+count1)
(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
CROSSREFS
Sequence in context: A061871 A182459 A333216 * A084651 A285087 A085509
KEYWORD
nonn
AUTHOR
Kirill Ustyantsev, Apr 28 2018
STATUS
approved

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 April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)