login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Olympiade Mathématique Belge, OMB 2004, Finale Maxi, Question 2.
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
print([k for k in range(120) if ok(k)]) # Michael S. Branicky, Sep 05 2022
(PARI) isok(k) = (#select(x->(!(x % 2)), digits(k)) % 2) == 0; \\ Michel Marcus, Sep 06 2022
CROSSREFS
Cf. A137233.
Sequence in context: A038124 A172273 A329835 * A187349 A238704 A338742
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 05 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:24 EDT 2024. Contains 371962 sequences. (Running on oeis4.)