OFFSET
1,1
MATHEMATICA
Select[Range[300], DigitCount[#, 5, 0]==DigitCount[#, 5, 1]>0&] (* Harvey P. Dale, Oct 16 2019 *)
PROG
(Python)
from sympy.ntheory import count_digits
def ok(n): c = count_digits(n, 5); return 0 in c and 1 in c and c[0] == c[1]
print(list(filter(ok, range(291)))) # Michael S. Branicky, May 27 2021
(PARI) is(n) = my(d=vecsort(digits(n, 5)), e=vector(#d), f=vector(#d, t, 1), side=#setintersect(d, e), sidf=#setintersect(d, f)); side==sidf && side > 0 \\ Felix Fröhlich, May 27 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved