Ancient Caligraphy

Logic Level 5

How many 6 digit positive integers satisfy the condition that when I write the number upside down in digital format , it increases in value by 520044?

Details and Assumptions :

  • All digits look like this in digital format:

  • Clarification: These numbers can't consist of digits 3, 4, or 7 because they are not readable when written upside down.

  • As an explicit example, when the number 120586 is written upside down, the number becomes 985021 so it increases in value by 864435.


The answer is 7.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Nick Kent
Jul 11, 2019

Let's overview all digit changes upon turning them "upside down":

p q
0 0
1 1
2 2
5 5
6 9
8 8
9 6

As it was mentioned, numbers 3, 4 and 7 cannot be used.

We are working with 6-digit integers. Let's see what is difference between the integer and its "upside down":

p 5 p 4 p 3 p 2 p 1 p 0 q 0 q 1 q 2 q 3 q 4 q 5 = 10 5 p 5 + 10 4 p 4 + 10 3 p 3 + 10 2 p 2 + 10 1 p 1 + 10 0 p 0 10 5 q 0 10 4 p 1 10 3 p 2 10 2 p 3 10 1 p 4 10 0 p 5 = [ 10 5 ( p 5 q 0 ) + 10 0 ( p 0 q 5 ) ] + [ 10 4 ( p 4 q 1 ) + 10 1 ( p 1 q 4 ) ] + [ 10 3 ( p 3 q 2 ) + 10 2 ( p 2 q 3 ) ] = O 5 , 0 + O 4 , 1 + O 3 , 2 \overline { { p }_{ 5 }{ p }_{ 4 }{ p }_{ 3 }{ p }_{ 2 }{ p }_{ 1 }{ p }_{ 0 } } -\overline { { q }_{ 0 }{ q }_{ 1 }{ q }_{ 2 }{ q }_{ 3 }{ q }_{ 4 }{ q }_{ 5 } } ={ 10 }^{ 5 }\cdot { p }_{ 5 }+{ 10 }^{ 4 }\cdot { p }_{ 4 }+{ 10 }^{ 3 }\cdot { p }_{ 3 }+{ 10 }^{ 2 }\cdot { p }_{ 2 }+{ 10 }^{ 1 }\cdot { p }_{ 1 }+{ 10 }^{ 0 }\cdot { p }_{ 0 }-{ 10 }^{ 5 }\cdot { q }_{ 0 }-{ 10 }^{ 4 }\cdot { p }_{ 1 }-{ 10 }^{ 3 }\cdot { p }_{ 2 }-{ 10 }^{ 2 }\cdot { p }_{ 3 }-{ 10 }^{ 1 }\cdot { p }_{ 4 }-{ 10 }^{ 0 }\cdot { p }_{ 5 }=[{ 10 }^{ 5 }\cdot({ p }_{ 5 }-{ q }_{ 0 })+{ 10 }^{ 0 }\cdot({ p }_{ 0 }-{ q }_{ 5 })]+[{ 10 }^{ 4 }\cdot({ p }_{ 4 }-{ q }_{ 1 })+{ 10 }^{ 1 }\cdot({ p }_{ 1 }-{ q }_{ 4 })]+[{ 10 }^{ 3 }\cdot({ p }_{ 3 }-{ q }_{ 2 })+{ 10 }^{ 2 }\cdot({ p }_{ 2 }-{ q }_{ 3 })]={ O }_{ 5, 0 }+{ O }_{ 4, 1 }+{ O }_{ 3, 2 }

As we can see the difference is sum of three numbers. Notice that only O 5 , 0 { O }_{ 5, 0 } defines the last digit of the difference. Similarly the first digit is almost completely dependent on O 5 , 0 { O }_{ 5, 0 } , except it can be less by 1 because O 4 , 1 { O }_{ 4, 1 } or p 0 q 5 { p }_{ 0 }-{ q }_{ 5 } may be negative or other. That means:

{ p 5 q 0 = 5 ( o r 6 ) p 0 q 5 = 4 ( o r 6 ) \begin{cases} { p }_{ 5 }-{ q }_{ 0 }=5\quad (or\quad 6) \\ { p }_{ 0 }-{ q }_{ 5 }=4\quad (or\quad -6) \end{cases}

It's easy to see that the only possible digits are: p 0 = 2 , p 5 = 8 { p }_{ 0 }=2, { p }_{ 5 }=8 (correspondingly, q 0 = 2 , q 5 = 8 { q }_{ 0 }=2, { q }_{ 5 }=8 ). That means that O 5 , 0 { O }_{ 5, 0 } equals 599994. Thus O 4 , 1 + O 3 , 2 = 79950 { O }_{ 4, 1 }+{ O }_{ 3, 2 }=-79950

Similarly digits -7 and 5 are defined by O 4 , 1 { O }_{ 4, 1 } , except the first digit can vary by 1 (plus or minus). Since O 4 , 1 { O }_{ 4, 1 } depends only on p 1 , p 4 { p }_{ 1 }, { p }_{ 4 } , it's easy to find that the only possible values are p 1 = 6 , p 4 = 1 { p }_{ 1 }=6, { p }_{ 4 }=1 ( q 1 = 9 , q 4 = 1 { q }_{ 1 }=9, { q }_{ 4 }=1 ). That means O 4 , 1 = 79950 { O }_{ 4, 1 }=-79950 and O 3 , 2 = 0 { O }_{ 3, 2 }=0 . Getting O 3 , 2 = 0 { O }_{ 3, 2 }=0 is very easy because for every p 2 { p }_{ 2 } there is only p 3 { p }_{ 3 } that fits:

p 2 { p }_{ 2 } p 3 { p }_{ 3 }
0 0
1 1
2 2
5 5
6 9
8 8
9 6

Thus we have 7 \boxed{7} possible integers that satisfy the condition:

p 5 p 4 p 3 p 2 p 1 p 0 \overline { { p }_{ 5 }{ p }_{ 4 }{ p }_{ 3 }{ p }_{ 2 }{ p }_{ 1 }{ p }_{ 0 } } q 0 q 1 q 2 q 3 q 4 q 5 \overline { { q }_{ 0 }{ q }_{ 1 }{ q }_{ 2 }{ q }_{ 3 }{ q }_{ 4 }{ q }_{ 5 } }
810062 290018
811162 291118
812262 292218
815562 295518
816962 296918
818862 298818
819662 299618

I don't remember how I solved my question anymore but I believed it's similar to yours.

Thanks for sharing your approach!

Pi Han Goh - 1 year, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...