OFFSET
1,1
COMMENTS
Subset of A292456.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
606 has more 6's than any other digit, whereas both 6006 and 6016 have as many other digits as 6's.
MAPLE
F:= proc(d) local s, m, T;
s:= 6*(10^d-1)/9;
T:= select(`>=`, {seq(seq(seq(s+G(c, k), k = 0 .. 10^m-1), c = combinat:-choose([$0..d-1], m)), m=0 .. floor((d-1)/2))}, 10^(d-1));
op(sort(convert(T, list)))
end proc:
G:= proc(c, k) local L, m, j;
m:= nops(c);
L:= convert(10^m+k, base, 10);
add((L[j]-6)*10^c[j], j=1..m)
end proc:
seq(F(d), d=1..4); # Robert Israel, Sep 24 2017
MATHEMATICA
Select[Range[0, 6700], Total@ #1 < First@ #2 & @@ TakeDrop[RotateLeft[#, 6] &@ DigitCount@ #, 9] &] (* Michael De Vlieger, Sep 22 2017 *)
CROSSREFS
KEYWORD
AUTHOR
Halfdan Skjerning, Sep 22 2017
STATUS
approved