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 A133186 #20 Dec 12 2023 08:52:07 %S A133186 1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1, %T A133186 -4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4,1, %U A133186 2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4 %N A133186 Period 4: repeat [1, 2, 1, -4]. %H A133186 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1). %F A133186 G.f.: 1/(1+x)+3x/(1+x^2). a(n) = (-1)^n+3*A056594(n-1). [_R. J. Mathar_, Oct 30 2008] %F A133186 From _Wesley Ivan Hurt_, Jul 09 2016: (Start) %F A133186 a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3. %F A133186 a(n) = cos(n*Pi) + 3*sin(n*Pi/2). (End) %p A133186 seq(op([1, 2, 1, -4]), n=0..40); # _Wesley Ivan Hurt_, Jul 09 2016 %t A133186 PadRight[{}, 100, {1, 2, 1, -4}] (* _Wesley Ivan Hurt_, Jul 09 2016 *) %o A133186 (Magma) &cat [[1, 2, 1, -4]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016 %Y A133186 Cf. A056594, A109008. %K A133186 sign,easy %O A133186 0,2 %A A133186 _Paul Curtz_, Oct 07 2007