OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (15,-71,105)
FORMULA
From Vincenzo Librandi, Jun 26 2013: (Start)
a(n) = 15*a(n-1) - 71*a(n-2) + 105*a(n-3).
a(n) = 12*a(n-1) - 35*a(n-2) + 3^n. (End)
a(n) = (7^(n+2) - 2*5^(n+2) + 3^(n+2))/8. - Yahia Kahloune, Aug 13 2013
MAPLE
A017389:=n->(7^(n+2) - 2*5^(n+2) + 3^(n+2))/8: seq(A017389(n), n=0..20); # Wesley Ivan Hurt, Mar 25 2014
MATHEMATICA
CoefficientList[Series[1 / ((1 - 3 x) (1 - 5 x) (1 - 7 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 26 2013 *)
PROG
(Magma) I:=[1, 15, 154]; [n le 3 select I[n] else 15*Self(n-1)-71*Self(n-2)+105*Self(n-3): n in [1..20]]; /* or */ m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-5*x)*(1-7*x)))); // Vincenzo Librandi, Jun 26 2013
(PARI) a(n) = (7^(n+2) - 2*5^(n+2) + 3^(n+2))/8; \\ Joerg Arndt, Aug 13 2013
(PARI) x='x+O('x^20); Vec(1/((1-3*x)*(1-5*x)*(1-7*x))) \\ Altug Alkan, Sep 23 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved