A383307 a(n) is number of n-digit nonnegative integers whose difference between the largest and smallest digits is equal to the mode of its digits.
1, 0, 30, 631, 8318, 84939, 762621, 6836799, 66714966, 698183347, 7345264685, 74862560359, 738289921745, 7152117119827, 69258386123495, 678852874461343, 6757612542040310, 67956663939884115, 684414144298352061, 6858156111567293583, 68247431544857431593, 675967074881581484903
Offset: 1
Links
- Wikipedia, Mode (statistics)
Programs
-
Mathematica
a[n_]:=Module[{c=KroneckerDelta[n,1]}, For[k=10^(n-1), k<=10^n, k++, If[{Max[d=IntegerDigits[k]]-Min[d]}==Commonest[d], c++]]; c]; Array[a,6]
Formula
Conjecture: lim_{n->oo} a(n+1)/a(n) = 10. - Stefano Spezia, Apr 26 2025
Extensions
More terms from Bert Dobbelaere, Apr 25 2025