OFFSET
3,1
COMMENTS
a(n) is the number of regions formed by the affine span of all the sides of a regular n-gon.
LINKS
Colin Barker, Table of n, a(n) for n = 3..1000
Philippe Ryckelynck and Laurent Smoch, On cyclotomic arrangements of lines in the plane, Int'l J. Geom. (2023) Vol. 12, No. 2, 70-88.
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = (n^2+2)/2, n even, and a(n) = (n^2+n+2)/2, n odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5). - Colin Barker, Dec 14 2014
G.f.: -x^3*(3*x^4-x^3-7*x^2+2*x+7) / ((x-1)^3*(x+1)^2). - Colin Barker, Dec 14 2014
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {7, 9, 16, 19, 29}, 60] (* Harvey P. Dale, Oct 16 2019 *)
PROG
(PARI) a(n)=if(n%2, (n^2+n+2)/2, (n^2+2)/2); \\ Joerg Arndt, Dec 04 2014
(PARI) Vec(-x^3*(3*x^4-x^3-7*x^2+2*x+7)/((x-1)^3*(x+1)^2) + O(x^100)) \\ Colin Barker, Dec 14 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Richard Stanley, Dec 03 2014
STATUS
approved