|
|
A257164
|
|
Period 5 sequence: repeat [0, 2, 4, 1, 3].
|
|
1
|
|
|
0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2, 4, 1, 3, 0, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Label the vertices of a regular pentagon from 0..4 going clockwise. Then, starting at vertex "0", a(n) gives the order in which the vertices must be connected to draw a clockwise inscribed, 5-pointed star that remains unbroken during construction.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2+4*x+x^2+3*x^3)/(1-x^5).
Recurrence: a(n) = a(n-5).
a(n) = a(a(a(a(a(n))))).
|
|
EXAMPLE
|
0 -> 2 -> 4 -> 1 -> 3 -> ..repeat
|
|
MAPLE
|
|
|
MATHEMATICA
|
Mod[2 Range[0, 100], 5] (* or *)
CoefficientList[Series[x (2 + 4 x + x^2 + 3 x^3)/(1 - x^5), {x, 0, 100}], x]
LinearRecurrence[{0, 0, 0, 0, 1}, {0, 2, 4, 1, 3}, 105] (* or *)
NestList[# /. {0 -> 2, 1 -> 3, 2 -> 4, 3 -> 0, 4 -> 1} &, {0}, 104] // Flatten (* Robert G. Wilson v, Apr 30 2015 *)
|
|
PROG
|
(Magma) [(2*n mod 5) : n in [0..100]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|