A375214 Odd numbers with equal numbers of even and odd digits.
21, 23, 25, 27, 29, 41, 43, 45, 47, 49, 61, 63, 65, 67, 69, 81, 83, 85, 87, 89, 1001, 1003, 1005, 1007, 1009, 1021, 1023, 1025, 1027, 1029, 1041, 1043, 1045, 1047, 1049, 1061, 1063, 1065, 1067, 1069, 1081, 1083, 1085, 1087, 1089, 1201, 1203, 1205, 1207, 1209, 1221, 1223, 1225
Offset: 1
Examples
1001 is odd and has two even digits (0,0) and two odd digits (1,1).
Links
- Jake L Lande, Table of n, a(n) for n = 1..1000
Programs
-
Maple
filter:= proc(n) local L; L:= convert(n,base,10); nops(select(type,L,even))=nops(L)/2 end proc: select(filter, [seq(seq(i,i=10^(d-1)+1 .. 10^d, 2),d=2..4,2)]); # Robert Israel, Aug 07 2024
-
Mathematica
eeo[n_] := (id = IntegerDigits[n]; Count[EvenQ@id, True] == Count[OddQ@id, True]); Select[Select[Range[1225], eeo], Mod[#, 2] == 1 &]
Comments