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.

A292452 Numbers where 2 outnumbers any other digit.

This page as a plain text file.
%I A292452 #25 Feb 22 2021 09:14:03
%S A292452 2,22,122,202,212,220,221,222,223,224,225,226,227,228,229,232,242,252,
%T A292452 262,272,282,292,322,422,522,622,722,822,922,1022,1202,1220,1222,1223,
%U A292452 1224,1225,1226,1227,1228,1229,1232,1242,1252,1262,1272,1282,1292,1322,1422
%N A292452 Numbers where 2 outnumbers any other digit.
%e A292452 202 has more 2's than any other digit, whereas 2002 has as many 0's as 2's.
%t A292452 Select[Range[0, 1300], Max@ #1 < First@ #2 & @@ TakeDrop[RotateLeft[#, 2] &@ DigitCount@ #, 9] &] (* _Michael De Vlieger_, Sep 16 2017 *)
%o A292452 (Python)
%o A292452 def ok(n):
%o A292452   s=str(n); return s.count('2') > max([0]+[s.count(d) for d in s if d!='2'])
%o A292452 print([m for m in range(1500) if ok(m)]) # _Michael S. Branicky_, Feb 22 2021
%Y A292452 Cf. A292449, A292450, A292451, A292453, A292454, A292455, A292456, A292457, A292458.
%K A292452 nonn,base,easy
%O A292452 1,1
%A A292452 _Halfdan Skjerning_, Sep 16 2017