login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A132429
Period 4: repeat [3, 1, -1, -3].
8
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, -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, -1, -3, 3, 1, -1, -3, 3, 1
OFFSET
0,1
COMMENTS
Nonsimple continued fraction expansion of (7 + 3*sqrt(5))/2 = 6.85410196624... = 1 + A090550. - R. J. Mathar, Mar 08 2012
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
FORMULA
G.f.: (3 + 4*x + 3*x^2)/((1+x)*(1+x^2)). - Jaume Oliver Lafont, Aug 30 2009
a(n) = (-1)^n + 2(-1)^((2n + (-1)^n - 1)/4). - Brad Clardy, Mar 10 2013
a(n) = 3 - 2*(n mod 4). - Joerg Arndt, Mar 10 2013
a(n) = (-1)^n + 2(-1)^floor(n/2). - Wesley Ivan Hurt, Apr 17 2014
From Wesley Ivan Hurt, Jul 10 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3.
a(n) = 2*cos(n*Pi/2) + cos(n*Pi) + 2*sin(n*Pi/2). (End)
MAPLE
A132429:=n->3 - 2 * (n mod 4); seq(A132429(n), n=0..100); # Wesley Ivan Hurt, Apr 18 2014
MATHEMATICA
PadRight[{}, 104, {3, 1, -1, -3}] (* Harvey P. Dale, Nov 12 2011 *)
PROG
(PARI) a(n)=3-2*(n%4) \\ Jaume Oliver Lafont, Aug 28 2009
(Haskell)
a132429 = (3 -) . (* 2) . (`mod` 4)
a132429_list = cycle [3, 1, -1, -3] -- Reinhard Zumkeller, Aug 15 2015
(Magma) &cat [[3, 1, -1, -3]^^30]; // Wesley Ivan Hurt, Jul 10 2016
(Python)
def A132429(n): return 3 - 2*(n & 3) # Chai Wah Wu, May 25 2022
CROSSREFS
Cf. A084101 (1, 3, 3, 1), A090550.
Sequence in context: A300867 A269301 A348221 * A046540 A123191 A157454
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Nov 13 2007
STATUS
approved