login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131713 Period 3: repeat [1, -2, 1]. 14
1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Second differences of A131534. Binomial transform of 1, -3, 6, -9, 9, 0, ..., A057083 signed.
Nonsimple continued fraction expansion of sqrt(2)-1 = 0.414213562... - R. J. Mathar, Mar 08 2012
LINKS
FORMULA
a(n) = b(2*n + 1) where b(n) is multiplicative with b(2^n) = 0^n, b(3^n) = 3 * 0^n - 2, b(p^n) = 1 if p > 3. - Michael Somos, Jan 02 2011
G.f.: (1-x)/(x^2+x+1). - R. J. Mathar, Nov 14 2007
a(n) = 2*cos((2n+1)*Pi/3). - Jaume Oliver Lafont, Nov 23 2008
a(n) = A117188(2*n). - R. J. Mathar, Jun 13 2011
a(n) + a(n-1) + a(n-2) = 0 for n>1, a(n) = a(n-3) for n>2. - Wesley Ivan Hurt, Jul 01 2016
a(n) = (1/4^n) * Sum_{k = 0..n} binomial(2*n+1,2*k)*(-3)^k. - Peter Bala, Feb 06 2019
MAPLE
seq(op([1, -2, 1]), n=0..50); # Wesley Ivan Hurt, Jul 01 2016
MATHEMATICA
f[n_] := If[ Mod[n, 3] == 1, -2, 1]; Array[f, 105, 0]
CoefficientList[Series[(1 - x)/(1 + x + x^2), {x, 0, 104}], x]
PadRight[{}, 120, {1, -2, 1}] (* Harvey P. Dale, Jan 25 2014 *)
PROG
(PARI) a(n)=[1, -2, 1][1+n%3] \\ Jaume Oliver Lafont, Mar 24 2009
(PARI) a(n)=1-3*(n%3==1) \\ Jaume Oliver Lafont, Mar 24 2009
(Magma) &cat [[1, -2, 1]^^30]; // Wesley Ivan Hurt, Jul 01 2016
CROSSREFS
Sequence in context: A100051 A281727 A122876 * A100063 A057079 A132419
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Sep 14 2007
EXTENSIONS
Corrected and extended by Michael Somos, Jan 02 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 10:56 EDT 2024. Contains 371791 sequences. (Running on oeis4.)