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.
%I A257164 #17 Sep 08 2022 08:46:12 %S A257164 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, %T A257164 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 %N A257164 Period 5 sequence: repeat [0, 2, 4, 1, 3]. %C A257164 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. %H A257164 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1). %F A257164 a(n) = (2n mod 5) = A010874(A005843(n)). %F A257164 G.f.: x*(2+4*x+x^2+3*x^3)/(1-x^5). %F A257164 Recurrence: a(n) = a(n-5). %F A257164 a(n) = a(a(a(a(a(n))))). %F A257164 a(-n) = A010874(3n) = a(a(a(n))). %F A257164 Bisections: a(2n) = A010874(-n) = a(a(n)); a(2n+1) = A010874(2-n). %F A257164 Trisections: a(3n) = A010874(n) = a(a(a(a(n)))); a(3n+1) = A010874(n+2); a(3n+2) = A010874(n-1). %e A257164 0 -> 2 -> 4 -> 1 -> 3 -> ..repeat %p A257164 A257164:=n->(2*n mod 5): seq(A257164(n), n=0..100); %t A257164 Mod[2 Range[0, 100], 5] (* or *) %t A257164 CoefficientList[Series[x (2 + 4 x + x^2 + 3 x^3)/(1 - x^5), {x, 0, 100}], x] %t A257164 LinearRecurrence[{0, 0, 0, 0, 1}, {0, 2, 4, 1, 3}, 105] (* or *) %t A257164 NestList[# /. {0 -> 2, 1 -> 3, 2 -> 4, 3 -> 0, 4 -> 1} &, {0}, 104] // Flatten (* _Robert G. Wilson v_, Apr 30 2015 *) %o A257164 (Magma) [(2*n mod 5) : n in [0..100]]; %o A257164 (PARI) a(n)=2*n%5 \\ _Charles R Greathouse IV_, Apr 21 2015 %Y A257164 Cf. A005843. %Y A257164 Bisection of A010874. %K A257164 nonn,easy %O A257164 0,2 %A A257164 _Wesley Ivan Hurt_, Apr 16 2015