Go back
Upside Down Numbers

Upside Down Numbers

Posers and Puzzles

X
Cancerous Bus Crash

p^2.sin(phi)

Joined
06 Sep 04
Moves
25076
Clock
23 Nov 06
2 edits
Vote Up
Vote Down

I'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.

pawnfondler
no edits

Behind you

Joined
14 Mar 05
Moves
10935
Clock
23 Nov 06
Vote Up
Vote Down

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?

X
Cancerous Bus Crash

p^2.sin(phi)

Joined
06 Sep 04
Moves
25076
Clock
23 Nov 06
Vote Up
Vote Down

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?
You're forgetting that numbers that read the same either way up don't need an underline. The rest of your logic seems fine.

ab

Joined
28 Nov 05
Moves
24334
Clock
23 Nov 06
Vote Up
Vote Down

Originally posted by XanthosNZ
Is there a general answer for a series ending at 10^N - 1?
probably.
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

ab

Joined
28 Nov 05
Moves
24334
Clock
24 Nov 06
Vote Up
Vote Down

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

for N=1 underlines = (5^1)-1 - ((3)-1) = 4 - 2 = 2
for N=2 underlines = (5^2)-1 - ((5)-1) = 24 - 4 = 20

ab

Joined
28 Nov 05
Moves
24334
Clock
28 Nov 06
Vote Up
Vote Down

5^n - ( 5^INT(n/2) x 3^INT((n+1)/2) )

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.