OFFSET
3,1
COMMENTS
Closely related to K(n) = (2*n/Pi)*sin(Pi/n)/(1-cos(Pi/n)) as derived from the n-gon with same circumference as the circle squeezed between the large n-gon and its circumcircle.
LINKS
Robert Israel, Table of n, a(n) for n = 3..10000
Bill Taylor, Ignacio Larrosa CaƱestro, Rainer Rosenthal, Little Geometry Problem, thread in newsgroup sci.math, Oct 31 - Nov 06, 2001.
FORMULA
For n=odd: a(n) = floor((1+cos(Pi/n))/(1-cos(Pi/n))) For n=even: a(n) = floor( 2*(2/(tan(Pi/n))^2) + 1 )
a(n) = floor(4*n^2/Pi^2) - b(n) where b(n) is in {0,1,2}; 0 occurs only for odd n, while 2 occurs only for even n. - Robert Israel, Oct 24 2017
EXAMPLE
a(3) = 3 as can be seen in Christmas stars: cos(Pi/3)=1/2, thus a(3) = floor((3/2)/(1/2)) = 3. a(4) = 5 as proposed by Bill Taylor in sci.math: tan(Pi/4)=1, thus a(4) = floor(2*(2/1^2) + 1) = 5.
MAPLE
f:= proc(n) if n::odd then floor((1+cos(Pi/n))/(1-cos(Pi/n))) else floor(2*(2/(tan(Pi/n))^2) + 1) fi end proc:
map(f, [$3..100]); # Robert Israel, Oct 24 2017
MATHEMATICA
f[n_] := If[ OddQ[n], Floor[(1 + Cos[Pi/n]) / (1 - Cos[Pi/n])], Floor[4/(Tan[Pi/n])^2 + 1] ]; Table[ f[n], {n, 3, 60} ]
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Rainer Rosenthal, Dec 05 2001
EXTENSIONS
More terms from Robert G. Wilson v, Dec 06 2001
STATUS
approved