OFFSET
0,1
REFERENCES
Martin Gardner, Mathematical Circus, Random House, New York, 1981, p. 165.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..8188
Index entries for linear recurrences with constant coefficients, signature (0,1,1).
FORMULA
From R. J. Mathar, Oct 13 2008: (Start)
G.f.: (1+x)(2-x)/(1-x^2-x^3).
MATHEMATICA
Nest[Append[#, #[[-2]] + #[[-3]]] &, {2, 1, 1}, 46] (* or *)
CoefficientList[Series[(1 + x) (2 - x)/(1 - x^2 - x^3), {x, 0, 48}], x] (* Michael De Vlieger, Dec 17 2017 *)
LinearRecurrence[{0, 1, 1}, {2, 1, 1}, 60] (* Harvey P. Dale, Jul 21 2020 *)
PROG
(MATLAB) function y=fib(n)
fz(1)=2; fz(2)=1; fz(3)=1;
for k=4:n
fz(k)=fz(k-2)+fz(k-3);
end
y=fz(n);
(PARI) x='x+O('x^99); Vec((1+x)*(2-x)/(1-x^2-x^3)) \\ Altug Alkan, Dec 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Matt Wynne (mattwyn(AT)verizon.net), Jul 30 2008
EXTENSIONS
Better name from T. D. Noe, Aug 06 2008
Offset corrected by R. J. Mathar, Sep 27 2009
STATUS
approved