A383198 Number of positive integers with n digits in which adjacent digits differ by at most 3.
9, 54, 328, 2000, 12202, 74458, 454366, 2772710, 16920138, 103253214, 630091042, 3845059318, 23464039746, 143186649814, 873780342786, 5332145758694, 32538816680050, 198564450196598, 1211717109125762, 7394366670845606, 45123286657530514, 275359755529253142
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (7,-4,-10,6).
Programs
-
Mathematica
LinearRecurrence[{7,-4,-10,6},{9, 54, 328, 2000},22] (* or *) 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 *)
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
Extensions
More terms from Alois P. Heinz, Apr 23 2025