OFFSET
3,3
LINKS
Felix Huber, Table of n, a(n) for n = 3..10000
Kival Ngaokrajang, Illustration of initial terms.
Wikipedia, Regular polygon.
FORMULA
a(n) = round(n/(4*tan(Pi/n))).
EXAMPLE
The exact values of the areas of regular n-gons with side 1 for n = 3 .. 12 are:
(1/4)*3^(1/2), 1, (5/4)*cot((1/5)*Pi), (3/2)*3^(1/2), (7/4)*cot((1/7)*Pi), 2*cot((1/8)*Pi), (9/4)*cot((1/9)*Pi), (5/2)*cot((1/10)*Pi), (11/4)*cot((1/11)*Pi), 3*cot((1/12)*Pi).
The floating-point values are [0.4330127020, 1, 1.720477400, 2.598076212, 3.633912443, 4.828427124, 6.181824193, 7.694208842, 9.365639904, 11.19615242], so the rounded values are [0, 1, 2, 3, 4, 5, 6, 8, 9, 11]. - N. J. A. Sloane, Mar 11 2024
PROG
(PARI) a(n) = round(n / (4*tan(Pi/n))); \\ Michel Marcus, Sep 04 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ben Paul Thurston, Jan 11 2008
EXTENSIONS
Corrected by N. J. A. Sloane, Mar 11 2024 at the suggestion of Felix Huber
STATUS
approved