OFFSET
0,2
COMMENTS
Essentially the same as A006054. - Joerg Arndt, Nov 08 2022
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-1).
FORMULA
G.f. for sequence with 1 prepended: 1/( 1 - Sum_{k>=0} x*(x+x^2-x^3)^k ). - Joerg Arndt, Sep 30 2012
MATHEMATICA
LinearRecurrence[{2, 1, -1}, {1, 2, 5}, 35] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
PROG
(PARI) Vec( 1/(1-2*x-x^2+x^3) + O(x^66) ) /* Joerg Arndt, Sep 30 2012 */
(Magma) I:=[1, 2, 5]; [n le 3 select I[n] else 2*Self(n-1) +Self(n-2) -Self(n-3): n in [1..36]]; // G. C. Greubel, Sep 11 2021
(SageMath)
def A106805_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-2*x-x^2+x^3) ).list()
A106805_list(35) # G. C. Greubel, Sep 11 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, May 17 2005
EXTENSIONS
Edited by the Associate Editors of the OEIS, Apr 09 2009
Name corrected by Joerg Arndt, Sep 30 2012
STATUS
approved
