login
Numbers n with property that when writing down all the nonnegative numbers from 0 to n one uses n odd digits.
0

%I #8 Jul 16 2015 02:37:29

%S 1,17,18,20,21,37,38,40,41,57,58,60,61,77,78,80,81,97,98

%N Numbers n with property that when writing down all the nonnegative numbers from 0 to n one uses n odd digits.

%C The sequence seems to stop at 98.

%e [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] uses 17 odd digits.

%t f[n_] := Block[{id = Mod[ Flatten[ Table[ IntegerDigits[i], {i, 0, n}]], 2]}, Plus @@ id]; Select[ Range[ 100], f[ # ] == # &] (* _Robert G. Wilson v_, Nov 03 2004 *)

%K base,easy,nonn,fini,full

%O 1,2

%A _Eric Angelini_, Oct 25 2004