OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (7,0,1,-7).
FORMULA
From Harvey P. Dale, Oct 15 2011: (Start)
a(1)=3, a(2)=23, a(3)=161, a(4)=1130, a(n) = 7*a(n-1)+a(n-3)-7*a(n-4).
G.f.: x*(2*x+3)/(7*x^4-x^3-7*x+1). (End)
a(n) = floor(161*7^n/342). - Christian Krause, Jun 06 2026
E.g.f.: exp(-x/2)*(-95*exp(3*x/2) + 161*exp(15*x/2) - 66*cos(sqrt(3)*x/2) - 26*sqrt(3)*sin(sqrt(3)*x/2))/342. - Stefano Spezia, Jun 06 2026
MATHEMATICA
With[{nn=10}, Table[FromDigits[Take[PadLeft[{}, 3nn, {3, 2, 0}], n], 7], {n, 3nn}]] (* Harvey P. Dale, Oct 15 2011 *)
(* Alternative: *)
LinearRecurrence[{7, 0, 1, -7}, {3, 23, 161, 1130}, 30] (* Harvey P. Dale, Oct 15 2011 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved
