login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A098159
Numbers n with property that when writing down all the nonnegative numbers from 0 to n one uses n odd digits.
0
1, 17, 18, 20, 21, 37, 38, 40, 41, 57, 58, 60, 61, 77, 78, 80, 81, 97, 98
OFFSET
1,2
COMMENTS
The sequence seems to stop at 98.
EXAMPLE
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] uses 17 odd digits.
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A043870 A296865 A188049 * A241847 A295487 A308888
KEYWORD
base,easy,nonn,fini,full
AUTHOR
Eric Angelini, Oct 25 2004
STATUS
approved