OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (8,1,-8).
FORMULA
From Colin Barker, Dec 27 2012: (Start)
a(n) = (11*8^n + 7*(-1)^n - 18)/63.
a(n) = 8*a(n-1) + a(n-2) - 8*a(n-3).
G.f.: x*(3*x+1)/((x-1)*(x+1)*(8*x-1)). (End)
E.g.f.: exp(-x)*(7 - 18*exp(2*x) + 11*exp(9*x))/63. - Elmo R. Oliveira, Dec 27 2025
MAPLE
a:= proc(n) a(n):= `if`(n=0, 0, 8*a(n-1)+2+(-1)^n) end:
seq(a(n), n=1..22); # Alois P. Heinz, Dec 27 2025
MATHEMATICA
CoefficientList[Series[(3 x + 1)/((x - 1) (x + 1) (8 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 22 2013 *)
Table[FromDigits[PadRight[{}, n, {1, 3}], 8], {n, 30}] (* Harvey P. Dale, May 15 2019 *)
PROG
(Magma) [(11*8^n+7*(-1)^n-18)/63: n in [1..30]]; // Vincenzo Librandi, Oct 22 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Colin Barker, Dec 27 2012
STATUS
approved
