Christmas Streak 49/88: Diophantine #3

Find the largest possible integer value of x x such that the expression below is also an integer:

x 2 + 9 x . \sqrt{x^2+9x}.


The answer is 16.

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.

28 solutions

Boi (보이)
Nov 18, 2017

Relevant wiki: Quadratic Diophantine Equations - Solve by Factoring

x 2 + 9 x = t x 2 + 9 x = t 2 ( x + 9 2 ) 2 81 4 = t 2 ( 2 x 2 t + 9 ) ( 2 x + 2 t + 9 ) = 81 { 2 x 2 t + 9 = 1 2 x + 2 t + 9 = 81 or { 2 x 2 t + 9 = 3 2 x + 2 t + 9 = 27 or { 2 x 2 t + 9 = 9 2 x + 2 t + 9 = 9 { x = 16 t = 20 or { x = 3 t = 6 or { x = 0 t = 0 \sqrt{x^2+9x}=t \\ \\ x^2+9x=t^2 \\ \\ \left(x+\dfrac{9}{2}\right)^2-\dfrac{81}{4}=t^2 \\ \\ (2x-2t+9)(2x+2t+9)=81 \\ \\ \cases{2x-2t+9=1 \\\\ 2x+2t+9=81}~\text{or}~\cases{2x-2t+9=3 \\\\ 2x+2t+9=27}~\text{or}~\cases{2x-2t+9=9 \\\\ 2x+2t+9=9} \\\\ \cases{x=16 \\\\ t=20}~\text{or}~\cases{x=3 \\\\ t=6}~\text{or}~\cases{x=0 \\\\ t=0}

Since x x needs to be maximized, the answer is 16 . \boxed{16}.

On the sixth line, your 80 should be 81.

Steven Andrew - 3 years, 6 months ago

Log in to reply

agree with Steven

Richard Desper - 3 years, 6 months ago

Log in to reply

Mhm, fixed it!

Boi (보이) - 3 years, 6 months ago

This is not a valid solution because t is unconstrained. For instance, if one back substitutes your original substitution, one gets a parabola with a minimum, but no maximum. This cannot be maximized, and it has dual solutions for any arbitrary x.

Daniel Langstaff - 3 years, 6 months ago

Log in to reply

You sure? x x and t t are integers, and that's the "constraint" you may have missed.

Boi (보이) - 3 years, 6 months ago

One can also investigate the cases how x ( x + 9 ) x(x+9) results in t 2 t^2 :

a) x = n x + 9 = n m 2 9 = n ( m 2 1 ) \small x=n\,\wedge\, x+9=nm^2 \;\Rightarrow\; 9=n(m^2-1) which has the only solution for integers when n = 3 m = 2 , i.e. x = 3 \small n=3 \wedge m=2,\;\text{i.e.}\; x=3

b) x = n 2 x + 9 = m 2 9 = ( m + n ) ( m n ) \small x=n^2 \wedge x+9=m^2\;\Rightarrow\; 9=(m+n)(m-n) which has two solutions:

  • m + n = m n = 3 \small m+n=m-n=3 , i.e. n = 0 \small n=0 or

  • m + n = 9 m n = 1 \small m+n=9 \wedge m-n=1 m = 5 n = 4 , i.e. x = 16. \small \Rightarrow m=5 \wedge n=4,\;\text{i.e.}\; x=16.

Zsolt Szabó - 3 years, 6 months ago

This can be generalized.

Let a a be an odd prime.

Find the largest positive integer x x such that x 2 + a 2 x = j 2 x^2 + a^2 x = j^2 , where j j is an positive integer.

x 2 + a 2 x = j 2 ( 2 x + a 2 ) 2 a 4 = ( 2 j ) 2 ( 2 x + a 2 ) 2 ( 2 j ) 2 = a 4 ( 2 x 2 j + a 2 ) ( 2 x + 2 j + a 2 ) = a 4 x^2 + a^2 x = j^2 \implies (2x + a^2)^2 - a^4 = (2j)^2 \implies (2x + a^2)^2 - (2j)^2 = a^4 \implies (2x - 2j + a^2) (2x + 2j + a^2) = a^4

2 x + 2 j = a 4 a 2 2x + 2j = a^4 - a^2

2 x 2 j = 1 a 2 2x - 2j = 1 - a^2

x = ( a 2 1 2 ) 2 = k 2 N \implies x = (\dfrac{a^2 - 1}{2})^2 = k^2 \in \mathbb{N} and j = ( a 1 ) ( a 3 + a 2 + 1 ) 4 = m l N j = \dfrac{(a - 1)(a^3 + a^2 + 1)}{4} = m * l \in \mathbb{N}

2 x + 2 j = a 3 a 2 2x + 2j = a^3 - a^2

2 x 2 j = a a 2 2x - 2j = a - a^2

x = a ( a 1 2 ) 2 = 2 h n 2 N \implies x = a (\dfrac{a - 1}{2})^2 = 2 h n^2 \in \mathbb{N} and j = a ( a 2 1 2 ) 2 = 2 q s 2 N j = a (\dfrac{a^2 - 1}{2})^2 = 2 q s^2 \in \mathbb{N}

2 x + 2 j = 0 2x + 2j = 0

2 x 2 j = 0 2x - 2j = 0

x = j = 0 \implies x = j = 0 clearly x = 0 x m a x . x = 0 \neq x_{max}.

For a > 1 a > 1

( a 2 1 ) 2 a ( a 1 ) 2 = ( a 1 ) 2 ( a + 1 ) 2 a ( a 1 ) = ( a 1 ) 2 ( a 2 + a + 1 ) > 0 ( a 2 1 ) 2 > a ( a 1 ) 2 (a^2 - 1)^2 - a(a - 1)^2 = (a - 1)^2 (a + 1)^2 - a (a - 1) = (a - 1)^2 (a^2 + a + 1) > 0 \implies (a^2 - 1)^2 > a(a - 1)^2 \implies ( a 2 1 2 ) 2 > a ( a 1 2 ) 2 (\dfrac{a^2 - 1}{2})^2 > a (\dfrac{a - 1}{2})^2

x = x m a x = ( a 2 1 2 ) 2 \therefore x = x_{max} = (\dfrac{a^2 - 1}{2})^2

For instance using a = 7919 x m a x = 983153583878400 a = 7919 \implies x_{max} = \boxed{983153583878400} .

Rocco Dalto - 3 years, 6 months ago

Log in to reply

I don't think you need the requirement that a a is an odd prime. Specifically, I do not see how you used the fact that a a is prime.

You can actually do this for all integers (be careful with the even case).

x 2 + a x = j 2 ( 2 x + a + 2 j ) ( 2 x + a 2 j ) = a 2 x^2 + ax = j^2 \rightarrow (2x+a+2j)(2x+a-2j) = a^2 . Both terms have the same parity and are factors of a 2 a^2 ,

Calvin Lin Staff - 3 years, 6 months ago

Log in to reply

I realize that, but the problem used the odd prime 3 3 so I used the general case for a a as an odd prime. I used the form that the problem stated x 2 + a 2 x = j 2 x^2 + a^2 x = j^2 and using the method I used above and using a prime(not necessarily odd) gives only three pairs of factors ( 1 , a 4 ) , ( a , a 3 ) , ( a 2 , a 2 ) (1,a^4), (a,a^3),(a^2,a^2) .

Rocco Dalto - 3 years, 6 months ago

It took me awhile to work through your solution. Putting in more steps would have been helpful. Think like a teacher! :>)

John T Reagan - 3 years, 6 months ago

you know for some reason I saw this on my NWEA (Northwest Evaluation Association) math test...

A Former Brilliant Member - 3 years, 6 months ago

Log in to reply

shrugs I made this problem myself when I was grade 8 x'D

Boi (보이) - 3 years, 6 months ago

Is there particular logic that allowed you to skip other possibilities of solutions where you swap (1 & 81) (3 & 27) on the right hand side of those x and t expressions ?or is it understood that we have to check them also to verify the solution doesn't change ?

Sparsh Priyadarshi - 3 years, 5 months ago

Log in to reply

t t is a non-negative integer, and therefore, 2 x 2 t + 9 2 x + 2 t + 9. 2x-2t+9\le 2x+2t+9.

Boi (보이) - 3 years, 5 months ago
Zain Majumder
Dec 3, 2017

We need x 2 + 9 x = n 2 x^2+9x=n^2 for some integer n n .

x 2 + 9 x n 2 = 0 x^2+9x-n^2=0

x = 9 ± 81 + 4 n 2 2 x = 9 + 81 + 4 n 2 2 x=\frac{-9\pm\sqrt{81+4n^2}}{2} \implies x=\frac{-9+\sqrt{81+4n^2}}{2} to maximize x x . Thus, 2 x + 9 = 81 + 4 n 2 2x+9=\sqrt{81+4n^2} . Therefore, we can create a right triangle with sides 9 9 , 2 n 2n , and 2 x + 9 2x+9 .

The Pythagorean triplet with length 9 9 that maximizes the length of the hypotenuse (and thus x x ) is the 9 40 41 9-40-41 right triangle (see below). This can be accomplished with n = 20 n = 20 and x = 16 \boxed{x = 16} .

For primitive Pythagorean triplet a b c a-b-c , where c c is the hypotenuse, the three sides can be generated by choosing two positive coprime integers with different parity r r and s s with r > s r > s :

a = r 2 s 2 a=r^2-s^2

b = 2 r s b=2rs

c = r 2 + s 2 c=r^2+s^2

Choosing r = 5 r=5 and s = 4 s=4 , we get the 9 40 41 9-40-41 triangle. There are no other perfect squares with a difference of 9 9 (note that for any integer a a , ( a + 1 ) 2 a 2 > a 2 ( a 1 ) 2 1 > 1 (a+1)^2-a^2>a^2-(a-1)^2 \implies 1>-1 , so consecutive differences of perfect squares will get increasingly larger than 9 9 after 25 25 , and smaller values can be tested with trial and error). 9 9 cannot be equal to 2 r s 2rs since it is odd, and it cannot be c c since it is a leg of the triangle. 9 9 can also be created from scaling up another primitive Pythagorean triplet, but the only such triangle can be created by scaling up a 3 4 5 3-4-5 triangle to get a 9 12 15 9-12-15 triangle. Therefore, we have found the largest value for the hypotenuse.

I love this interpretation of converting to something you are familiar with, and then applying what you already know.

Mathematics is built by reducing everything to a previously solved problem :)

Calvin Lin Staff - 3 years, 6 months ago

I got it wrong 'cause i wrote 20 instead of 16 so i thought i had done something wrong and tried with the smaller solutions. Anyways, my initial approach was the same as yours, but when i got to 81 + 4 n 2 \sqrt{81+4n^2} i observed that, since 4 n 2 = ( 2 n ) 2 4n^2=(2n)^2 is a square itself, we have the highest possible solution when 4 n 2 + 81 = ( 2 n + 1 ) 2 4n^2+81=(2n+1)^2 , which means n = 20 n=20 and therefore x = 16 x=16 .

Steve Gualtieri - 3 years, 4 months ago

Log in to reply

Be careful with statements like "highest possible solution when ...". This might seem intuitive obvious, so let's justify why.

A better explanation would be:
Let 4 n 2 + 81 = ( 2 n + a ) 2 4n^2 + 81 = ( 2n + a)^2 where a 1 a \geq 1 is a positive integer.
Then, n = 81 a 2 a n = \frac{ 81 - a^2 } { a } , and from the graph we know the maximum in the restricted domain occus at a = 1 a = 1 .

Calvin Lin Staff - 3 years, 4 months ago

Log in to reply

This is how I saw it:

Since ( n + 1 ) 2 = n 2 + 2 n + 1 (n+1)^2=n^2+2n+1 , we know that the square of the (n+1)-nth positive integer is the square of the n-th integer plus the n-th odd number.

Let's take an odd number 2 k + 1 2k+1 and let's ask ourselves: when is this number a difference between squares? For sure it is when these two squares are k 2 k^2 and ( k + 1 ) 2 (k+1)^2 .

Are there bigger solutions? No, because if m k m\ge k then 2 k + 1 2 m + 1 2k+1\le 2m+1 , which means the odd number we considered is even smaller than the difference between the square of m m and the next square, so it is useless to look further than that.

If you apply these considerations to our case, you can see that being 81 81 the 40-th odd number, and being 4 n 2 4n^2 the 2 n 2n -nth square, it has to be 2 n = 40 2n=40 , therefore n = 20 n=20 and, going back to our quadratic equation, x = 16 x=16 .

Steve Gualtieri - 3 years, 4 months ago

Log in to reply

@Steve Gualtieri I just realized, while reading this, how 2 k + 1 2k+1 is the ( k + 1 ) (k+1) -nth odd number and not the k k -th, otherwise 1 1 would be the 0-th odd number and not the first. But I hope that you get what I meant either way :)

Steve Gualtieri - 3 years, 4 months ago

@Steve Gualtieri Right, my point is that the justifications which you later provided, were not stated at the start.

For example, you used the important fact that "Apart from 4 n 2 4n^2 , we are left with just an odd integer, so lets solve 81 = 4 n + 1 81 = 4n + 1 .". If we were left with (say) 7 n + 81 7n + 81 , then the conclusion of " 7 n + 81 = 4 n + 1 7n+81=4n+1 " is not true (since n = 80 3 n = \frac{80}{3} is not accepted).

Calvin Lin Staff - 3 years, 4 months ago

Log in to reply

@Calvin Lin Of course you are right, but 7 n 7n is not a square (unless n = 7 n=7 ). I explicitly observed that 4 n 2 4n^2 is one regardless of the choice of n n , implicitly implying the argument i posted later. When i wrote my first solution I was using my phone and it was impractical to write a decently structured proof as to why the fact that 4 n 2 4n^2 is a square implies that, in order to be the highest possible integer square, 4 n 2 + 81 4n^2+81 must equal ( 2 n + 1 ) 2 (2n+1)^2 , but I have posted a more detailed explanation of it as soon as I got home, because I knew that my proof was incomplete without it.

Steve Gualtieri - 3 years, 4 months ago

Log in to reply

@Steve Gualtieri Yup, we're basically saying the same thing in different ways :)

Calvin Lin Staff - 3 years, 4 months ago
Chan Tin Ping
Nov 19, 2017

Relevant wiki: Quadratic Diophantine Equations - Solve by Bounding Values

The question is equivalent to ask find the biggest integer value of x x such that x 2 + 9 x x^2+9x is a perfect square. Since x = 0 x = 0 gives us x 2 + 9 x = 0 x^2 + 9x = 0 is a perfect square, we only need to consider positive x x only.

Obviously, x 2 + 9 x > x 2 x^2+9x> x^2 and x 2 + 9 x < x 2 + 10 x + 25 = ( x + 5 ) 2 x^2+9x< x^2+10x+25=(x+5)^2 . Hence, we can conclude that x 2 + 9 x x^2+9x is equal to ( x + k ) 2 ( k = 1 , 2 , 3 , 4 ) (x+k)^2\space\space(k=1,2,3,4) , because x 2 + 9 x x^2+9x is a perfect square between perfect squares x 2 x^2 and ( x + 5 ) 2 (x+5)^2 .

Try and error, we can get x = 3 , 16 x=3,16 . Hence, the answer is 16 \large 16 .

Note: The claim of "It is obvious that positive x x is bigger than negative x x , so just consider positive x x only. " need not be true. What is true is "Since x = 0 x = 0 gives us x 2 + 9 x = 0 x^2 + 9x = 0 is a perfect square, we only need to consider positive x x only".

Without setting this bound in place, it might turn out that there are no positive x x which satisfy the conditions, so it is not sufficient to only consider positive x x (at that point in time of the logical argument).

Calvin Lin Staff - 3 years, 6 months ago

Log in to reply

Oh yah, thanks.

Chan Tin Ping - 3 years, 6 months ago

@Chan Tin Ping Won't the trial and error method be pretty long?

Sumukh Bansal - 3 years, 6 months ago

Log in to reply

There exist 4 4 cases only, so it isn't long. Besides that, x 2 + 9 x = ( x + k ) 2 9 x = ( x + k ) 2 x 2 = k ( 2 x + k ) x = k 2 9 2 k \begin{aligned} x^2+9x&=(x+k) ^2\\ 9x&=(x+k)^2-x^2\\ &=k(2x+k)\\ x&=\frac{k^2}{9-2k} \end{aligned} So we just need to put four value to k k such that x x is positive integer. You can generalize it first then use try and error.

Chan Tin Ping - 3 years, 6 months ago

Log in to reply

Thanks a lot!

Sumukh Bansal - 3 years, 6 months ago

I found the answer with an excel spreadsheet fairly quickly.

Jarrod Hitchings - 3 years, 5 months ago

This was my method too:

x ( x + 9 ) = k 2 x (x+9) = k^2

x 2 < k 2 < ( x + 5 ) 2 x^2 < k^2 < (x+5)^2

etc.

How do you use latex on this site?

Sean McCloskey - 3 years, 6 months ago

Log in to reply

Enclose your latex code within the Latex brackets of \ ( \ ) \backslash ( \quad \backslash ) I've edited your comment for your reference.

Calvin Lin Staff - 3 years, 6 months ago

I may be misunderstanding something, but -25 is "larger" than 16, despite being negative. Why are negative numbers not being included?

Mike Wollaeger - 3 years, 5 months ago

Log in to reply

We're not comparing absolute values here. We're comparing them relatively, IE 25 < 0 < 16 -25 < 0 < 16 .

Calvin Lin Staff - 3 years, 5 months ago

x 2 + 9 x = y \sqrt{x^2 + 9x} = y x 2 + 9 x = y 2 x^2 + 9x = y^2 Completing the square is usually a good idea! First, however, we multiply everything by four to avoid fractions. ( 2 x ) 2 + 2 9 ( 2 x ) + 9 2 = ( 2 y ) 2 + 9 2 (2x)^2 + 2\cdot 9(2x) + 9^2 = (2y)^2 + 9^2 ( 2 x + 9 ) 2 ( 2 y ) 2 = 9 2 (2x + 9)^2 - (2y)^2 = 9^2 ( 2 x + 9 + 2 y ) ( 2 x + 9 2 y ) = 9 2 . (2x + 9 + 2y)(2x + 9 - 2y) = 9^2. The expressions in brackets must be integers. Obviously, the largest possible value of either expression is 81. To optimize x x , therefore, we write 81 1 = 9 2 81\cdot 1 = 9^2 : { 2 x + 9 + 2 y = 81 2 x + 9 2 y = 1 \begin{cases} 2x + 9 + 2y = 81 \\ 2x + 9 - 2y = 1 \end{cases} Add these to find 4 x + 18 = 82 x = 16 . 4x + 18 = 82 \ \ \ \therefore\ \ \ x = \boxed{16}. Indeed, 1 6 2 + 9 16 = 16 ( 16 + 9 ) = 16 25 = 4 5 = 20. \sqrt{16^2 + 9\cdot 16} = \sqrt{16\cdot (16+9)} = \sqrt{16}\sqrt{25} = 4\cdot 5 = 20.

Steve Zagieboylo
Dec 6, 2017

Here's a solution for the more visually-minded, like me. On the bottom is an x by x square, and above it is a 9 by x rectangle. You want to break up the rectangle and add the pieces to the square to make another square. You slice the rectangle into three pieces, two that are 4 by x and one that is 1 by x, and move one of the 4 by x pieces to the side of the square, as shown. Then the remaining 1 by x piece will have to make up the missing smaller square. Since that square is, we know, 4 by 4, then it must have 16 unit squares in it. It was a one by x rectangle, so x must have been 16.

Alistair Frith
Dec 5, 2017

I just plugged it into excel, hoping the answer was small. The only values that have integer results were 3 and 16.

me too! and carried the series on long enough to show that the first two solutions for x, 3 and 16, had a difference of 6-3=3 and 20-16= 4, and that the next one,5, would never be reached as the difference went to 4.5 for x=infinity.

T Kurtheru McKenzie - 3 years, 6 months ago
Melih Koruyucu
Dec 4, 2017

x²+9x=(x+a)²; (x+a) > x because 9x is positive and a is positive integer x²+9x=x²+2ax+a² (9-2a)x=a² x=a²/(9-2a) for largest x (9-2a) must be positive, a is integer 0<a<=4 for all values of a (a,x); (1, 1/7), (2, 4/5), (3, 3), (4, 16) max possible value of x is 16

Steve Hendrix
Dec 7, 2017

I enjoy seeing the approaches everyone uses. Here I chose the brute-force approach, since all possible solutions must be integers, and likely small integers at that. A quick Excel spreadsheet covers all integers from -64 to 63 (no particular reason to cut off there, though). Solutions to the problem as stated are -25, -12, -9, 0, 3, and 16. Because the problem asks for the largest rather than the most positive, it seems the correct answer should be -25.

Rory Bedford
Dec 9, 2017

I have a solution with no trial and error which I haven't seen yet: Rewrite x^2+9x as x(x+9) For this to be a perfect square, both x and x+9 must be perfect squares Since we know the difference between the squares goes up as the odd numbers (1,4,9... difference is 3,5,7 etc), the max value of x is when x+9 is the next square, giving us 16.

Elegant and fast solution indeed. I used the same approach ;)

Michele Santoro - 3 years, 6 months ago

Log in to reply

So did i ! I did it quickly in my head since i hadnt a pen !

Julien Bonal - 3 years, 6 months ago

When x = 3 neither it nor x+9 are squares, but their product is. So it is not necessary for both factors to be squares in order for their product to be one.

Simon Pindor - 3 years, 6 months ago
Yuval Hirsch
Dec 8, 2017

I paraphrased this question as "what does 9 x 9x need to be so that x 2 + 9 x x^2+9x is a square".

Every square larger than x 2 x^2 is of the form ( x + n ) 2 (x+n)^2 , so

x 2 + 9 = ( x + n ) 2 x 2 + 9 x = x 2 + 2 n x + n 2 9 x = 2 n x + n 2 9 x 2 n x = n 2 ( 9 2 n ) x = n 2 n 2 > 0 ( 9 2 n ) x > 0 9 2 n > 0 2 n < 9 n { 1 , 2 , 3 , 4 } x^2+9=(x+n)^2\\\\ x^2+9x=x^2+2nx+n^2\\\\ 9x=2nx+n^2\\\\ 9x-2nx=n^2\\\\ (9-2n)x=n^2\\\\ n^2>0\implies(9-2n)x>0\implies9-2n>0\implies2n<9\implies n\in\{1,2,3,4\}

From this we get

7 x = 1 5 x = 4 3 x = 9 x = 16 7x=1\\\\ 5x=4\\\\ 3x=9\\\\ x=16

And so the only integer solutions are 3 and 16.

Philip Lamkin
Dec 10, 2017

Note that we can factor x 2 + 9 x x^2+9x as x ( x + 9 ) x(x+9) . Suppose x 2 + 9 x x^2+9x is a perfect square. Now suppose some prime p p divides x x . Then p ( x + 9 ) p ( x + 9 ) x = 9 p = 3 p|(x+9) \implies p|(x+9)-x = 9 \implies p=3 . Therefore unless p = 3 p=3 , we must have that p 2 x p^2|x , and further that x x has an even number of factors of p p . This means that x = 3 n 2 x = 3n^2 or x = n 2 x=n^2 for some n n . In the case x = 3 n 2 x=3n^2 , we have that x 2 + 9 x = 9 n 4 + 27 n 2 = 9 n 2 ( n 2 + 3 ) x^2+9x = 9n^4+27n^2 = 9n^2(n^2+3)

This implies that n 2 + 3 n^2+3 is a perfect square, which we know only happens for n = 1 n=1 . Thus x = 3 x = 3 is one possible solution.

In the case x = n 2 x = n^2 , we have x 2 + 9 x = n 4 + 9 n 2 = n 2 ( n 2 + 9 ) x^2+9x = n^4+9n^2 = n^2(n^2+9) . This means n 2 + 9 n^2+9 is a perfect square, and the largest n n for which that is true will be when n 2 + 9 = ( n + 1 ) 2 n = 4 n^2+9 = (n+1)^2 \implies n = 4 . Thus x = 16 x = \boxed{16} is the largest possible x x .

Karim Ghaleb
Dec 8, 2017

Simplified to (square root x).(square root X+9)

Therefore X and X+9 must be whole numbers And since the whole numbers grow in sequence exponentially, then finding the two whole numbers whose difference equals 9 is easy. sr16.sr(16+9)= sr4.5 =20 Unfortunately this approach didn't get neither number 3 or 0 possibility.

Gabriel Koh
Dec 8, 2017

Let n = x 2 + 9 x n=\sqrt{x^2+9x} . x , n x,n are integers.

Thus n 2 = x 2 + 9 x n^2=x^2+9x .

Let x = n k x=n-k , thus k k is also an integer.

x 2 = ( n k ) 2 = n 2 2 k n + k 2 x^2=(n-k)^2=n^2-2kn+k^2

By rearranging the above: n 2 = x 2 + ( 2 k n k 2 ) n^2=x^2+(2kn-k^2)

So 9 x = 2 k n k 2 9x=2kn-k^2

Substituting for n n : 9 x = 2 k ( x + k ) k 2 9x=2k(x+k)-k^2

In terms of x x : x = k 2 9 2 k ( 1 ) x=\frac{k^2}{9-2k} - (1)

Since the numerator is of higher order, maximising k k maximises x x .

It can be seen from the denominator that for the constraint x 0 x≥0 , k 9 2 k≤\frac{9}{2} .

Maximum integer k k under this constraint is 4 4 . From ( 1 ) (1) , this yields x = 16 x=16 , which happens to be an integer.

I worked it out in my head and found 3 was a solution. Like another respondent, I tried it in Excel, but with both positive and negative x, up to +1000 and down to -1000. The ONLY solutions are x=16, 3, 0, -9, -12 and -25. It is clear these are the only ones, because as x tends to +infinity, sqrt(xsq+9x) tends to x + 4.5, and x tends to -infinity, sqrt(xsq+9x) tends to x - 4.5, as would be predicted by a series expansion. But what is interesting is the VALUES of sqrt(xsq+9x) corresponding to these solutions. These are 20, 6, 0, 0, 6, 20. There is no obvious symmetry to the sequence x=16, 3, 0, -9, -12 and -25, in contrast. And 20, 6, 0, 0, 6, 20 can be written 5 * 4, 3 * 2, 1 * 0 etc.

James Gilbert
Dec 7, 2017

General solution for any x 2 + ( 2 n + 1 ) x \sqrt{ x^2 + (2n + 1) x } is to observe the fact that n 2 = k = 1 n 2 k 1 n^2 = \sum_{k = 1}^n { 2k - 1} and x 2 + ( 2 n + 1 ) x = x x + ( 2 n + 1 ) \sqrt{ x^2 + (2n + 1) x } = \sqrt{ x } \sqrt{x + (2n + 1)}

in other words, the question requires both x x and x + ( 2 n + 1 ) x + (2n + 1) to be square

or in other words both 1 + 3 + 5 + . . . + ( 2 x 1 ) 1 + 3 + 5 + ... + (2\sqrt{x} - 1) and 1 + 3 + 5 + . . . . + ( 2 x 1 ) + ( 2 n + 1 ) 1 + 3 + 5 + .... + (2\sqrt{x} - 1) + ( 2n + 1) to be square

the largest point this is achieved is at x = n 2 x = n^2 , exceeding that would prevent one multiple or the other being a square number, in this case n = 4 n = 4 , therefore the solution is 16!

Greg Simay
Dec 7, 2017

If sqrt(x^2 + 9x) is an integer, then x^2 +9x is the square of an integer, which we designate as x+n. So, x^2 + 9x = (x+n)^2. Solving, we have x = n^2/(9-2n). We want the largest possible value for x and we want x to be an integer. If n=4, then 9-2n=1>0 and x=16.

Piers Aitman
Dec 7, 2017

OK how about this:

  1. We want x(x+9) to be a large square number.

  2. Note that the square number needs paired up prime factors in order to have an integer root.

  3. In my usual way of doing solutions, I note that the difference between squares is in the sequence of odd numbers, i.e. ...

  4. How about 16 and 25, which have a difference of 9 and luckily happen to be square numbers themselves . Therefore their multiple also has an integer root.

  5. Therefore 16 is a pretty good answer.

QUESTION:

Is this method alone sufficient to prove that there are no higher numbers that fit the bill?

Let x 2 + 9 x = z \sqrt{x^2+9x}=z . Then we solve the equation x 2 + 9 x z 2 = 0 x^2+9x-z^2=0 in x x , and, in order for x x to be the largest possible integer value, we take x = 9 + 4 z 2 + 81 2 x=\dfrac{-9+\sqrt{4z^2+81}}2 . So x x is an integer only if the expression 4 z 2 + 81 4z^2+81 is a perfect square, which means that it is necessary to be of the form 4 z 2 + 2 2 z p + p 2 4z^2+2\cdot 2z\cdot p+p^2 , i.e. 81 = 4 z p + p 2 = p ( 4 z + p ) 81=4zp+p^2=p(4z+p) . Since 81 = 3 4 81=3^4 , possible divisors are p = 1 , 3 , 9 , 27 , 81 p=1,3,9,27,81 . If p = 1 p=1 , then 4 z + 1 = 81 4z+1=81 , and we find z = 20 z=20 . If p = 3 p=3 , then 4 z + 3 = 27 4z+3=27 , and z = 6 z=6 . If p = 9 p=9 , then 4 z + 9 = 9 4z+9=9 , and z = 0 z=0 . If p = 27 p=27 , then 4 z + 27 = 3 4z+27=3 , and z = 6 z=-6 . Finally, if p = 81 p=81 , then 4 z + 81 = 1 4z+81=1 , and z = 20 z=-20 . So, the largest possible integer value of x x is obtained for z = 20 z=20 , i.e. x = 16 x=16 .

Thái Tào Hưng
Dec 7, 2017

Well, pass the calculating part to the computer, with just a simple program, I got 3 results: 0, 3 and 16.

Rocco Dalto
Dec 7, 2017

This can be generalized.

Let a a be an odd prime.

Find largest positive integer x x such that x 2 + a 2 x = j 2 x^2 + a^2 x = j^2 , where j j is an positive integer.

x 2 + a 2 x = j 2 ( 2 x + a 2 ) 2 a 4 = ( 2 j ) 2 ( 2 x + a 2 ) 2 ( 2 j ) 2 = a 4 ( 2 x 2 j + a 2 ) ( 2 x + 2 j + a 2 ) = a 4 x^2 + a^2 x = j^2 \implies (2x + a^2)^2 - a^4 = (2j)^2 \implies (2x + a^2)^2 - (2j)^2 = a^4 \implies (2x - 2j + a^2) (2x + 2j + a^2) = a^4

2 x + 2 j = a 4 a 2 2x + 2j = a^4 - a^2

2 x 2 j = 1 a 2 2x - 2j = 1 - a^2

x = ( a 2 1 2 ) 2 = k 2 N \implies x = (\dfrac{a^2 - 1}{2})^2 = k^2 \in \mathbb{N} and j = ( a 1 ) ( a 3 + a 2 + 1 ) 4 = m l N j = \dfrac{(a - 1)(a^3 + a^2 + 1)}{4} = m * l \in \mathbb{N}

2 x + 2 j = a 3 a 2 2x + 2j = a^3 - a^2

2 x 2 j = a a 2 2x - 2j = a - a^2

x = a ( a 1 2 ) 2 = 2 h n 2 N \implies x = a (\dfrac{a - 1}{2})^2 = 2 h n^2 \in \mathbb{N} and j = a ( a 2 1 2 ) 2 = 2 q s 2 N j = a (\dfrac{a^2 - 1}{2})^2 = 2 q s^2 \in \mathbb{N}

2 x + 2 j = 0 2x + 2j = 0

2 x 2 j = 0 2x - 2j = 0

x = j = 0 \implies x = j = 0 clearly x = 0 x m a x . x = 0 \neq x_{max}.

For a > 1 a > 1

( a 2 1 ) 2 a ( a 1 ) 2 = ( a 1 ) 2 ( a + 1 ) 2 a ( a 1 ) = ( a 1 ) 2 ( a 2 + a + 1 ) > 0 ( a 2 1 ) 2 > a ( a 1 ) 2 (a^2 - 1)^2 - a(a - 1)^2 = (a - 1)^2 (a + 1)^2 - a (a - 1) = (a - 1)^2 (a^2 + a + 1) > 0 \implies (a^2 - 1)^2 > a(a - 1)^2 \implies ( a 2 1 2 ) 2 > a ( a 1 2 ) 2 (\dfrac{a^2 - 1}{2})^2 > a (\dfrac{a - 1}{2})^2

x = x m a x = ( a 2 1 2 ) 2 \therefore x = x_{max} = (\dfrac{a^2 - 1}{2})^2

For instance using a = 7919 x m a x = 983153583878400 a = 7919 \implies x_{max} = \boxed{983153583878400} .

Joel Chang
Dec 6, 2017

I tried to make x 2 + 9 x x^2+9x a perfect square.

Think of it as

( x + 1 ) 2 = x 2 + 2 x + 1 = x 2 + 9 x (x+1)^2=x^2+2x+1=x^2+9x (then 7 x = 1 7x=1 , x = 1 7 x=\frac{1}{7} is not an integer)

or

( x + 3 ) 2 = x 2 + 6 x + 9 = x 2 + 9 x (x+3)^2=x^2+6x+9=x^2+9x (so 3 x = 9 3x=9 , x = 3 x=3 ).

Then the largest possible integer for x x becomes 16 16 , since

( x + 4 ) 2 = x 2 + 8 x + 16 = x 2 + 9 x (x+4)^2=x^2+8x+16=x^2+9x

that gives us x = 16 x=16 .

And we can't go any further, because the coefficient of the linear term can't exceed 9 9 , or it will not able to be made a perfect square.

Dylan Karzen
Dec 6, 2017

x 2 + 9 x = c \sqrt{x^2+9x}=c

x ( x + 9 ) = c \sqrt{x(x+9)}=c Therfore, x and (x+9) must both be perfect squares. The only perfect squares that have a difference of 9 are 25 and 16. Therefore x=3

Which is not the correct answer.

Chris Pearson - 3 years, 6 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 06 10:31:23 2017

@author: Michael Fitzgerald

"""
# https://brilliant.org/weekly-problems/2017-12-04/intermediate/?p=2
# Find the largest possible integer value of such that the expression is also an integer:

i = 1
limit = 1000

i_cubed_coeff = 0
i_squared_coeff = 1
i_coeff = 9
root = 1./2

while i  <= limit:
    i += 1
    x = (i_cubed_coeff*i**3 + i_squared_coeff*i**2 + i_coeff*i)**root
    if x == int(x):
        k = i

print '\nThe largest possible integer value of such that the expression is also an integer:  %d' % k

1
The largest possible integer value of such that the expression is also an integer:  16

Miles Koumouris
Dec 6, 2017

This solution is pretty roundabout, but it's different; letting y = x 2 + 9 x y=\sqrt{x^2+9x} and a = y x a=y-x , we have ( y x ) ( y + x ) = 9 x a ( a + 2 x ) = 9 x x = a 2 9 2 a . (1) \begin{aligned} (y-x)(y+x)&=9x\\ a(a+2x)&=9x\\ \Longrightarrow x&=\dfrac{a^2}{9-2a}.\tag{1} \end{aligned} Note that if y = x y=x , we obtain only one solution of y = x = 0 y=x=0 . Substituting x = 1 x=1 yields y = 10 > 1 y=\sqrt{10}>1 , which means that y > x x 1 y>x\;\; \forall \;\; x\geq 1 . Hence, a > 0 a>0 . Now, to maximise x x , we must minimise 9 2 a 9-2a and maximise a 2 a^2 (from ( 1 ) (1) ), both of which can be achieved by increasing a a . Thus, we choose the largest integer a a (since a Z + a\in \mathbb{Z}^+ ) such that 9 2 a > 0 9-2a>0 (otherwise x < 0 x<0 ). This is clearly 4 4 , since 9 2 × 5 = 1 < 0 9-2\times 5=-1<0 . This means that the maximum value of x x over all positive, integral a a is 4 2 / ( 9 2 × 4 ) = 16 4^2/(9-2\times 4)=16 , which is itself an integer, meaning we are done.

Hence, the largest integer x x such that x 2 + 9 x \sqrt{x^2+9x} is an integer is 16 \boxed{16} .

Saif Hassan
Dec 5, 2017

sqrt(x^2+9x)=sqrt(x)*sqrt(x+9), if x=16 then 16+9=25 is also a square number

import math

def isInteger(num):
    res = math.sqrt(pow(num,2) + 9*num)
    if res % 1 == 0:
        return True
    else:
        return False

for i in range(0,1000):
    q = isInteger(i)
    if q:
        print(str(i) + ": " + str(q))(q))
Johanan Paul
Dec 5, 2017

If we let y equal the expression, we can write it as: x 2 + 9 x = y 2 x^{ 2 }+9x = { y }^{ 2 }

Now what do you add to a square number to form another square number? A triangular number!

We can deduce 9x is the (x+1)th triangular number, because it's the amount that's wrapped around the initial square.

So now we can form the expression: n 2 + n 2 = 9 n \frac { { n }^{ 2 }+n }{ 2 } = 9n

which simplifies to: n 2 17 n = 0 { n }^{ 2 }-17n = 0

The solutions are 0 and 17. Since we want the bigger value, we'll roll with 17.

So, x + 1 = 17

x = 16 \boxed{x = 16}

I do not understand the whole solution. Could you explain more? By the way, add a triangular number to a square number does not always equal a square number.

Dexter Woo Teng Koon - 3 years, 6 months ago
Edwin Gray
Dec 4, 2017

Let r = gcd(x,y), so that x = ar, y = br with (a,b) = 1. Substituting, (a^2)(r^2) + 9(at) = (b^2)(r^2). Dividing by r, ra^2 + 9a =rb^2. Since (a,b) =1, a|r. Let r = ac. Then ca^3 + 9a = acb^2. Dividing by a, ca^2 + 9 =cb^2. Hence, c = 1,3, or 9. If c = 1, a^2 + 9 = b^2, b^2 - a^2 =9, and (b - a)(b + a) = 9, so b -a =1, b+ a = 9, 2b= 10, b =5, a =4, r=ca = 4, x= ar = 16.Repeating the calculation for c = 3 or c = 9 results in smaller values for x. Ed Gray

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...