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!)
A357576 Half area of the convex hull of {(x,y)| x,y integers and x^2 + y^2 < n^2}. 3
0, 2, 8, 17, 28, 46, 63, 87, 112, 142, 173, 204, 244, 287, 333, 378, 428, 485, 540, 602, 661, 737, 802, 869, 947, 1030, 1118, 1197, 1278, 1378, 1469, 1575, 1670, 1776, 1889, 1990, 2108, 2219, 2353, 2472, 2587, 2723, 2854, 3002, 3135, 3275, 3424, 3563, 3721 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is odd if there is an edge connecting two vertices (x,y) and (y,x), x > y > 0, such that x-y is odd. Otherwise, a(n) is even. a(n)/n^2 is not monotonous but tends to Pi/2. The convex hull has four symmetry axes: x=0, y=0, y=x, y=-x. Therefore it is sufficient to find the least area of a quarter polygon (multiplied by 2). The half area is an integer because the area of any convex polygon whose vertex coordinates are integers is a multiple of 1/2.
LINKS
Gerhard Kirchner, Examples for n <= 13.
FORMULA
a(n) = A357575(n) - 2*floor(sqrt(2*n-1)) if n is a nonhypotenuse number (A004144).
EXAMPLE
For n=4: 5+6+6 = 17 square units -> a(4)=17.
_______
/|_|_|_|_|\ 5
|_|_|_|_|_|_| 6
|_|_|_|_|_|_| 6
PROG
(Maxima)
block(nmax: 40, a: makelist(0, i, 1, nmax), a[1]:0,
for n from 2 thru nmax do
(x0:0, y0:n, xa:0, ya:n, m1:0, m0:2, ar:0,
while xa<ya do (y:y0,
while m1<=m0 and xa<ya do
(y:y-1, x1: sqrt(n^2-y^2-1), m1: (y0-y)/(x1-x0),
if m1<=m0 then (x:floor(x1), m: (y0-y)/(x-x0),
if m<m0 then (m0:m, xa:x, ya:y))),
dar:xa*y0-ya*x0, if y0=n then dar:dar-xa,
if xa<=ya then (x0:xa, y0:ya, m0:2, ar:ar+2*dar) else ar:ar+dar),
a[n]: ar), a);
(Python)
from math import isqrt
from sympy import convex_hull
def A357576(n): return 0 if n == 1 else int(2*convex_hull(*[(0, 0), (n-1, 0)]+[(x, isqrt((n-x)*(n+x)-1)) for x in range(n)]).area) # Chai Wah Wu, Oct 23 2022
CROSSREFS
Sequence in context: A224865 A192159 A066564 * A034972 A294537 A294548
KEYWORD
nonn
AUTHOR
Gerhard Kirchner, Oct 05 2022
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 August 11 20:46 EDT 2024. Contains 375073 sequences. (Running on oeis4.)