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”).
%I #68 Sep 08 2022 08:46:05
%S 1,-1,1,-2,4,-5,9,-15,23,-38,62,-99,161,-261,421,-682,1104,-1785,2889,
%T -4675,7563,-12238,19802,-32039,51841,-83881,135721,-219602,355324,
%U -574925,930249,-1505175,2435423,-3940598,6376022,-10316619,16692641,-27009261,43701901,-70711162,114413064,-185124225
%N Expansion of (1-x+x^3)/(1-x^2+2*x^3-x^4).
%C a(n) and its differences:
%C . 1, -1, 1, -2, 4, -5, 9, -15, 23, -38, ...
%C . -2, 2, -3, 6, -9, 14, -24, 38, -61, 100, ...
%C . 4, -5, 9, -15, 23, -38, 62, -99, 161, -261, ...
%C . -9, 14, -24, 38, -61, 100, -161, 260, -422, 682, ...
%C . 23, -38, 62, -99, 161, -261, 421, -682, 1104, -1785, ...
%C . -61, 100, -161, 260, -422, 682, -1103, 1786, -2889, 4674, ...
%C . 161, -261, 421, -682, 1104, -1785, 2889, -4675, 7563, -12238, ...
%C The third row is the first shifted .
%C The main diagonal is A001077(n). The fourth is -A001077(n+1). By "shifted" antidiagonals there are one 1, two 2's (-2 of the first row and 2), generally A001651(n) (-1)^n *A001077(n).
%C a(n+1)/a(n) tends to A001622 (the golden ratio) as n -> infinity.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,-2,1).
%F a(0)=1, a(1)=-1; for n>1, a(n) = a(n-2) - a(n-1) + A010892(n+2).
%F a(n) = a(n-2) -2*a(n-3) +a(n-4).
%F a(n) = A226956(-n).
%F a(n+1) = A039834(n) - (-1)^n*A094686(n).
%F a(n+6) - a(n) = 2*(-1)^n* A000032(n+3).
%F a(2n+1) = -A226956(2n+1).
%F G.f. ( -1+x-x^3 ) / ( (x^2-x-1)*(1-x+x^2) ). - _R. J. Mathar_, Jun 29 2013
%F 2*a(n) = A010892(n+2)+A061084(n+1). - _R. J. Mathar_, Jun 29 2013
%t a[0] = 1; a[1] = -1; a[n_] := a[n] = a[n-2] - a[n-1] - {-1, 0, 1, 1, 0, -1}[[Mod[n+1, 6] + 1]]; Table[a[n], {n, 0, 41}] (* _Jean-François Alcover_, Jul 04 2013 *)
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+x^3)/(1-x^2+2*x^3-x^4))); // _Bruno Berselli_, Jul 04 2013
%K sign,easy
%O 0,4
%A _Paul Curtz_, Jun 28 2013