Of Cubes and Squares

Find the sum of all positive integers n n for which both n 2 n^2 and n 3 n^3 together contain each digit (including 0 0 ) exactly once.


The answer is 69.

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.

2 solutions

Chaebum Sheen
Oct 9, 2016

First, since the total number of digits in n 2 n^2 and n 3 n^3 are 10 10 , one can quickly discern that n n is a two digit number, n 2 n^2 is a 4 4 digit number and n 3 n^3 is a 6 6 digit number. Also, n 2 n^2 and n 3 n^3 cannot both start with 9 9 . This would limit n n to 96 n 47 96 \ge n \ge 47 .

Since every digit appears exactly once, note that if S ( n ) S(n) denoted the sum of digits of n n then n 2 + n 3 S ( n 2 ) + S ( n 3 ) 0 + 1 + 2 + 3 + + 9 0 ( m o d 9 ) n^2+n^3 \equiv S(n^2)+S(n^3) \equiv 0+1+2+3+\dots+9 \equiv 0 \pmod 9 Thus we discern that n 3 + n 2 0 ( m o d 9 ) n^3+n^2 \equiv 0 \pmod 9 , and thus n 0 ( m o d 3 ) n \equiv 0 \pmod 3 or n 8 ( m o d 9 ) n \equiv 8 \pmod 9

Also, n n cannot contain 0 , 1 , 5 , 6 0, 1, 5, 6 as their last digit.

This would mean the only possible values for n n are 53 , 62 , 89 53, 62, 89 and 48 , 54 , 57 , 63 , 69 , 72 , 78 , 84 , 87 , 93 48, 54, 57, 63, 69, 72, 78, 84, 87, 93 .

Since 5 3 3 53^3 contains two 7 7 s, 6 2 2 62^2 contains two 4 4 s, 8 9 3 89^3 contains two 9 9 s, 4 8 3 48^3 s contains two 1 1 s, 5 4 3 54^3 contains two 4 4 s, 5 7 3 57^3 contains two 1 1 s, 6 3 3 63^3 contains two 0 0 s, 7 2 3 72^3 contains two 3 3 s, 7 8 3 78^3 contains two 4 4 s, 8 7 3 87^3 contains two 5 5 s, these are all impossible.

So the cases remaining are 69 , 84 69, 84 and 93 93 . Since 9 3 2 93^2 and 9 3 3 93^3 both start with 8 8 ,and because both 8 4 2 84^2 and 8 4 3 84^3 contain a 5 5 , these two are not the answer.

6 9 2 = 4761 , 6 9 3 = 328509 69^2=4761, 69^3=328509 so we conclude that 69 69 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.

I could only reduce the infinite set of integers as possible answers to 47 47 to 94 94 excluding numbers containig zero ,1,5,6 as their last digit.

Me too. Furthermore Numbers from 93-99 also as there square as well as cube starts with 9.

Kushagra Sahni - 4 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...