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 A132400 #26 Mar 08 2024 01:12:00 %S A132400 1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5, %T A132400 3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1, %U A132400 1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1,1,5,3,1 %N A132400 Period 4: repeat [1, 5, 3, 1]. %H A132400 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1). %F A132400 Final digits of A082311. %F A132400 O.g.f.: (1+5*x+3*x^2+x^3)/((1-x)*(x+1)*(1+x^2)) = (5/2)/(1-x)-(1/2)/(x+1)+(2*x-1)/(1+x^2). - _R. J. Mathar_, Nov 28 2007 %F A132400 From _Wesley Ivan Hurt_, Jul 09 2016: (Start) %F A132400 a(n) = a(n-4) for n>3. %F A132400 a(n) = (5-cos(n*Pi)-2*cos(n*Pi/2)+4*sin(n*Pi/2)-I*sin(n*Pi))/2. (End) %p A132400 seq(op([1, 5, 3, 1]), n=0..40); # _Wesley Ivan Hurt_, Jul 09 2016 %t A132400 PadRight[{}, 120, {1,5,3,1}] (* _Harvey P. Dale_, Sep 15 2014 *) %o A132400 (PARI) a(n)=[1,5,3,1][n%4+1] \\ _Charles R Greathouse IV_, Jun 02 2011 %o A132400 (Magma) &cat [[1, 5, 3, 1]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016 %Y A132400 Cf. A082311. %K A132400 nonn,easy %O A132400 0,2 %A A132400 _Paul Curtz_, Nov 20 2007