(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-2*x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 22 2019
(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-2*x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 22 2019
proposed
approved
editing
proposed
editing
proposed
a(0)=2; a(1)=1; a(2)=1; a(n) = a(n-1) + a(n-2) + a(n-3).
a(n)=2*A000213(n)-A000073(n+1). O.g.f.: (-2+x+2x^2)/(-1+x+x^2+x^3). - R. J. Mathar, Aug 04 2008
From R. J. Mathar, Aug 04 2008: (Start)
a(n) = 2*A000213(n) - A000073(n+1).
O.g.f.: (2-x-2*x^2)/(1-x-x^2-x^3). (End)
fz(1)=2;fz(2)=1;fz(3)=1;
for k=4:n
fz(k)=fz(k-1)+fz(k-2)+fz(k-3);
end
y=fz(n);
a[0] = 2; a[1] = 1; a[2] = 1; a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3]; Table[a[n], {n, 0, 2940}] (* Alonso del Arte, Mar 24 2011 *)
LinearRecurrence[{1, 1, 1}, {2, 1, 1}, 10040] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2011 *)
(PARI) my(x='x+O('x^40)); Vec((2-x-2*x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 22 2019
(MAGMA) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-2*x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 22 2019
(Sage) ((2-x-2*x^2)/(1-x-x^2-x^3)).series(x, 41).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019
approved
editing
editing
approved
T.-X. He, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/He/he13.html">Impulse Response Sequences and Construction of Number Sequence Identities</a>, J. Int. Seq. 16 (2013) #13.8.2
approved
editing
editing
approved
(MATLAB) function y=fib(n)
approved
editing