A125373 Number of base 10 circular n-digit numbers with adjacent digits differing by 5 or less.
1, 10, 80, 580, 4660, 37960, 311378, 2559658, 21057948, 173287588, 1426133270, 11737272106, 96600478510, 795047628502, 6543462720560, 53854541701240, 443238127915788, 3647975524214452, 30023874009147704, 247105006940966092
Offset: 0
Links
- OEIS Wiki, Number of base k circular n-digit numbers with adjacent digits differing by d or less
- Index entries for linear recurrences with constant coefficients, signature (11, -21, -19, 34, 8, -15, -1, 2).
Programs
-
Mathematica
LinearRecurrence[{11,-21,-19,34,8,-15,-1,2},{1,10,80,580,4660,37960,311378,2559658,21057948},30] (* Harvey P. Dale, May 14 2018 *)
Formula
G.f.: (1 - x - 9*x^2 - 71*x^3 + 116*x^4 + 52*x^5 - 87*x^6 - 9*x^7 + 16*x^8)/((1 + x)(1 - 3*x + x^3)(1 - 9*x + 6*x^2 + 3*x^3 - 2*x^4)). For n<4, a(n) = 5*6^n-4*5^n = A257286(n). - M. F. Hasler, May 03 2015
Comments