A383070 Number of n-digit positive integers where all pairs of consecutive digits have a difference of at least 2.
9, 64, 463, 3341, 24125, 174172, 1257515, 9079056, 65549673, 473259806, 3416873920, 24669378486, 178109665460, 1285928315349, 9284233050564, 67030939539430, 483954553287069, 3494088121160674, 25226855944238001, 182134576675940879, 1314987650245129696
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (4,22,11,-14,-3).
Programs
-
Mathematica
LinearRecurrence[{4,22,11,-14,-3},{9, 64, 463, 3341, 24125},21] (* or *) Rest[CoefficientList[Series[x*(3*x^4+18*x^3-9*x^2-28*x-9)/(-3*x^5-14*x^4+11*x^3+22*x^2+4*x-1),{x,0,21}] ,x]] (* James C. McMahon, Apr 15 2025 *)
Formula
G.f.: x*(3*x^4+18*x^3-9*x^2-28*x-9)/(-3*x^5-14*x^4+11*x^3+22*x^2+4*x-1). - Alois P. Heinz, Apr 15 2025
Extensions
More terms from Alois P. Heinz, Apr 15 2025