login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A292457
Numbers where 7 outnumbers any other digit.
20
7, 77, 177, 277, 377, 477, 577, 677, 707, 717, 727, 737, 747, 757, 767, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 787, 797, 877, 977, 1077, 1277, 1377, 1477, 1577, 1677, 1707, 1727, 1737, 1747, 1757, 1767, 1770, 1772, 1773, 1774, 1775, 1776, 1777
OFFSET
1,1
LINKS
EXAMPLE
707 has more 7's than any other digit, whereas 7007 has as many 0's as 7's.
MATHEMATICA
Select[Range[0, 2000], Max@ #1 < First@ #2 & @@ TakeDrop[RotateLeft[#, 7] &@ DigitCount@ #, 9] &] (* Michael De Vlieger, Sep 18 2017 *)
Select[Range[2000], Max[Drop[DigitCount[#], {7}]]<DigitCount[#, 10, 7]&] (* Harvey P. Dale, Oct 07 2023 *)
PROG
(PARI) isok(n) = {d = digits(n); v = vector(10, n, #select(x->x==(n-1), d)); for (k=1, #v, if ((k != 8) && (v[k] >= v[8]), return(0)); ); return(1); } \\ Michel Marcus, Sep 21 2017
KEYWORD
nonn,base
AUTHOR
Halfdan Skjerning, Sep 18 2017
STATUS
approved