OFFSET
3,3
COMMENTS
Starting at a(13) = 2, sequence is periodic with period 30.
LINKS
Paolo Xausa, Table of n, a(n) for n = 3..10000
Bjorn Poonen and Michael Rubinstein, The Number of Intersection Points Made by the Diagonals of a Regular Polygon, arXiv:math/9508209 [math.MG], 1995-2006.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
FORMULA
From Paolo Xausa, May 11 2023: (Start)
a(n) = 0 if n <= 4.
For n > 4:
a(n) = 2 if n is odd or n = 6;
a(n) = 3 if n != 6 is even but not divisible by 6;
a(n) = 4 if n = 12;
a(n) = 5 if n != 12 is divisible by 6 but not 30;
a(n) = 7 if n is divisible by 30. (End)
EXAMPLE
In a 30-gon, there are non-center points where 7 diagonals meet, but no more than 7. Hence a(30) = 7.
MATHEMATICA
LinearRecurrence[PadLeft[{1}, 30], {0, 0, 2, 2, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5}, 120] (* Ray Chandler, Aug 27 2015 - adapted to new data by Paolo Xausa, May 15 2023 *)
PadRight[{0, 0, 2, 2, 2, 3, 2, 3, 2, 4}, 120, {2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3}] (* Harvey P. Dale, Jun 20 2021 - adapted to new data by Paolo Xausa, May 15 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David W. Wilson, Jun 01 2005
EXTENSIONS
a(4), a(6) and a(12) corrected by Paolo Xausa, May 11 2023
STATUS
approved