|
|
A356929
|
|
Integers with an even number of even digits.
|
|
4
|
|
|
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 111, 113, 115, 117, 119, 120, 122, 124, 126, 128, 131, 133, 135
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Inspired by Question 2 of Olympiade Mathématique Belge 2004, Finale MAXI (see link).
The number of n-digit integers with an even number of even digits is A137233(n).
|
|
LINKS
|
|
|
EXAMPLE
|
13 has zero even digit, so 13 is a term.
124 has two even digits, so 124 is a term.
3578 has one even digit, so 3578 is not a term.
|
|
MATHEMATICA
|
Select[Range[120], EvenQ[Count[IntegerDigits[#], _?EvenQ]] &] (* Amiram Eldar, Sep 05 2022 *)
|
|
PROG
|
(Python)
def ok(n): return sum(1 for d in str(n) if d in "02468")%2 == 0
(PARI) isok(k) = (#select(x->(!(x % 2)), digits(k)) % 2) == 0; \\ Michel Marcus, Sep 06 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|