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

%I #53 Dec 12 2023 09:15:36

%S 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,

%T 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,

%U -2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1

%N Period 3: repeat [1, -2, 1].

%C Second differences of A131534. Binomial transform of 1, -3, 6, -9, 9, 0, ..., A057083 signed.

%C Nonsimple continued fraction expansion of sqrt(2)-1 = 0.414213562... - _R. J. Mathar_, Mar 08 2012

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1).

%F 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

%F G.f.: (1-x)/(x^2+x+1). - _R. J. Mathar_, Nov 14 2007

%F a(n) = 2*cos((2n+1)*Pi/3). - _Jaume Oliver Lafont_, Nov 23 2008

%F a(n) = A117188(2*n). - _R. J. Mathar_, Jun 13 2011

%F 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

%F a(n) = (1/4^n) * Sum_{k = 0..n} binomial(2*n+1,2*k)*(-3)^k. - _Peter Bala_, Feb 06 2019

%p seq(op([1, -2, 1]), n=0..50); # _Wesley Ivan Hurt_, Jul 01 2016

%t f[n_] := If[ Mod[n, 3] == 1, -2, 1]; Array[f, 105, 0]

%t CoefficientList[Series[(1 - x)/(1 + x + x^2), {x, 0, 104}], x]

%t PadRight[{}, 120, {1,-2,1}] (* _Harvey P. Dale_, Jan 25 2014 *)

%o (PARI) a(n)=[1,-2,1][1+n%3] \\ _Jaume Oliver Lafont_, Mar 24 2009

%o (PARI) a(n)=1-3*(n%3==1) \\ _Jaume Oliver Lafont_, Mar 24 2009

%o (Magma) &cat [[1, -2, 1]^^30]; // _Wesley Ivan Hurt_, Jul 01 2016

%Y Cf. A057083, A061347, A131534.

%K sign,easy,less

%O 0,2

%A _Paul Curtz_, Sep 14 2007

%E Corrected and extended by _Michael Somos_, Jan 02 2011

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 March 29 05:16 EDT 2024. Contains 371264 sequences. (Running on oeis4.)