login
A383198
Number of positive integers with n digits in which adjacent digits differ by at most 3.
5
9, 54, 328, 2000, 12202, 74458, 454366, 2772710, 16920138, 103253214, 630091042, 3845059318, 23464039746, 143186649814, 873780342786, 5332145758694, 32538816680050, 198564450196598, 1211717109125762, 7394366670845606, 45123286657530514, 275359755529253142
OFFSET
1,1
FORMULA
G.f.: -x*(10*x^3-14*x^2-9*x+9)/(6*x^4-10*x^3-4*x^2+7*x-1). - Alois P. Heinz, Apr 23 2025
MATHEMATICA
LinearRecurrence[{7, -4, -10, 6}, {9, 54, 328, 2000}, 22] (* James C. McMahon, May 01 2025 *)
(* Alternative: *)
Rest[CoefficientList[Series[(-x*(10*x^3-14*x^2-9*x+9)/(6*x^4-10*x^3-4*x^2+7*x-1)), {x, 0, 22}], x]] (* James C. McMahon, May 01 2025 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Edwin Hermann, Apr 19 2025
EXTENSIONS
More terms from Alois P. Heinz, Apr 23 2025
STATUS
approved