A098941 Numbers where 2 is the only even decimal digit.
2, 12, 21, 22, 23, 25, 27, 29, 32, 52, 72, 92, 112, 121, 122, 123, 125, 127, 129, 132, 152, 172, 192, 211, 212, 213, 215, 217, 219, 221, 222, 223, 225, 227, 229, 231, 232, 233, 235, 237, 239, 251, 252, 253, 255, 257, 259, 271, 272, 273, 275, 277, 279, 291, 292
Offset: 1
Programs
-
Mathematica
Select[Range[300],Union[Select[IntegerDigits[#],EvenQ]]=={2}&] (* Harvey P. Dale, May 20 2012 *)
-
Perl
for (0..1000) { print "$_, " if (/^[123579]*2[123579]*$/) } # Charles R Greathouse IV, Oct 05 2011
Comments