OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (7,1,-7).
FORMULA
a(n) = (5*7^n-3*(-1)^(n-1)-8)/24. a(n) = 7*a(n-1)+a(n-2)-7*a(n-3). G.f.: x*(3*x+1) / ((x-1)*(x+1)*(7*x-1)). - Colin Barker, Dec 27 2012; corrected Apr 30 2014
MAPLE
MATHEMATICA
CoefficientList[Series[(3 x + 1)/((x - 1) (x + 1) (7 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 22 2013 *)
Table[FromDigits[PadRight[{}, n, {1, 3}], 7], {n, 30}] (* or *) LinearRecurrence[ {7, 1, -7}, {1, 10, 71}, 30] (* Harvey P. Dale, Dec 29 2019 *)
PROG
(Magma) [(5*7^n-3*(-1)^(n-1)-8)/24: n in [1..30]]; // Vincenzo Librandi, Oct 22 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Dec 11 1999
EXTENSIONS
More terms from Colin Barker, Dec 27 2012
STATUS
approved