[go: up one dir, main page]

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”).

A352546
Numbers having more even than odd digits when written in base 10.
3
0, 2, 4, 6, 8, 20, 22, 24, 26, 28, 40, 42, 44, 46, 48, 60, 62, 64, 66, 68, 80, 82, 84, 86, 88, 100, 102, 104, 106, 108, 120, 122, 124, 126, 128, 140, 142, 144, 146, 148, 160, 162, 164, 166, 168, 180, 182, 184, 186, 188, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 212
OFFSET
1,2
MATHEMATICA
A352546Q[k_] := Length[#] > 2*Count[#, _?OddQ] & [IntegerDigits[k]];
Select[Range[0, 300], A352546Q] (* Paolo Xausa, Nov 28 2024 *)
PROG
(PARI) select( {is_A352546(n)=vecsum(n=digits(n)%2)*2<#n+!n}, [0..222])
(Python)
def ok(n): return len(s:=str(n)) < 2*sum(1 for c in s if c in "02468")
print([k for k in range(213) if ok(k)]) # Michael S. Branicky, Jul 03 2022
CROSSREFS
Cf. A072603 (same in base 2).
Cf. A117076 (subsequence of primes).
Cf. A352547 (numbers having more odd than even decimal digits).
Sequence in context: A053198 A249278 A273892 * A179082 A341869 A194376
KEYWORD
nonn,base,changed
AUTHOR
M. F. Hasler, Jul 03 2022
STATUS
approved