Squares and Sums II

What is the sum of the digits of the sum of all the integers x x such that x + 123 x+123 and x + 456 x+456 are both square numbers?


The answer is 23.

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

Katherine Barnes
Jan 22, 2021

See my solution on Squares and sums for a head start!

Let's use the difference of two squares to solve this one.

We can set up two simultaneous equations:

x + 456 = a 2 x+456=a^2

x + 123 = b 2 x+123=b^2

Subtracting these gives a 2 b 2 = 333 a^2-b^2=333 , which we can rewrite as ( a + b ) ( a b ) = 333 (a+b)(a-b)=333

We can quickly find that the only positive factors of 333 333 are, in pairs, ( 1 ) ( 333 ) 1)(333) , ( 3 ) ( 111 ) (3)(111) and ( 9 ) ( 37 ) (9)(37)

Note: since both a a and b b will ultimately be squared, we need only consider positive values, and hence the positive factors.

Now we can write:

CASE 1: a + b = 333 , a b = 1 a+b=333, a-b=1 which gives a = 167 , b = 166 a=167, b=166

CASE 2: a + b = 111 , a b = 3 a+b=111, a-b=3 which gives a = 57 , b = 54 a=57, b=54

CASE 3: a + b = 37 , a b = 9 a+b=37, a-b=9 which gives a = 23 , b = 14 a=23, b=14

Substituting these pairs of a a and/or b b into our two simultaneous equations yields x = 27433 , 2793 , 73 x=27433, 2793, 73

Let's check these values:

27433 + 456 = 27889 = 16 7 2 , 27433 + 123 = 27556 = 16 6 2 27433+456=27889=167^2, 27433+123=27556=166^2

2793 + 456 = 3249 = 5 7 2 , 2793 + 123 = 2916 = 5 4 2 2793+456=3249=57^2, 2793+123=2916=54^2

73 + 456 = 529 = 2 3 2 , 73 + 123 = 196 = 1 4 2 73+456=529=23^2, 73+123=196=14^2

Summing these values for x x gives 30299 30299 .

Finally, 3 + 0 + 2 + 9 + 9 = 23. 3+0+2+9+9=23.

There are, in fact, three more factor pairs: (-1,-333), (-3,-111),(-9,-37), and the order of the numbers in each pair matters (you could for example have a + b = 9 a+b=9 and a b = 37 a-b=37 , giving a = 23 , b = 14 a=23,b=-14 ), unless you specify that you are only interested in a , b a,b being nonnegative integers, in which case it is OK to assume that a b 0 a \ge b \ge 0 .

The nonnegative integer pairing ( a , b ) = ( 23 , 14 ) (a,b)=(23,14) is associated with four distinct integer pairings ( a , b ) = ( 23 , 14 ) , ( 23 , 14 ) , ( 23 , 14 ) , ( 23 , 14 ) (a,b) = (23,14), (23,-14), (-23,14), (-23,-14) , all of which give the same value x = 73 x = 73 . Thus there are twelve integer solutions for a , b a,b , but only three possible values of x x .

Mark Hennings - 4 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...