OFFSET
0,2
COMMENTS
The old entry with this sequence number was a duplicate of A024155.
REFERENCES
Benoit Rittaud, Elise Janvresse, Emmanuel Lesigne and Jean-Christophe Novelli, Quand les maths se font discrètes, Le Pommier, 2008 (ISBN 978-2-7465-0370-0). See pp. 42ff.
LINKS
Robert Israel, Table of n, a(n) for n = 0..1770
Index entries for linear recurrences with constant coefficients, signature (3,2,1).
FORMULA
a(0)=1, a(1)=2, a(2)=3, a(n) = 3*a(n-1)+2*a(n-2)+a(n-3). - Harvey P. Dale, Feb 01 2013
MAPLE
f:= gfun:-rectoproc({-a(n+3)+3*a(n+2)+2*a(n+1)+a(n), a(0) = 1, a(1) = 2, a(2) = 3}, a(n), remember):
map(f, [$0..50]); # Robert Israel, Dec 28 2015
MATHEMATICA
CoefficientList[Series[(1-x-5x^2)/(1-3x-2x^2-x^3), {x, 0, 40}], x] (* or *) LinearRecurrence[{3, 2, 1}, {1, 2, 3}, 40] (* Harvey P. Dale, Feb 01 2013 *)
PROG
(PARI) Vec((1-x-5*x^2)/(1-3*x-2*x^2-x^3) + O(x^100)) \\ Altug Alkan, Dec 27 2015
(Magma) I:=[1, 2, 3]; [n le 3 select I[n] else 3*Self(n-1)+2*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 28 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 18 2008
STATUS
approved