A383200 Number of positive integers with n digits in which adjacent digits differ by at most 5.
9, 74, 610, 5020, 41317, 340050, 2798709, 23034169, 189577752, 1560278726, 12841536934, 105689495131, 869854553902, 7159149960981, 58921836913893, 484943447787706, 3991222267830858, 32848892512931768, 270355712339865433, 2225104276073281126, 18313239977617203949
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (8,3,-9,-1,2).
Programs
-
Mathematica
Rest[CoefficientList[Series[-x*(2*x^4-x^3-9*x^2+2*x+9)/((x+1)*(2*x^4-3*x^3-6*x^2+9*x-1)),{x,0,21}],x]] (* or *) LinearRecurrence[{8,3,-9,-1,2},{9,74,610,5020,41317},21] (* James C. McMahon, May 08 2025 *)
Formula
G.f.: -x*(2*x^4-x^3-9*x^2+2*x+9)/((x+1)*(2*x^4-3*x^3-6*x^2+9*x-1)). - Alois P. Heinz, Apr 26 2025
Extensions
a(11)-a(21) from Alois P. Heinz, Apr 26 2025