OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (15,-54).
FORMULA
a(n) = (9^(n+1) - 6^(n+1))/3. - Lambert Klasen (lambert.klasen(AT)gmx.net), Feb 05 2005
a(0)=1, a(n) = 9*a(n-1) + 6^n. - Vincenzo Librandi, Feb 09 2011
a(0)=1, a(1)=15, a(n) = 15*a(n-1) - 54*a(n-2). - Vincenzo Librandi, Feb 09 2011
E.g.f.: 3*exp(9*x) - 2*exp(6*x). - G. C. Greubel, Nov 10 2024
MATHEMATICA
Table[(9^(n+1)-6^(n+1))/3, {n, 0, 30}] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2011 *)
CoefficientList[Series[1/((1-6x)(1-9x)), {x, 0, 30}], x] (* or *) LinearRecurrence[{15, -54}, {1, 15}, 30] (* Harvey P. Dale, Oct 07 2015 *)
PROG
(PARI) Vec(1/((1-6*x)*(1-9*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
(Magma) [n le 2 select 15^(n-1) else 15*Self(n-1) -54*Self(n-2): n in [1..31]]; // G. C. Greubel, Nov 10 2024
(SageMath)
A016172=BinaryRecurrenceSequence(15, -54, 1, 15)
[A016172(n) for n in range(31)] # G. C. Greubel, Nov 10 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved