cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A108053 Maximum number of diagonals of a regular n-gon that meet at a non-center point.

Original entry on oeis.org

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, 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, 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, 2, 3, 2, 3, 2
Offset: 3

Views

Author

David W. Wilson, Jun 01 2005

Keywords

Comments

Starting at a(13) = 2, sequence is periodic with period 30.

Examples

			In a 30-gon, there are non-center points where 7 diagonals meet, but no more than 7. Hence a(30) = 7.
		

Crossrefs

Programs

  • 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 *)

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)

Extensions

a(4), a(6) and a(12) corrected by Paolo Xausa, May 11 2023