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.

A356929 Integers with an even number of even digits.

This page as a plain text file.
%I A356929 #18 Sep 07 2022 04:09:54
%S A356929 1,3,5,7,9,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,42,44,46,
%T A356929 48,51,53,55,57,59,60,62,64,66,68,71,73,75,77,79,80,82,84,86,88,91,93,
%U A356929 95,97,99,100,102,104,106,108,111,113,115,117,119,120,122,124,126,128,131,133,135
%N A356929 Integers with an even number of even digits.
%C A356929 Inspired by Question 2 of Olympiade Mathématique Belge 2004, Finale MAXI (see link).
%C A356929 The number of n-digit integers with an even number of even digits is A137233(n).
%H A356929 Olympiade Mathématique Belge, <a href="http://omb.sbpm.be/modules/finale/article.php?storyid=86">OMB 2004, Finale Maxi, Question 2</a>.
%H A356929 <a href="/index/O#Olympiads">Index to sequences related to Olympiads</a>.
%e A356929 13 has zero even digit, so 13 is a term.
%e A356929 124 has two even digits, so 124 is a term.
%e A356929 3578 has one even digit, so 3578 is not a term.
%t A356929 Select[Range[120], EvenQ[Count[IntegerDigits[#], _?EvenQ]] &] (* _Amiram Eldar_, Sep 05 2022 *)
%o A356929 (Python)
%o A356929 def ok(n): return sum(1 for d in str(n) if d in "02468")%2 == 0
%o A356929 print([k for k in range(120) if ok(k)]) # _Michael S. Branicky_, Sep 05 2022
%o A356929 (PARI) isok(k) = (#select(x->(!(x % 2)), digits(k)) % 2) == 0; \\ _Michel Marcus_, Sep 06 2022
%Y A356929 Cf. A137233.
%K A356929 nonn,base
%O A356929 1,2
%A A356929 _Bernard Schott_, Sep 05 2022