Thrilling Three Digit Numbers

Consider all three-digit numbers that are 543 more than the sum of the squares of their digits. What is the sum of these numbers?

Details and assumptions :

  • The sum of zero numbers is 0.


The answer is 2626.

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.

21 solutions

Tim Vermeulen
Oct 20, 2013

All three-digit numbers that satisfy are of the form a b c = 100 a + 10 b + c = 543 + a 2 + b 2 + c 2 , \overline{abc} = 100a + 10b + c = 543 + a^2 + b^2 + c^2, with a , b , c a,b,c being three single-digit (non-negative) numbers. Rearrangement yields a ( 100 a ) = b ( b 10 ) + c ( c 1 ) + 543. a(100-a) = b(b-10) + c(c-1) + 543. We know that 25 b ( b 10 ) 0 , 0 c ( c 1 ) 72 , \begin{aligned} -25 &\leq b(b-10) \leq 0, \\ 0 &\leq c(c-1) \leq 72, \end{aligned} so 25 b ( b 10 ) + c ( c 1 ) 72 -25 \leq b(b-10) + c(c-1) \leq 72 and equivalently 518 b ( b 10 ) + c ( c 1 ) + 543 615 518 \leq b(b-10) + c(c-1) + 543 \leq 615 or 518 a ( 100 a ) 615 a = 6. 518 \leq a(100-a) \leq 615 \implies a = 6. Then a b c = 100 a + 10 b + c = 600 + 10 b + c = 543 + 36 + b 2 + c 2 , \overline{abc} = 100a + 10b + c = 600 + 10b + c = 543 + 36 + b^2 + c^2, implying 10 b + c + 21 = b 2 + c 2 c ( c 1 ) = b ( 10 b ) + 21. 10b + c + 21 = b^2 + c^2 \implies c(c-1) = b(10-b) + 21. By plugging in different values of b b , it is easily verifiable that ( a , b , c ) { ( 6 , 1 , 6 ) , ( 6 , 9 , 6 ) , ( 6 , 3 , 7 ) , ( 6 , 7 , 7 ) } . (a,b,c) \in \{ (6,1,6), (6,9,6), (6,3,7), (6,7,7) \}. The sum of the corresponding numbers is 616 + 696 + 637 + 677 = 2626 616 + 696 + 637 + 677 = 2626 and hence the answer is 2626 \boxed{2626} .

Moderator note:

Nicely done!

How did you come to the conclusion that 25 b ( b 10 ) 0 -25 \leq b(b-10) \leq 0 and that 0 c ( c 1 ) 72 0 \leq c(c-1) \leq 72 ?

A Former Brilliant Member - 7 years, 7 months ago

Log in to reply

b + ( 10 b ) 2 b ( 10 b ) (by AM-GM) 5 b ( 10 b ) b ( 10 b ) 25 b ( b 10 ) 25 b 9 b 10 1 b ( b 10 ) 0 c 9 c 1 8 c ( c 1 ) 9 8 = 72 \begin{aligned} \frac{b + (10-b)}{2} &\geq \sqrt{b(10-b)} \quad \text{(by AM-GM)} \\ 5 &\geq \sqrt{b(10-b)} \\ b(10-b) &\leq 25 \\ b(b-10) &\geq -25 \\ \\ b &\leq 9 \\ b-10 &\leq -1 \\ b(b-10) &\leq 0 \\ \\ c &\leq 9 \\ c-1 &\leq 8 \\ c(c-1) &\leq 9 \cdot 8 = 72 \end{aligned}

Does that clear things up? :)

Tim Vermeulen - 7 years, 7 months ago

Log in to reply

Yes, thank you. :)

A Former Brilliant Member - 7 years, 7 months ago

Consider functions like x(x-10)[for 'b'] and x(x-1)[for 'c'], as they are upward parabolas, it becomes easier to find the maximum and minimum on a given interval, especially when we are considering only integers. Fine enough?

Arya Samanta - 5 years ago

very nice resolution,good job

Willie Zhi Jie Zhang - 7 years, 7 months ago

Log in to reply

Thanks! :)

Tim Vermeulen - 7 years, 7 months ago

Typo. !! 2 \Large \color{#D61F06}{2} 626

Niranjan Khanderia - 5 years, 8 months ago

The same logic! In my case, I created a nice table of a ( 100 a ) a(100 -a) b ( 10 b ) b(10 -b) and c ( 1 c ) c(1-c) , and the rest was just to compare the values, even though some of them was pretty obvious. So happy that I answer a level 4 number theory questions, and when I saw that the average time to answer it was more then 1 hour... best feeling ever, orgasmic!!!

Marco Antonio - 5 years, 6 months ago

Umm, shouldn't it be 25 \leb ( b 10 ) 9 -25\leb\left(b-10\right)\le-9

Tapas Mazumdar - 4 years, 9 months ago

Absolutely superb I got stuck in the method how to find a complete set of such numbers.

Arnav Das - 5 years, 11 months ago

##python 2.7
for abc in range(100,999):
    abc2=abc
    a=abc/100
    abc = abc - 100*a
    b = abc/10
    abc = abc -10*b
    c = abc

    if abc2-(a*a +b*b +c*c)==543:
        print abc2

Ron Nueda - 7 years, 7 months ago

Log in to reply

here's my python

n=100
sum=0
while n <= 999:
  a = n % 10
  b = (n / 10) % 10
  c = (n / 100) % 10
  abc_square_sum = (a**2) + (b**2) + (c**2)
  if n - abc_square_sum == 543:
     sum = sum + n
  n=n+1
print "Answer is",sum % 1000

Angel Leon - 7 years, 7 months ago

Log in to reply

for x in range(1,10):

for y in range(0,10):

    for z in range(0,10):

        a = 100*x+10*y+z-x**2-y**2-z**2

        if a == 543:

            print(x,y,z)

is mine; I printed the numbers separately so I could check them.

William Cui - 7 years, 7 months ago

Log in to reply

@William Cui damn! I'm going to assume this works. Can you explain your logic?

In my case I tried to translate the description of the problem as much as I could into code so it would be readable.

t I suppose that this is how you see each digit (of the 3) moving independently, very clever. This way you don't need to extract the digits (if you don't know about the modulus operator)

Angel Leon - 7 years, 7 months ago

I also did the same way in C!!!

Souvik Ghosh - 5 years, 7 months ago

if 999 had been part of the sum, your algorithm wouldn't have worked, since range returns numbers between [a,b), in your code it's not performing the test against 999, only until 998.

Also your output doesn't give the final answer, just the numbers found.

Please read mine. I think I have a much simpler way of finding the digits using modular calculations.

Learn to use the % operators (Modulus), it will help you a lot as a programmer.

Angel Leon - 7 years, 7 months ago

Let a b c \overline{abc} denote such three-digit number, where a , b , c { 0 , 1 , , 9 } a,b,c \in \{0,1,\dots,9\} and a 0. a\neq 0. The required condition is 100 a + 10 b + c = a b c = 543 + a 2 + b 2 + c 2 . ( ) 100a+10b+c=\overline{abc} = 543 + a^2+b^2+c^2.\quad\quad (*) Since 1 a 2 + b 2 + c 2 9 2 + 9 2 + 9 2 = 243 , 1 \le a^2+b^2+c^2 \le 9^2+9^2+9^2 = 243, it follows that 5 a 7 5 \le a \le 7 . Consider 3 3 cases:

case 1 \textbf{case 1} : If a = 5 , a= 5, then condition ( ) (*) becomes ( 10 b b 2 ) + c ( 1 c ) = 68. (10b-b^2)+c(1-c) = 68. Since 10 b b 2 4 ( 1 ) ( 0 ) 100 4 ( 1 ) = 25 10b-b^2 \le \frac{4(-1)(0)-100}{4(-1)}=25 and c ( 1 c ) 0 c(1-c) \le 0 , it follows that this equation has no solution. Hence a 5. a \neq 5.

case 2 \textbf{case 2} : If a = 6 , a= 6, then condition ( ) (*) becomes b 2 10 b + ( c 2 c 21 ) = 0. b^2-10b+(c^2-c-21) = 0. This is a quadratic equation in b b with an integer solution, namely b b , so the discriminant must be a perfect square. That is 100 4 ( c 2 c 21 ) = 4 ( 46 ( c 1 ) c ) 100-4(c^2-c-21) = 4(46-(c-1)c) is a perfect square. Since 4 4 is a perfect square, we have 46 ( c 1 ) c 46-(c-1)c is a perfect square. It can be easily checked that this occurs when c = 6 c=6 or c = 7 c=7 . Consider the following subcases:

case 2.1 \textbf{case 2.1} : If c = 6 c=6 , then by the quadratic formula, we have b = 10 ± 4 ( 46 ( c 1 ) c ) 2 = 10 ± 2 ( 4 ) 2 = 1 , 9. b = \frac{10\pm \sqrt{4(46-(c-1)c)}}{2}=\frac{10 \pm 2(4)}{2} = 1,\,9. So for this case we have a b c = 616 or 696 . \overline{abc} = \boxed{616} \quad \text{or} \quad \boxed{696}.

case 2.2 \textbf{case 2.2} : If c = 7 c=7 , then by the quadratic formula, we have b = 10 ± 4 ( 46 ( c 1 ) c ) 2 = 10 ± 2 ( 2 ) 2 = 3 , 7. b = \frac{10\pm \sqrt{4(46-(c-1)c)}}{2}=\frac{10 \pm 2(2)}{2} =3,\, 7. So for this case we have a b c = 637 or 677 . \overline{abc} = \boxed{637} \quad \text{or} \quad \boxed{677}.

case 3 \textbf{case 3} : If a = 7 , a=7, then condition ( ) (*) becomes b 2 10 b + ( c 2 c 108 ) = 0. b^2-10b+(c^2-c-108) = 0. This is a quadratic equation in b b with an integer solution, namely b b , so the discriminant must be a perfect square. That is 100 4 ( c 2 c 108 ) = 4 ( 133 ( c 1 ) c ) 100-4(c^2-c-108) = 4(133-(c-1)c) is a perfect square. Since 4 4 is a perfect square, we have 133 ( c 1 ) c 133-(c-1)c is a perfect square. It can be easily checked that this occurs when c = 4. c=4. By the quadratic formula, we have b = 10 ± 4 ( 133 ( c 1 ) c ) 2 = 10 ± 2 ( 11 ) 2 = 6 , 16 , b = \frac{10\pm \sqrt{4(133-(c-1)c)}}{2}=\frac{10 \pm 2(11)}{2} =-6,\, 16, a contradiction to the assumption that b b is a single digit. Hence a 7. a \neq 7.

It can be easily checked that the numbers 616 , 696 , 637 616,\, 696,\, 637 and 677 677 satisfy the condition of the question. Their sum is 616 + 696 + 637 + 677 = 2626 , 616+696+637+677 = 2626, having 626 \boxed{626} as the last three digits.

Moderator note:

Nicely done! See the comments for some more details.

Sorry, what do you mean "This is a quadratic equation in b with an integer solution, namely b, so the discriminant must be a perfect square." ?

Timmy Ben - 7 years, 10 months ago

Log in to reply

If we rewrite the equation in variable x x , then the equation will be of the form x 2 10 x + ( c 2 c 21 ) = 0 , x^2-10x+(c^2-c-21) = 0, where c 2 c 21 c^2-c-21 is a constant. Then this becomes a quadratic equation with x = b x=b as a solution.

Aram Tangboonduangjit - 7 years, 10 months ago

The problem initially states "Consider all three-digit numbers". Why did you exclude a=0 in your answer?

Clay Young - 7 years, 10 months ago

Log in to reply

If a = 0 a=0 , then we would have a two-digit number. For example, the number 034 is equal to 34.

Aram Tangboonduangjit - 7 years, 10 months ago

Log in to reply

Wouldn't a better rational be that there are no two-digit numbers that are greater than the sum of the squares of their digits by exactly 543? I.e. the smallest sum of squares is 1 and the biggest two-digit number (99) is less than 544.

Clay Young - 7 years, 10 months ago

In case 1, how did come up with 10b−b^2 ≤ (4(−1)(0)−100)/(4(−1))?

Clay Young - 7 years, 10 months ago

why 10b-b² < 4(-1(0)-100/(4(-1) ?

Gustavo Alves - 7 years, 9 months ago

Log in to reply

A fact from analytic geometry states:

The vertex (turning point) of a parabola y = a x 2 + b x + c y=ax^2+bx+c is at ( b / 2 a , ( 4 a c b 2 ) / 4 a ) . (-b/2a,(4ac-b^2)/4a).

This means the extremum of the function f ( x ) = a x 2 + b x + c f(x)=ax^2+bx+c is ( 4 a c b 2 ) / 4 a . (4ac-b^2)/4a.

In this case the function is f ( x ) = 10 x x 2 f(x)=10x-x^2 whose graph is concave down (leading coefficient is negative), so it reaches the maximum value at its vertex and that value (according to the above formula) is ( 4 ( 1 ) ( 0 ) 1 0 2 ) / 4 ( 1 ) = 25. (4(-1)(0)-10^2)/4(-1) = 25.

Aram Tangboonduangjit - 7 years, 9 months ago

Can you expand on your statement: it follows that 5≤a≤7?

Clay Young - 7 years, 10 months ago

Log in to reply

From 1 a 2 + b 2 + c 2 243 , 1 \le a^2+b^2+c^2 \le 243, we have 546 a b c 786 546 \le \overline{abc}\le 786 and since a a is the first digit, it follows that 5 a 7. 5\le a \le 7.

Aram Tangboonduangjit - 7 years, 10 months ago

Log in to reply

Did you mean 544 instead of 546? Thanks for filling in the missing step.

Clay Young - 7 years, 10 months ago

Log in to reply

@Clay Young Yes, sorry for the misprint.

Aram Tangboonduangjit - 7 years, 10 months ago

In case 2, you state that 100−4(c2−c−21)=4(46−(c−1)c). Where did 4(46−(c−1)c come from?

Clay Young - 7 years, 9 months ago

Log in to reply

Factoring out the 4 4 from the expression, we get 100 4 ( c 2 c 21 ) = 4 ( 25 ( c 2 c 21 ) ) = 4 ( 25 c 2 + c + 21 ) = 4 ( 46 c ( c 1 ) ) . \begin{aligned} 100-4(c^2-c-21) &= 4(25-(c^2-c-21)) = 4(25-c^2+c+21)\\ &= 4(46-c(c-1)). \end{aligned}

Aram Tangboonduangjit - 7 years, 9 months ago
Clifford Wilmot
May 20, 2014

Any 3 digit number may be expressed in the form 100 a + 10 b + c 100a+10b+c where a a is the hundreds digit, b b is the tens digit and c c is the units digit. We can then apply this to give the equation 100 a + 10 b + c 543 = a 2 + b 2 + c 2 100a+10b+c-543=a^2+b^2+c^2 . Rearranging and completing the square gives: ( a 50 ) 2 + ( b 5 ) 2 + ( c 0.5 ) 2 = 1982.25 (a-50)^2+(b-5)^2+(c-0.5)^2=1982.25 .

Claim: a = 6 a=6

Proof:

If a 5 a \leq 5 , ( a 50 ) 2 2025 (a-50)^2 \geq 2025 ( b 5 ) 2 + ( c 0.5 ) 2 42.75 \therefore (b-5)^2+(c-0.5)^2 \leq -42.75 , but the sum of squares of real numbers can't be negative, we've reached a contradiction, so a 6 a \geq 6 .

The maximum value of ( b 5 ) 2 (b-5)^2 is 16 16 (when b = 1 b=1 or b = 9 b=9 ), the maximum value of ( c 0.5 ) 2 (c-0.5)^2 is 72.25 72.25 (when c = 9 c=9 ), ( b 5 ) 2 + ( c 0.5 ) 2 88.25 ( a 50 ) 2 1894 \therefore (b-5)^2+(c-0.5)^2 \leq 88.25 \therefore (a-50)^2 \geq 1894 . But if a = 7 , 8 a=7, 8 or 9 9 , ( a 50 ) 2 1849 < 1894 (a-50)^2 \leq 1849 < 1894 , so a 6 a \leq 6 .

a 6 a \geq 6 and a 6 a = 6 a \leq 6 \therefore a=6 .

a = 6 ( b 5 ) 2 + ( c 0.5 ) 2 = 46.25 a=6 \Rightarrow (b-5)^2+(c-0.5)^2=46.25 . Also; ( b 5 ) 2 0 (b-5)^2 \geq 0 and as discussed earlier, ( b 5 ) 2 16 (b-5)^2 \leq 16 30.25 ( c 0.5 ) 2 46.25 \therefore 30.25 \leq (c-0.5)^2 \leq 46.25 c = 6 \therefore c=6 or c = 7 c=7 .

We can now substitute in c = 6 c=6 and c = 7 c=7 into ( b 5 ) 2 + ( c 0.5 ) 2 = 46.25 (b-5)^2+(c-0.5)^2=46.25 and solve for b b . For c = 6 c=6 , b = 1 b=1 or 9 9 . For c = 7 c=7 , b = 3 b=3 or 7 7 . Substituting these solutions back into the original equation, we can verify that they all work, hence our solutions are: 616 , 696 , 637 , 677 616, 696, 637, 677 , adding these up gives 2626 2626 , so the last three digits are 626 626 .

Derek Khu
May 20, 2014

We let the digits in the hundreds', tens' and ones' place be a a , b b and c c respectively.

Then we will have the following equation: a 2 + b 2 + c 2 + 543 = 100 a + 10 b + c a^2 + b^2 + c^2 + 543 = 100a + 10b + c .

Since 0 a , b , c 9 0 \leq a, b, c \leq 9 , then we have 543 a 2 + b 2 + c 2 + 543 = 100 a + 10 b + c 543 + 3 × 9 2 = 786 543 \leq a^2 + b^2 + c^2 + 543 = 100a + 10b + c \leq 543 + 3 \times 9^2 = 786 . Thus, a = 5 , a = 5, 6 6 or 7 7 .

Consider a = 5 a = 5 . Then 25 + b 2 + c 2 + 543 = 500 + 10 b + c 68 + b 2 + c 2 = 10 b + c 25 + b^2 + c^2 + 543 = 500 + 10b + c \Rightarrow 68 + b^2 + c^2 = 10b + c . Since 68 + b 2 + c 2 68 68 + b^2 + c^2 \geq 68 , then 10 b + c 68 10b + c \geq 68 and so b 6 b \geq 6 . With this, we have 10 b + c = 68 + b 2 + c 2 68 + 36 + c 2 = 104 + c 2 104 10b + c = 68 + b^2 + c^2 \geq 68 + 36 + c^2 = 104 + c^2 \geq 104 . But 10 b + c 10 × 9 + 9 = 99 < 104 10b + c \leq 10 \times 9 + 9 = 99 < 104 , so we arrive at a contradiction. Thus a a cannot be 5 5 .

Next consider a = 7 a = 7 . Then 49 + b 2 + c 2 + 543 = 700 + 10 b + c b 2 + c 2 = 10 b + c + 108 49 + b^2 + c^2 + 543 = 700 + 10b + c \Rightarrow b^2 + c^2 = 10b + c + 108 . Since 10 b + c + 108 108 10b + c + 108 \geq 108 , then b 2 + c 2 108 b^2 + c^2 \geq 108 and so b 2 108 c 2 108 9 2 = 27 b^2 \geq 108 - c^2 \geq 108 - 9^2 = 27 . This means b 6 b \geq 6 . With this, we have b 2 + c 2 = 10 b + c + 108 60 + c + 108 = 168 + c 168 b^2 + c^2 = 10b + c + 108 \geq 60 + c + 108 = 168 + c \geq 168 . But b 2 + c 2 9 2 + 9 2 = 162 < 168 b^2 + c^2 \leq 9^2 + 9^2 = 162 < 168 , so we arrive at a contradiction. Thus a a cannot be 7 7 .

Next consider a = 6 a = 6 . Then 36 + b 2 + c 2 + 543 = 600 + 10 b + c c 2 c + ( b 2 10 b 21 ) = 0 36 + b^2 + c^2 + 543 = 600 + 10b + c \Rightarrow c^2 - c + (b^2 - 10b - 21) = 0 . So c = 1 ± 1 4 ( b 2 10 b 21 ) 2 = 1 ± 185 4 ( b 5 ) 2 2 c = \frac{1 \pm \sqrt{1 - 4(b^2 - 10b - 21)}}{2} = \frac{1 \pm \sqrt{185 - 4(b - 5)^2}}{2} . Now we substitute b = 0 , 1 , , 9 b = 0, 1, \ldots , 9 , keeping in mind that c c must be a non-negative integer. The only solutions are ( b , c ) = ( 1 , 6 ) , ( 3 , 7 ) , ( 7 , 7 ) , ( 9 , 6 ) (b,c) = (1,6), (3,7), (7,7), (9,6) .

Therefore, all the three-digit numbers which satisfy the criteria in the question are 616 , 637 , 677 , 696 616, 637, 677, 696 . Their sum is 2626 2626 , so the answer is 626 \underline{626} .

clearly written, appears complete

Calvin Lin Staff - 7 years ago
Omid Rooholfada
May 20, 2014

Let the three digit number be N = a b c N=\overline{abc} , such that the hundreds, tens, and units digit of N N are a , b , a, b, and c c , respectively. Note that the maximum value of the sum of the squares of the digits of N N is 3 9 2 = 243 3\cdot9^2=243 , so a b c \overline{abc} is at most 243 + 543 = 786. 243+543=786. Similarly, the sum or the squares of the digits must be positive, so the minimum value of N N is 544 544 . Thus, 544 N 786. 544 \leq N \leq 786. Now, by the condition in the problem, we have 100 a + 10 b + c ( a 2 + b 2 + c 2 ) = 543 100a+10b+c-(a^2+b^2+c^2)=543 a ( 100 a ) + b ( 10 b ) + c ( 1 c ) = 543. a(100-a)+b(10-b)+c(1-c)=543. By our earlier bounds on N N , a = 5 , 6 , a=5,6, or 7. 7. Also, note that by completing the square b ( 10 b ) = ( b + 5 ) 2 + 25 b(10-b)=-(b+5)^2+25 . Combining this with 0 b 9 0 \leq b \leq 9 gives 0 b ( 10 b ) 25. 0 \leq b(10-b) \leq 25. Similarly, we get c ( 1 c ) = ( c 1 2 ) 2 + 1 4 . c(1-c)=-(c-\frac{1}{2})^2+\frac{1}{4}. Combining this with 0 c 9 0 \leq c \leq 9 gives 72 c ( 1 c ) 0. -72 \leq c(1-c) \leq 0. Now, we proceed with casework on the value of a a .

Case 1: a = 5 a=5

We substitute a = 5 a=5 into our original equation and rearrange to get b ( 10 b ) + c ( 1 c ) = 68. b(10-b)+c(1-c)=68. By our bounds, the maximum value of the LHS is 25 + 0 = 25. 25+0=25. Thus, this case yields no solutions.

Case 2: a = 6 a=6

We substitute a = 6 a=6 into our original equation and rearrange to get b ( 10 b ) + c ( 1 c ) = 21. b(10-b)+c(1-c)=-21. Note that either c c or ( 1 c ) (1-c) is even when c c is an integer, so c ( 1 c ) c(1-c) is even. Since the value of the RHS is odd, b ( 10 b ) b(10-b) must be odd. Similarly, we see that b ( 10 b ) b(10-b) is even when b b is even and is odd when b b is odd. Thus, we only have to test odd values of b b , where 0 b 9 0 \leq b \leq 9 . When b = 1 b=1 , we find that 9 + c ( 1 c ) = 21 9+c(1-c)=-21 \Rightarrow c ( 1 c ) = 30 c(1-c)=-30 . By solving the quadratic or guessing and checking values, we find that the only value of c c where 0 c 9 0 \leq c \leq 9 occurs when c = 6 c=6 . This gives the solution N = 616 N=616 . Continuing in this way, we the test b = 3 , 5 , 7 , 9 b=3, 5, 7, 9 to find the solutions N = 637 , 677 , 696. N=637, 677, 696.

Case 3: a = 7 a=7

We substitute a = 7 a=7 into our original equation and rearrange to get b ( 10 b ) + c ( 1 c ) = 108. b(10-b)+c(1-c)=-108. However, by our earlier bounds, the minimum value of the LHS is 0 + ( 72 ) = 72 0+(-72)=-72 , so this case yields no solutions.

Finally, combining our cases, the only values of N N that satisfy the conditions of the problem are 616 , 637 , 677 , 696. 616, 637, 677, 696. Thus we have an answer of 616 + 637 + 677 + 696 626 ( m o d 1000 ) . 616+637+677+696 \equiv \boxed{626} \pmod{1000}.

Clear solution

Calvin Lin Staff - 7 years ago
Jan Carlo Castro
May 20, 2014

All numbers in the set are in the form 100x+10y+z=x^{2}+y^{2}+z^{2}+543, for the digits x, y and z which satisfy this equation.

Rewriting this equation, it becomes x(x-100)+y(y-10)+z(z-1)=543

Defining x' as x-50, y' as y-5, and z' as z-0.5, we can rewrite the left hand side of this equation as (x'-50)(x'+50)+(y'-5)(y'+5)+(z'-0.5)(z'+0.5). Simplified, that equals to (x'^2-50^{2})+(y'^2-5^{2})+(z'^2-0.5^{2}).

Thus, we have that x'^{2} +y'^{2} + z'^{2} = -543+50^{2}+5^{2}+ 0.5^{2} =1982.25

Note that the minimum value of y'^{2} is (5-5)^{2}=0 and the maximum value of y'^{2} is (0-5)^{2}=25, while the minimum value of z'^{2} is (0-0.5)^{2}=0.25 and the maximum value of z'^{2} is (9-0.25)^{2}=72.25.

Thus, y'^{2}+z'^{2} lies between 0+0.25 =0.25 and 25+72.25=97.25 .

This means |x-50|=x' lies between sqrt{1982.25-(y'^2+z'^{2})} and sqrt{1982.25-97.25} =43.4... and sqrt{1982.25-0.25} =44.5...

As this must be an integer, we find that |x-50| =44, which means x must be 50-44=6 .

This simplifies our equation to y'^{2}+z'^{2}=1982.25-44^{2}=46.25.

As before, keeping in mind the minimum and maximum values of y'^{2}, observe that |z-0.5|=|z'|=sqrt{46.25-y'^{2}} lies between sqrt{46.25-25}=4.6.... and sqrt{46.25-0}=6.8.... This means z lies between 0.5+4.6...=5.1 and 0.5+6.8...=7.3..., which tells us z must be either 6 or 7.

Finally, plugging those in, and calculating y=5+sqrt{46.25-(z-0.5)^{2}} and y=5-sqrt{46.25-(z-0.5)^{2}}, we get our four solutions: 616, 696, 637, and 677.

Adding these together and taking the last three digits, our final answer is 626.

clear and complete. Slightly different from the original solution, but not better.

Calvin Lin Staff - 7 years ago
Abin Das
May 20, 2014

Let x,y and z be the digits of the three-digit number. According to the question, 100x+10y+z-(x^2+y^2+z^2)=543 100x+10y+z-x^2-y^2-z^2=543 Thus,x (100-x)+y (10-y)+z (1-z)=0 Substituting x for numbers from 1 to 9(Since x is the first digit and thus cannot be 0),we get x (100-x)=99,196,291,384,475,564,651,736,819=a. Similarly,substituting y and z for numbers from 0 to 9, y (10-y)=0,9,16,21,24,25,24,21,16,9=b and z (1-z)=0,0,-2,-6,-12,-20,-30,-42,-56,-72=c If a=475, 475+b+c will be less than 543 as the highest value for 'b' is 25 and the value of 'c' is either 0 or negative. 475+25=500<543 Thus 'a' should be greater than 475. If a=651, 651+b+c will be more than 543 as the lowest value of 'c' is-72 and the value of 'b' is either 0 or positive. 651+-72=579>543 Thus 'a' should be less than 651. From the above two situations,we get,a=564 If c=-20, 564+b+-20=544+b will be more than 543 as 'b' is either 0 or positive. Thus 'c' should be less than -20. If c=-56, 564+-56+b=508+b will be less than 543 as the greatest value of 'b' is 25 and 508+25=533< 543. Thus 'c' should be more than -56. From the above two situations ,'c' can be -30 or -42. If c=-30, 564+-30+b=543 Then b=9. Then x=6,z=6 and y=1 or 9. Thus the numbers are 616 and 696. If c=-42, 564+-42+b=543 Then b=21. Thus x=6,z=7 and y=3 or 7. Thus the numbers are 637 and 677. Therefore, the required numbers are 616,696,637 and 677. 616+696+637+677=2626. Thus,the last three digits of their sum are 626.

Pretty efficient

Calvin Lin Staff - 7 years ago

let the 3digit numbers be of the form asd 10>a,s,d & a>0 &a,s,d are whole numbers then 100 a+10 s+d=a^2+s^2+d^2+543
implies a>5 minimum value of s (10-s) is 0 ........1 maximum value of d (d-1) is 72 .........2
maximum value of a^2,d^2,s^2 is 81 ........3 maximum value of s (10-s) is 25 ........4 case-1 (a=6) 600+s (10-s)=d (d-1)+6^2+543 s (10-s)=d (d-1)-21 from 1&4 46>d (d-1)>20 implies 8>d>5 trying d=7,6 when d=6,s=1,9 when d=7,s=3,7 therefore the numbers are 616,696,677,637 case-2 (a=7) 700+s (10-s)=d (d-1)+7^2+543 s (10-s)=d (d-1)-108 from 2&1 therefore 3digit number starting in 7 is not possible as a increases from 1 to 50 100^a-a^2 = a (100-a)also increases(by inverse of am-gm inequality) therefore s (10-s)=d*(d-1)-K where K>108 therefore no other number exist

The explanation is hard to read, but seems like the problem was solved correctly

Calvin Lin Staff - 7 years ago
Sandeep Mishra
May 20, 2014

let the number be of the form ' abc ';

where a,b,c can be any digit from 0-9 ;

or in other words it can be written as '100a+10b+c';

the difference of the number and sum of its digits' square is 543 or

100a-a^2+10b-b^2+c-c^2=543;

=> a(100-a)+b(10-b)+c(1-c)=543;

possible values of c(1-c) are :

c=0 ; c(1-c)=0;

c=1 ; c(1-c)=0;

c=2 ; c(1-c)=(-2);

c=3 ; c(1-c)=(-6);

c=4 ; c(1-c)=(-12);

c=5 ; c(1-c)=(-20);

c=6 ; c(1-c)=(-30);

c=7 ; c(1-c)=(-42);

c=8 ; c(1-c)=(-56);

c=9 ; c(1-c)=(-72);

similarly posibble values of b(10-b) are :

b=0 ;b(10-b)=0;

b=1 ;b(10-b)=9;

b=2 ;b(10-b)=16;

b=3 ;b(10-b)=21;

b=4 ;b(10-b)=24;

b=5 ;b(10-b)=25;

b=6 ;b(10-b)=24;

b=7 ;b(10-b)=21;

b=8 ;b(10-b)=16;

b=9 ;b(10-b)=9;

the number has to be greater than 543; so 'a' can be 5,6,7,8,9; => a(100-a) can be 475,564,651,736,819;

since all possible values of c(1-c) are 0 or negative ; =>b(10-b)+c(1-c) can have minimum value of (-72);

=>a(100-a) cannot be greater than 564;

example: suppose a(100-a)=651;

so the equation becomes;

651+b(10-b)+c(1-c)=543;

=>108+b(10-b)+c(1-c)=0 this not possible because 'b(10-b)+c(1-c)' has minimum value =(-72) and (108-72) not equal to 0;

let a(100-a)=475;

=>475+b(10-b)+c(1-c)=543;

=>b(10-b)+c(1-c)=68;

but this is also not possible as b(10-b)+c(1-c) has maximum value 25;

so only possible value of a(100-a)=564;

now the equation becomes;

564+b(10-b)+c(1-c)=543;

=>21+b(10-b)+c(1-c)=0;

checking for possible values of b(10-b) and c(1-c);

we find that b(10-b) can have value equal to 9 or 21;

and corresponding values of c(1-c) are (-30) and (-42);

=>for b=1 or 9 we have b(10-b)=9 and c(1-c)=(-30) for c=6;

so number can be;

616 or 696;

and for b(10-b)=21 ; b=3 or 7; and c(1-c)=(-42) for c=7;

so number can be ;

637 or 677;

sum of numbers =616+637+677+696= 2626;

=> last three digits are : 626 ;

"a(100-a) cannot be greater than 564" meant "a(100-a) cannot be less than 564" More of a brute force solution than necessary

Calvin Lin Staff - 7 years ago

Log in to reply

Since there is no space to give a solution, and the solution below has completely different approach, I am posting it. L e t L H S = 543 + a 2 + b 2 + c 2 , R H S = a b c = 100 a + 10 b + c . We will first see the range of abc. R H S > 543. a b c m a x = 999. R H S m a x = 543 + 3 9 2 = 786. 543 < R H S < 786. Next, for each a and b, (within the range), we will cycle c from 0 to 9. For a=5, we cycle b from 4 to 9..... For a=6, from 0 to 9..... For a=7, from 0 to 8. However we shall not go through all the values. We will apply shortcuts. L e t R H S = X X X , f o r w h i c h L H S = Y Y Y . When c is increased, RHS will never grow faster than LHS. At any point, if LHS>RHS, c cycle over. So if XX0<YYY, no solution for RHS= XX0 to XX9. S e e a b c = 550 , 560 , . . . , b e l o w . When LHS \leq RHS, and if n in XXn is increased by 1,for next R H S n + 1 , R H S n + 1 L H S n + 1 = Δ c = c 2 c = ( c 1 ) c w h e r e c = n + 1 F o r c = 0 Δ c = 0 = 0 : f o r c = 1 Δ c = 1 = 0 : f o r c = 2 Δ c = 2 = 2 : f o r c = 3 Δ c = 3 = 6 : f o r c = 4 Δ c = 4 = 12 : f o r c = 5 Δ c = 5 = 20 : f o r c = 6 Δ c = 6 = 30 : f o r c = 7 Δ c = 7 = 42 : f o r c = 8 Δ c = 7 = 56 : f o r c = 9 Δ c = 9 = 72 : I f D a n y o f t h e Δ c g i v e n a b o v e , N O s o l u t i o n f o r t h a t c c y c l e . S e e a b c = 600 , 620 , 640 , 650 , 670 , b e l o w . When LHS>RHS+25, from any value of b than Xb0 to X90 has no solution. Coming to increasing b from 0 to n. RHS increases by 10n. LHS increases by n 2 . Since n=0,1,2 . . . 9, Δ b = i n c r e a s e i n R H S i n c r e a s e i n L H S = 10 n n 2 . Δ b m a x = 25. If RHS>LHS+25, Xb0 to Xb9 have no solution. S i n c e Δ c m a x = 72 , i f R H S > L H S + 72 , X X 0 t o X X 9 f o r t h i s h a s n o s o l u t i o n . S e e a b c = 700 , 710 , . . . 78 Let D=XX0-YYY. If D=0, XX0 and XX1 are the solutions. F o r D > 0 , i f D = Δ n , c o r r o s p o n d i n g c = n , t h a t i s X X n i s t h e o n l y s o l u t i o n f r o m X X 0 t o X X 9. S e e a b c = 610 , 630 , 670 , 690 , b e l o w . S i n c e Δ m a x = Δ 9 = 72 , i f D > 72 , N o S o l u t i o n . \text{Since there is no space to give a solution, and the solution below}\\ \text{has completely different approach, I am posting it.}\\ Let~~LHS=543+a^2+b^2+c^2,~~~~~~RHS=abc=100a+10b+c.\\ \text{We will first see the range of abc.}\\ RHS>543.~~~~abc_{max}=999.~~\therefore RHS_{max}=543+3*9^2=786.\\ \color{#3D99F6}~~~{543<RHS<786.}\\ \text{Next, for each a and b, (within the range), we will cycle c from 0 to 9. }\\ \text{For a=5, we cycle b from 4 to 9..... For a=6, from 0 to 9..... For a=7, from 0 to 8.}\\ \text{However we shall not go through all the values. We will apply shortcuts.}\\ Let ~~RHS=XXX,~~ for ~~which~~ LHS=YYY.\\ \text{When c is increased, RHS will never grow faster than LHS.}\\ \therefore~\text{At any point, if LHS>RHS, c cycle over. }\\ \color{#3D99F6}{\text{So if XX0<YYY, no solution for RHS= XX0 to XX9.}}\\ See~~abc=550,~560,...,~~below.\\ \text{When LHS\leq RHS, and if n in XXn is increased by 1,for next }RHS_{n+1},\\ RHS_{n+1}~-~LHS_{n+1}=\Delta_c =c^2~ -~c=(c-1)*c ~~where~ c= n+1\\ \color{#D61F06}{For~~c=0~~~~~\Delta_{c=0}=0:~~~~~~~for~~c=1~~~~~\Delta_{c=1}= 0:\\ for~~c=2~~~~~\Delta_{c=2}= 2:~~~~~~~for~~c=3~~~~~\Delta_{c=3}= 6:\\ for~~c=4~~~~~\Delta_{c=4}=12:~~~~~~~for~~c=5~~~~~\Delta_{c=5}=20:\\ for~~c=6~~~~~\Delta_{c=6}=30:~~~~~~~for~~c=7~~~~~\Delta_{c=7}=42:\\ for~~c=8~~~~~\Delta_{c=7}=56:~~~~~~~for~~c=9~~~~~\Delta_{c=9}=72:}\\ \color{#3D99F6}{If~ D~\neq~any ~of~ the~ \Delta_c~given ~above,~ NO~ solution ~for~ that~ c~ cycle.}\\See~~abc=600,~620,~640,~650,~670,~~below.\\ \text{When LHS>RHS+25, from any value of b than Xb0 to X90 has no solution. }\\ \text{Coming to increasing b from 0 to n. RHS increases by 10n. LHS increases by }n^2.\\ \text{Since n=0,1,2 . . . 9, }~\Delta_b=increase ~in~RHS~-~increase~in~LHS=10n~-~n^2.\\ \Delta_{b_{max}}=25.~\therefore~\text{If RHS>LHS+25, Xb0 to Xb9 have no solution.}\\ Since~ \Delta_{c_{max}}=72, \color{#3D99F6}{if RHS>LHS+72, XX0 to XX9 for this has no solution.} \\ See~abc=700,710,... 78 \text{Let D=XX0-YYY. If D=0, XX0 and XX1 are the solutions.}\\ \color{#3D99F6}{For D>0,~if~D=\Delta_n,~corrosponding~c=n,~ that~is~XXn~ is~ the~ only~solution}\\from~XX0~~ to ~~XX9.\\ See ~~abc=610, ~630,~670,~690, ~~below.\\ \color{#3D99F6}{Since~\Delta_{max}=\Delta_9=72,~ if D>72, ~No ~~Solution.}

W i t h t h e a b o v e b a c k g r o u n d : With ~the~above~background:-

R H S = 543 i s t h e l o w e r b o u n d . R H S = 540 , L H S = 584 > R H S . R H S = 550 , L H S = 593 > R H S R H S = 560 , L H S = 604 > R H S . R H S = 570 , L H S = 617 > R H S . R H S = 580 , L H S = 632 > R H S R H S = 590 , L H S = 649 > R H S . R H S = 600 , L H S = 579. D = 21 Δ c . N o s o l u t i o n f o r 600 t o 609. R H S = 610 , L H S = 580 , D = 30 = Δ 6 . 616 i s a s o l u t i o n . R H S = 620 , L H S = 583 , D = 37 Δ c . N o s o l u t i o n f o r 620 t o 629. R H S = 630 , L H S = 588 , D = 42 = Δ 7 . 637 i s a s o l u t i o n . R H S = 640 , L H S = 595 , D = 45 Δ c . N o s o l u t i o n f o r 640 t o 649. R H S = 650 , L H S = 604 , D = 54 Δ c . N o s o l u t i o n f o r 650 t o 659. R H S = 660 , L H S = 615 , D = 45 Δ c . N o s o l u t i o n f o r 660 t o 669. R H S = 670 , L H S = 628 , D = 42 = Δ 7 . 677 i s a s o l u t i o n . R H S = 680 , L H S = 643 , D = 37 Δ c . N o s o l u t i o n f o r 680 t o 689. R H S = 690 , L H S = 660 , D = 30 = Δ 6 . 696 i s a s o l u t i o n . R H S = 700 , L H S = 592 , D = 108 > 72 : R H S = 710 , L H S = 593 , D = 117 > 72 R H S = 720 , L H S = 596 , D = 124 > 72 : R H S = 730 , L H S = 601 , D = 129 > 72 R H S = 740 , L H S = 608 , D = 132 > 72 : R H S = 750 , L H S = 617 , D = 133 > 72 R H S = 760 , L H S = 628 , D = 132 > 72 : R H S = 770 , L H S = 641 , D = 129 > 72 R H S = 780 , L H S = 656 , D = 124 > 72 : A N S W E R 616 + 637 + 677 + 696 = 2626 RHS=543 ~is ~the ~lower ~bound. \\ RHS=540,~~LHS=584>RHS.~~~~RHS=550,~~LHS=593>RHS\\ RHS=560,~~LHS=604>RHS.~~~~RHS=570,~~LHS=617>RHS.\\ RHS=580,~~LHS=632>RHS~~~~ RHS=590,~~LHS=649>RHS. \\ RHS=600,~LHS=579.~~D=21\neq \Delta_c. ~~~~~~ No~solution~for~600 ~to~609.\\ RHS=610,~LHS=580,~~D=30=\Delta_6.~~~\therefore~~ \color{#D61F06}{616}~is~a~solution.\\ RHS=620,~LHS=583,~~D=37\neq \Delta_c. ~~~~~~ No~solution~for~620 ~to~629.\\ RHS=630,~LHS=588,~~D=42=\Delta_7.~~~\therefore ~~\color{#D61F06}{637}~is~a~solution.\\ RHS=640,~LHS=595,~~D=45\neq \Delta_c. ~~~~~~ No~solution~for~640 ~to~649.\\ RHS=650,~LHS=604,~~D=54\neq \Delta_c. ~~~~~~ No~solution~for~650 ~to~659.\\ RHS=660,~LHS=615,~~D=45\neq \Delta_c. ~~~~~~ No~solution~for~660 ~to~669.\\ RHS=670,~LHS=628,~~D=42=\Delta_7.~~~\therefore ~~\color{#D61F06}{677}~is~a~solution.\\ RHS=680,~LHS=643,~~D=37\neq \Delta_c. ~~~~~~ No~solution~for~680 ~to~689.\\ RHS=690,~LHS=660,~~D=30=\Delta_6.~~~\therefore ~~\color{#D61F06}{696}~is~a~solution.\\ RHS\!=\!700,~LHS=592,~~D=108>\!72:~ RHS\!=\!710,~LHS=593,~D\!=\!117>\!72\\ RHS\!=\!720,~LHS=596,~~D=124>\!72:~ RHS\!=\!730,~LHS=601,~D\!=\!129>\!72\\ RHS\!=\!740,~LHS=608,~~D=132>\!72:~ RHS\!=\!750,~LHS=617,~D\!=\!133>\!72\\ RHS\!=\!760,~LHS=628,~~D=132>\!72:~ RHS\!=\!770,~LHS=641,~D\!=\!129>\!72\\ RHS\!=\!780,~LHS=656,~~D=124>\!72:~~~~~ \\ ANSWER~~~~616+637+677+696= \Huge \color{#EC7300}{2626}\\~~\\ Note the pattern in D. D for XbX is same as D for X(10-b)X. Since solution is based on D, this reflects in the answer also, X b X t h e n X ( 10 b ) X . T h u s w e c a n c u t o u r w o r k b y h a l f . We can calculate D for 610, 690 will have same D, for 620 and 680, I had first solved the problem through TI-83 PLUS before trying to apply logic. \text{Note the pattern in D. D for XbX is same as D for X(10-b)X. }\\ \text{Since solution is based on D, this reflects in the answer also, }\\ XbX ~~then~~ X(10-b)X. \\ \color{#E81990}{Thus~ we~ can~ cut~ our~ work~ by~ half.}\\ \text{We can calculate D for 610, 690 will have same D, for 620 and 680, ……} \\ \text{I had first solved the problem through TI-83 PLUS before trying to apply logic.}

Niranjan Khanderia - 5 years, 8 months ago
Aditya Parson
Oct 21, 2013

Let N = a b c N= \overline{abc} and a 0 , 0 a , b , c 9 a \neq 0, 0 \leq a,b,c \leq 9

According to the problem we have: a 2 + b 2 + c 2 + 543 = 100 a + 10 b + c a^2+b^2+c^2+543=100a+10b+c

Since I can't really find a proper way to factor this, I will complete the square of the individual variables. Thus, we can rewrite the above as:

( a 50 ) 2 + ( b 5 ) 2 + 1 4 ( 2 c 1 ) 2 = ( 2500 + 25 + 1 4 ) 543 = 1982 + 1 4 (a-50)^2 + (b-5)^2 + \frac{1}{4}(2c-1)^2 =(2500+25+\frac{1}{4}) - 543=1982+\frac{1}{4} ( 2 a 100 ) 2 + ( 2 b 10 ) 2 + ( 2 c 1 ) 2 = 7929 (2a-100)^2 + (2b-10)^2 + (2c-1)^2=7929

Now ( 2 a 100 ) 2 < = 7929 (2a-100)^2 <=7929 and, ( 2 a 100 ) 2 < = 89 2 (2a-100)^2 <={89}^2 . The max value of the other two expressions can be 100 100 and 17 2 {17}^2 respectively. So ( 2 a 100 ) 2 7929 389 > 86 2 (2a-100)^2 \geq 7929-389 > {86}^2 . Combining the above gives us that 86 2 < ( 2 a 100 ) 2 89 2 {86}^2 < (2a-100)^2 \leq {89}^2 Thus, a = 6 a=6 is the only possible value since ( 2 a 100 ) 2 (2a-100)^2 is an even perfect square and hence can only equal 88 2 {88}^2 .

The new equation transforms to: ( 2 b 10 ) 2 + ( 2 c 1 ) 2 = 7929 88 2 = 185 (2b-10)^2 + (2c-1)^2=7929-{88}^2= 185

185 = 13 2 + 4 2 = 11 2 + 8 2 185= {13}^2 + {4}^2 ={11}^2+{8}^2

Keep in mind that ( 2 b 10 ) 2 (2b-10)^2 is an even perfect square.

Case 1: ( 2 b 10 ) 2 = 4 2 = ± 4 2 b = 14 , 6 b = 7 , 3 (2b-10)^2=4^2= \pm 4 \Rightarrow 2b=14,6 \Rightarrow b=7,3 ( 2 c 1 ) 2 = 13 2 = ± 1 2 c = 14 , 12 c = 7 (2c-1)^2={13}^2=\pm1 \Rightarrow 2c=14, -12 \Rightarrow c=7

Possible numbers are : 677 , 637 677, 637

Case 2: ( 2 b 10 ) 2 = 8 2 = ± 8 2 b = 18 , 2 b = 9 , 1 (2b-10)^2=8^2=\pm 8 \Rightarrow 2b=18,2 \Rightarrow b=9,1 ( 2 c 1 ) 2 = 1 1 2 = ± 11 2 c = 12 , 10 c = 6 , (2c-1)^2=11^2=\pm 11 \Rightarrow 2c=12, -10 \Rightarrow c=6,

Possible numbers are : 696 , 616 696, 616

Sum of all possible numbers is = 2696 =2696 The next part is trivial.

Somewhere in the middle, I would just like to remark that 7929 > 8 9 2 \sqrt{7929} > 89^2 , so a better way would be to write: ( 2 a 100 ) 2 < 9 0 2 (2a - 100)^2 < 90^2 .

Zhang Lulu - 7 years, 7 months ago

Log in to reply

Not much difference though right? It has to be an integer so it can't be 90 2 {90}^2

Aditya Parson - 7 years, 7 months ago

How did you find the max value for ( 2 b 10 ) 2 (2b-10)^2 and ( 2 c 1 ) 2 (2c-1)^2 ?

Erin Nagoshi - 7 years, 7 months ago

Log in to reply

For ( 2 b 10 ) 2 (2b-10)^2 maximum occurs clearly at b = 0 b=0 , and for ( 2 c 1 ) 2 (2c-1)^2 its occurs when c = 9 c=9 . For clarity observe the following inequality: 0 b 9 0 \leq b \leq 9 10 2 b 10 8 -10 \leq 2b- 10 \leq 8

So the max possible value of the square of the expression is 100 100 . You can similarly work it out for ( 2 c 1 ) 2 (2c-1)^2 .

Aditya Parson - 7 years, 7 months ago
Alan Zhang
May 20, 2014

Because 9^2+9^2+9^2+543=786. The only possible first digit numbers are 5, 6, or 7. We get the equation a^2+b^2+c^2+543=100a+10b+c. When you plug in a=5, you find that there are no solutions. For a=6, you (1,6), (3,7), (7,7), and (9,6). For a=7, you also find no solutions. So the numbers are 616+637+677+696=2626

This is just a sketch. Perhaps, the problem was solved by brute force, so the solutions was too tedious to write.

Calvin Lin Staff - 7 years ago
Juan Rodrígez
Oct 21, 2013

10 weeks ago August 12 to 18 Level 4 Problem 3 was the same problem!

Yea, I thought I had seen this problem before.

Daniel Liu - 7 years, 7 months ago

yes it sound familiar when I solved it

Jordi Bosch - 7 years, 7 months ago

see here : https://brilliant.org/assessment/s/algebra-and-number-theory/3551822/

Jordi Bosch - 7 years, 7 months ago
Angelo Forcadela
Feb 7, 2017

what i've been through

Saurabh Khurana
Mar 29, 2016

a 2 { a }^{ 2 } + b 2 { b }^{ 2 } + c 2 { c }^{ 2 } + 543 { 543 } = 100 100 a { a } + 10 10 b { b } + c { c }

The maximum value of sum of three squares can be 243. Thus the maximum value of the number can be 786. Minimum of course is 544. This implies can a { a } can only be 5, 6 or 7.

  1. For a = 5

b 2 { b }^{ 2 } + c 2 { c }^{ 2 } + 68 { 68 } = 10 10 b { b } + c { c }

The RHS is a two digit number greater than 68. It's obvious that no value of b & c will satisfy the equation.

  1. For a = 7

b 2 { b }^{ 2 } + c 2 { c }^{ 2 } - 108 { 108 } = 10 10 b { b } + c { c }

For the LHS to be positive the only combinations of b,c that work are (9,9), (9,8), (8,8) & (9,7). No pair qualifies.

  1. For a = 6

b 2 { b }^{ 2 } + c 2 { c }^{ 2 } - 21 { 21 } = 10 10 b { b } + c { c }

( b 5 ) 2 { (b-5) }^{ 2 } + c 2 { c }^{ 2 } = 46 { 46 } + c { c }

( b 5 ) 2 { (b-5) }^{ 2 } can only be 0,1,4,9,16. So c 2 { c }^{ 2 } - c { c } can only be 46, 45, 42, 37, 30. Clearly 42 and 30 qualify resulting in c { c } as either 7 or 6. Solve for b { b } and we have 4 numbers.

677 { 677 } , 637 { 637 } , 696 { 696 } , 616 { 616 } that adds up to 2626 { 2626 }

L.H.S.=a^2+b^2+c^2+543 = abc=R.H.S.~~~~abc=100a+10b+c.\\ R.H.S.>543.~~~R.H.S.=543\\ L.H.S.=543+25+16+9=593.\\ But ~if~ L.H.S.>R.H.S.~~uptill~ 100a+10b+9~~\text{there can be no solution.}\\ So ~uptill~549~there~is~no~solution.\\ \text{There is a solution in the rage c=0 to 9 only if YY0-XXX is as given below.}\\ \text{the solution is XXc. \\ ~~~~~Let~~~L.H.S.=XXX~~~~~~~~~~~~R.H.S.=YY0\\ c=0~~~~YY0~-~XXX= \color{#D61F06}{ 0 } ~~~~~~~~~~~R.H.S.=YY0\\ c=1~~~~YY0~-~XXX= \color{#D61F06}{ 0 }~~~~~~~~~~~~R.H.S.=YY1\\ c=2~~~~YY0~-~XXX= \color{#D61F06}{ 2}~~~~~~~~~~~~R.H.S.=YY2\\ c=3~~~~YY0~-~XXX= \color{#D61F06}{ 6|~~~~~~~~~~~~R.H.S.=YY3\\ c=4~~~~YY0~-~XXX= \color{#D61F06}{12}~~~~~~~~~~~~R.H.S.=YY4\\ c=5~~~~YY0~-~XXX= \color{#D61F06}{20}~~~~~~~~~~~~R.H.S.=YY5\\ c=6~~~~YY0~-~XXX= \color{#D61F06}{30}~~~~~~~~~~~~R.H.S.=YY6\\ c=7~~~~YY0~-~XXX= \color{#D61F06}{42}~~~~~~~~~~~~R.H.S.=YY7\\ c=8~~~~YY0~-~XXX= \color{#D61F06}{56}~~~~~~~~~~~~R.H.S.=YY8\\ c=9~~~~YY0~-~XXX=\color{#D61F06}{72}~~~~~~~~~~~~R.H.S.=YY9\\

Bill Bell
Jul 3, 2015

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def wtf( n ):
    sum1 = 0
    while n:
        sum1 = sum1 + (n%10)**2
        n = n/10
    return sum1    

sumN = 0
for i in range(100,1000):
    if i == wtf(i) + 543:
        sumN = sumN + i
print sumN        

Nam Diện Lĩnh
Jun 16, 2015

javascript version

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
function sqdigit(n)
{
    var s=0;
    while(n)
    {
        s+=(n%10)*(n%10);
        n=parseInt(n/=10);
    }

    return s;
}

var result=0;
for(var i=100;i<1000;i++)
    if(i-sqdigit(i)==543)
        result+=i;

console.log(result);        

sum=0;

for i=1:999

a=(rem(i,10))^2;

a=a+rem(floor(i/10),10)^2;

a=a+(floor(i/100))^2;

if (i-a==543)

sum=sum+i;

end

end

ans =

    2626

include <stdio.h>

int main() { int a=0, b=0, c=0, sum=0;

for(a=0; a<10; a++)
{
    for(b=0; b<10; b++)
    {
        for(c=0; c<10; c++)
            if( 100*a + 10*b + c == 543 + a*a + b*b + c*c)
            sum = sum + 100*a + 10*b + c;
    }
}
printf("%d", sum);

}

Let x=abc the three digits number. Then x= a 2 a^{2} + b 2 b^{2} + c 2 c^{2} +543 and x=100a+10b+c; we group the terms: b 2 b^{2} -10b + c 2 c^{2} -c = 100a - a 2 a^{2} - 543, or ( b 5 ) 2 (b-5)^{2} + c(c-1) = 100a - a 2 a^{2} - 543 + 25. Number 'a' could take the values 9 to 5. Only for a=7 we obtain solutions: ( b 5 ) 2 (b-5)^{2} + c(c-1)=83 ; ( b 5 ) 2 (b-5)^{2} could be 25, 16, 9, 4, 1 or 0 and c(c-1) could be 72, 56, 42, 30, 20, 12, 6, 2, 0. For c=6, b=1 or b=9; for c=7, b=3 or b=7. The thrilling numbers are 616, 696, 637, 677 with their sum 2628. Last three digits ... 626 :)

Can you expand on your statement: "Number 'a' could take the values 9 to 5."? Why not values 0-4? Also, for a=7, I get 700-49-543+25=133, not 83.

Clay Young - 7 years, 9 months ago

I'm really sorry, it's my mistake. About first part, x>543, so a>=5. The main statement is completely different (my hurry and messed up papers). The right one is following. * Only for a=6 we obtain solutions. (b−5)^2 + c(c-1)=46 * . The rest of solution is correct, I hope.

Virgilius Teodorescu - 7 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...