cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A292732 Numbers in which 2 outnumbers all other digits together.

Original entry on oeis.org

2, 22, 122, 202, 212, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 232, 242, 252, 262, 272, 282, 292, 322, 422, 522, 622, 722, 822, 922, 1222, 2022, 2122, 2202, 2212, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2232, 2242, 2252, 2262, 2272, 2282, 2292, 2322, 2422, 2522, 2622, 2722, 2822, 2922
Offset: 1

Views

Author

Halfdan Skjerning, Sep 22 2017

Keywords

Comments

Subset of A292452.

Examples

			202 has more 2's than any other digit, whereas both 2002 and 2012 have as many other digits as 2's.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 3000], Total@ #1 < First@ #2 & @@ TakeDrop[RotateLeft[#, 2] &@ DigitCount@ #, 9] &] (* Michael De Vlieger, Sep 22 2017 *)
  • Python
    def ok(n):
      s=str(n); return s.count('2') > sum([0]+[s.count(d) for d in s if d!='2'])
    print([m for m in range(2923) if ok(m)]) # Michael S. Branicky, Feb 22 2021