OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (13,-30).
FORMULA
G.f.: (2-13*x)/((1-3*x)(1-10*x)).
E.g.f.: e^(3*x) + e^(10*x).
a(n) = 13*a(n-1)-30*a(n-2) for n>1.
MATHEMATICA
Table[(3^n + 10^n), {n, 0, 30}] (* or *) CoefficientList[Series[(2 - 13 x)/((1 - 3 x) (1 - 10 x)), {x, 0, 30}], x]
PROG
(Magma) [3^n+10^n: n in [0..25]]; /* or */ I:=[2, 13]; [n le 2 select I[n] else 13*Self(n-1)-30*Self(n-2): n in [1..25]]
(PARI) a(n)=3^n + 10^n \\ Charles R Greathouse IV, Aug 26 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Aug 04 2014
STATUS
approved