cp's OEIS Frontend

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.

A131713 Period 3: repeat [1, -2, 1].

This page as a plain text file.
%I A131713 #56 Oct 17 2024 20:03:54
%S A131713 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 A131713 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 A131713 -2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1,1,-2,1
%N A131713 Period 3: repeat [1, -2, 1].
%C A131713 Second differences of A131534. Binomial transform of 1, -3, 6, -9, 9, 0, ..., A057083 signed.
%C A131713 Nonsimple continued fraction expansion of sqrt(2)-1 = 0.414213562... - _R. J. Mathar_, Mar 08 2012
%H A131713 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1).
%F A131713 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 A131713 G.f.: (1-x)/(x^2+x+1). - _R. J. Mathar_, Nov 14 2007
%F A131713 a(n) = 2*cos((2n+1)*Pi/3). - _Jaume Oliver Lafont_, Nov 23 2008
%F A131713 a(n) = A117188(2*n). - _R. J. Mathar_, Jun 13 2011
%F A131713 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 A131713 a(n) = (1/4^n) * Sum_{k = 0..n} binomial(2*n+1,2*k)*(-3)^k. - _Peter Bala_, Feb 06 2019
%F A131713 E.g.f.: 2*exp(-x/2)*cos(sqrt(3)*x/2 + Pi/3). - _Fabian Pereyra_, Oct 17 2024
%p A131713 seq(op([1, -2, 1]), n=0..50); # _Wesley Ivan Hurt_, Jul 01 2016
%t A131713 f[n_] := If[ Mod[n, 3] == 1, -2, 1]; Array[f, 105, 0]
%t A131713 CoefficientList[Series[(1 - x)/(1 + x + x^2), {x, 0, 104}], x]
%t A131713 PadRight[{}, 120, {1,-2,1}] (* _Harvey P. Dale_, Jan 25 2014 *)
%o A131713 (PARI) a(n)=[1,-2,1][1+n%3] \\ _Jaume Oliver Lafont_, Mar 24 2009
%o A131713 (PARI) a(n)=1-3*(n%3==1) \\ _Jaume Oliver Lafont_, Mar 24 2009
%o A131713 (Magma) &cat [[1, -2, 1]^^30]; // _Wesley Ivan Hurt_, Jul 01 2016
%Y A131713 Cf. A057083, A061347, A131534.
%K A131713 sign,easy,less
%O A131713 0,2
%A A131713 _Paul Curtz_, Sep 14 2007
%E A131713 Corrected and extended by _Michael Somos_, Jan 02 2011