- 23 Nov '06 05:36 / 2 editsI'm writing a series of number labels and I need to ensure that the label is not read upside down so I underline any label that could be read upside down and if doing so would give a different number than reading it right way up. As I'm doing so I wonder, how many labels will need the underline?

Note:

A number can be read upside down if and only if it consists of only 0, 1, 6, 8 and 9. Leading zeroes are allowed in the upside down versions (so 1000 can be read upside down).

So how many labels do I have to underline when my series goes from 001 to 999? What about to 9999? Is there a general answer for a series ending at 10^N - 1?

EDIT: Although I did mention it, it should be properly stated that numbers will be padded with leading zeros to all have N digits (the same N as in the 10^N - 1) and that labels which when read upside down are the same do not need underlines (so if going to 999, 111 doesn't need an underline but 011 does).

EDIT2: The real thrust of the question will follow once the preliminary answers have been worked out. - 23 Nov '06 08:35

You're forgetting that numbers that read the same either way up don't need an underline. The rest of your logic seems fine.*Originally posted by pawnfondler***so any number in the 200,300,400,500 and 700 sections would be out? as well as any number with 2 3 4 5 and 7 in it. so would i be correct by saying find out how many numbers can be upside down in a single hundred section and multiply by 5? and same would apply for the 000-9999?** - 23 Nov '06 08:43

probably.*Originally posted by XanthosNZ***Is there a general answer for a series ending at 10^N - 1?**

The number of candidates for underlining is 5^N - 1

Then we need to weed out those that are symmetrical, like 010, 818, 619 which should be formulaic

for N=3 symmetricals = (5x3)-1

for N=4 symmetricals = (5x5)-1

for N=5 symmetricals = (5x5x3)-1

for N=6 symmetricals = (5x5x5)-1

and I guess

for N=7 symmetricals = (5x5x5x3)-1

for N=8 symmetricals = (5x5x5x5)-1

for N=3 underlines = (5^3)-1 - ((5x3)-1) = 124 - 14 = 110

for N=4 underlines = (5^4)-1 - ((5x5)-1) = 624 - 24 = 600