OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,0,1,-3).
FORMULA
G.f.: x*(2+x^2) / ( (x-1)*(3*x-1)*(1+x+x^2) ). - R. J. Mathar, Nov 21 2011
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 0, 1}], 3], {n, 30}] (* or *) LinearRecurrence[{3, 0, 1, -3}, {2, 6, 19, 59}, 30] (* Harvey P. Dale, Jun 30 2022 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -3, 1, 0, 3]^(n-1)*[2; 6; 19; 59])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved
