%I #9 Nov 21 2013 12:48:42
%S 20,112,132,152,172,192,201,221,241,261,281,1013,1033,1053,1073,1093,
%T 1103,1123,1143,1163,1183,1213,1233,1253,1273,1293,1303,1323,1343,
%U 1363,1383,1413,1433,1453,1473,1493,1503,1523,1543,1563,1583,1613,1633,1653
%N Leftmost digit of a(n) represents the number of even digits in a(n); rightmost digit of a(n) represents the number of odd digits in a(n).
%e 20 has two even digits ("2" and "0") and zero odd digit; 112 has one even digit ("2") and two odd digits ("1" and "1"), etc.
%t okQ[n_]:=Module[{idn=IntegerDigits[n]},First[idn]== Count[idn,_?EvenQ]&&Last[idn]==Count[idn,_?OddQ]]; Select[Range[2000],okQ] (* _Harvey P. Dale_, Mar 13 2011 *)
%K base,easy,nonn
%O 1,1
%A _Eric Angelini_, Jun 12 2005
|