Find the sum of all positive integers for which both and together contain each digit (including ) exactly once.
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.
First, since the total number of digits in n 2 and n 3 are 1 0 , one can quickly discern that n is a two digit number, n 2 is a 4 digit number and n 3 is a 6 digit number. Also, n 2 and n 3 cannot both start with 9 . This would limit n to 9 6 ≥ n ≥ 4 7 .
Since every digit appears exactly once, note that if S ( n ) denoted the sum of digits of n then n 2 + n 3 ≡ S ( n 2 ) + S ( n 3 ) ≡ 0 + 1 + 2 + 3 + ⋯ + 9 ≡ 0 ( m o d 9 ) Thus we discern that n 3 + n 2 ≡ 0 ( m o d 9 ) , and thus n ≡ 0 ( m o d 3 ) or n ≡ 8 ( m o d 9 )
Also, n cannot contain 0 , 1 , 5 , 6 as their last digit.
This would mean the only possible values for n are 5 3 , 6 2 , 8 9 and 4 8 , 5 4 , 5 7 , 6 3 , 6 9 , 7 2 , 7 8 , 8 4 , 8 7 , 9 3 .
Since 5 3 3 contains two 7 s, 6 2 2 contains two 4 s, 8 9 3 contains two 9 s, 4 8 3 s contains two 1 s, 5 4 3 contains two 4 s, 5 7 3 contains two 1 s, 6 3 3 contains two 0 s, 7 2 3 contains two 3 s, 7 8 3 contains two 4 s, 8 7 3 contains two 5 s, these are all impossible.
So the cases remaining are 6 9 , 8 4 and 9 3 . Since 9 3 2 and 9 3 3 both start with 8 ,and because both 8 4 2 and 8 4 3 contain a 5 , these two are not the answer.
6 9 2 = 4 7 6 1 , 6 9 3 = 3 2 8 5 0 9 so we conclude that 6 9 is the one and only answer.
I admit this is not the nicest answer. It was one of the problems in my old math workbook, and because there was not solution, I had to add my own.