So before we begin, let me just tell you that this is a pretty useless thing to do.. But I was playing around with it while waiting for a C++ project to finish compiling, so why not!

The code (click here for the Gist):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
magic = 0x616f-0x414f

numbers = [
    (magic/0x186A0),
    (magic/0x3E8/8),
    (magic/0x3E8/4),
    (magic/0o1534-7),
    (magic/0x3E8/2),
    (magic/0o2534-1),
    (magic/0o2544),
    (magic/0o075/19),
    (magic/0o064/19),
    (magic/0o1654)
]

i = c = numbers[0]

while True:
    print('%d%d' % (c, round(numbers[int(i)])))
    i += 1
    if i>len(numbers)-1:
        i = 0
        c += 1

If you ran it, it would look like this!

The numbers list in the code above is just an obfuscated way of writing 0..9.

The only real logic in this is the body of the while loop which prepends a zero each time it hits the end of the range.

This demonstrates the ability to count and not rely on the decimal system for example.