This is also known as Base 8.
0000
0001
0002
0003
0004
0005
0006
0007 (here's the tricky part . . .)
0010
0011
0012
etc.
and e.g.
6776
6777 (note the big skip here. . .)
7000
7001
etc.
You're simply skipping numbers with 8 and 9 in any position. Take all of those numbers (e.g. 1008, 7890, 8001. . .) and subtract them from 10,000 and you get . . . 4096.