OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (9,-14)
FORMULA
a(n) = (7^(n+1) - 2^(n+1))/5. - Lambert Klasen (lambert.klasen(AT)gmx.net), Feb 06 2005
a(n) = 7*a(n-1) + 2^n, a(0)=1. - Vincenzo Librandi, Jun 24 2013
EXAMPLE
1/((1-2x)(1-7x)) = 1 + 9*x + 67*x^2 + 477*x^3 + 3355*x^4 + 23517*x^5 + 164683*x^6 + ...
MATHEMATICA
Join[{a=1, b=9}, Table[c=9*b-14*a; a=b; b=c, {n, 60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 27 2011 *)
CoefficientList[Series[1 /((1 - 2 x) (1 - 7 x)), {x, 0, 200}], x] (* Vincenzo Librandi, Jun 24 2013 *)
PROG
(Sage) [lucas_number1(n, 9, 14) for n in range(1, 20)] # Zerinvary Lajos, Apr 23 2009
(Sage) [(7^n - 2^n)/5 for n in range(1, 20)] # Zerinvary Lajos, Jun 04 2009
(PARI) Vec(1/((1-2*x)*(1-7*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-2*x) (1-7*x)))); // Vincenzo Librandi, Jun 24 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved