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 A132429 #57 Dec 12 2023 09:16:45 %S A132429 3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1, %T A132429 -3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1, %U A132429 -1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1,-1,-3,3,1 %N A132429 Period 4: repeat [3, 1, -1, -3]. %C A132429 Nonsimple continued fraction expansion of (7 + 3*sqrt(5))/2 = 6.85410196624... = 1 + A090550. - _R. J. Mathar_, Mar 08 2012 %C A132429 Pisano period lengths: 1, 1, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ... . - _R. J. Mathar_, Aug 10 2012 %H A132429 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1). %F A132429 G.f.: (3 + 4*x + 3*x^2)/((1+x)*(1+x^2)). - _Jaume Oliver Lafont_, Aug 30 2009 %F A132429 a(n) = (-1)^n + 2(-1)^((2n + (-1)^n - 1)/4). - _Brad Clardy_, Mar 10 2013 %F A132429 a(n) = 3 - 2*(n mod 4). - _Joerg Arndt_, Mar 10 2013 %F A132429 a(n) = (-1)^n + 2(-1)^floor(n/2). - _Wesley Ivan Hurt_, Apr 17 2014 %F A132429 From _Wesley Ivan Hurt_, Jul 10 2016: (Start) %F A132429 a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3. %F A132429 a(n) = 2*cos(n*Pi/2) + cos(n*Pi) + 2*sin(n*Pi/2). (End) %p A132429 A132429:=n->3 - 2 * (n mod 4); seq(A132429(n), n=0..100); # _Wesley Ivan Hurt_, Apr 18 2014 %t A132429 PadRight[{}, 104, {3,1,-1,-3}] (* _Harvey P. Dale_, Nov 12 2011 *) %o A132429 (PARI) a(n)=3-2*(n%4) \\ _Jaume Oliver Lafont_, Aug 28 2009 %o A132429 (Haskell) %o A132429 a132429 = (3 -) . (* 2) . (`mod` 4) %o A132429 a132429_list = cycle [3, 1, -1, -3] -- _Reinhard Zumkeller_, Aug 15 2015 %o A132429 (Magma) &cat [[3, 1, -1, -3]^^30]; // _Wesley Ivan Hurt_, Jul 10 2016 %o A132429 (Python) %o A132429 def A132429(n): return 3 - 2*(n & 3) # _Chai Wah Wu_, May 25 2022 %Y A132429 Cf. A084101 (1, 3, 3, 1), A090550. %K A132429 sign,easy %O A132429 0,1 %A A132429 _Paul Curtz_, Nov 13 2007