Two Square Variables?

Find the sum of values of a a for which ( x + 1991 ) ( x + a ) + 1 (x+1991)(x+a) + 1 is a perfect square for every integer x x .


The answer is 3982.

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.

6 solutions

Chew-Seong Cheong
Apr 24, 2016

Relevant wiki: Quadratic Discriminant - Problem Solving

f ( x ) = ( x + 1991 ) ( x + a ) + 1 = x 2 + ( 1991 + a ) x + 1991 a + 1 \begin{aligned} f(x) & = (x+1991)(x+a) + 1 \\ & = x^2 + (1991+a)x+1991a + 1 \end{aligned}

For f ( x ) f(x) to be a perfect square, it must have the form of f ( x ) = x 2 + 2 k x + k 2 f(x) = x^2 + 2kx + k^2 , therefore,

( 1991 + a 2 ) 2 = 1991 a + 1 a 2 + 3982 a + 3964081 = 7964 a + 4 a 2 3982 a + 3964077 = 0 ( a 1989 ) ( a 1993 ) = 0 \begin{aligned} \implies \left(\frac{1991+a}{2}\right)^2 & = 1991a + 1 \\ a^2 + 3982a + 3964081 & = 7964a + 4 \\ a^2 -3982a + 3964077 & = 0 \\ (a-1989)(a-1993) & = 0 \end{aligned}

The sum of all a a is 3982 \boxed{3982} (Of course, Vieta's formula confirms it).

Moderator note:

This solution makes the unstated (and unproven) assumption that " f ( n ) = n 2 + A n + B f(n) = n^2 + An + B is a perfect square for all integers n n implies that f ( x ) f(x) is a perfect square polynomial". This is a crucial part of the proof that most people miss out on.

Currently, all that we have is that the function attains the values of perfect squares at some points, which doesn't imply that we must have a perfect square polynomial. Let me address this gap:

Proof: If A = 2 k A=2k is even, then with x = k x = -k , B k 2 B-k^2 is a perfect square. With x = ( k + 1 ) x = -(k+1) , B k 2 + 1 B - k^2 +1 is a pefect square. However, the only perfect square that differ by 1 are 0 and 1, thus B k 2 = 0 B - k^2 = 0 , or that B = k 2 B = k^2 .

If A = 2 k + 1 A = 2k+1 is odd, then with x = k x = -k , B k 2 k B - k^2 - k is a perfect square. With x = k + 1 x = -k+1 , B k 2 k 2 B - k^2 - k - 2 is a perfect square. However, there are no perfect square that differ by 2.

Note: The more general case is dealt with in the comments.

Can anyone justify why a polynomial which is a perfect square at every integer value must be a perfect square polynomial?

That is, can somebody prove the following:

'If P ( x ) Z [ x ] P(x) \in \mathbb{Z}[x] is such that, x Z \forall x \in \mathbb{Z} , P ( x ) = n 2 P(x) = n^2 for some n Z n \in \mathbb{Z} then it must be that P ( x ) = ( Q ( x ) ) 2 P(x) = (Q(x))^2 for some Q ( x ) Z [ x ] Q(x) \in \mathbb{Z}[x] '

thanks

oscar donlan - 5 years, 1 month ago

Log in to reply

That's a great question to ask. It follows directly from Hilbert's irreducibility theorem , but that's somewhat higher power than is necessary.

We can simplify the proof as follows:
Step 1 Show that if f ( x ) Z [ x ] f(x) \in \mathbb{Z} [x] is a non-constant polynomial, then there are infinitely many primes which divide some value of f ( n ) f(n) for integers n n . The proof is similar to the existence of infinitely many primes, and we consider f ( f 0 p i ) f( f_0 \prod p_i )
Step 2 Suppose that f = g 2 h f = g^2 h where h h is a squarefree non-constant polynomial. Take a prime p p that doesn't divide the Resultant R ( h , h ) R(h, h') , but divides h ( n ) h(n) for some n n . Then, since f ( n ) f(n) is a square, we have p 2 h ( n ) p^2 \mid h(n) . Furthermore, p h ( n + p ) p \mid h(n+p) and thus p 2 h ( n + p ) p^2 \mid h(n+p) . Since we know that h ( n + p ) h ( n ) + p h ( n ) m o d p 2 h(n+p) \equiv h(n) + p h'(n) \mod{p^2} , this implies that p h ( n ) p \mid h'(n) and thus p R ( h , h ) p \mid R( h, h') which is the contradiction. Thus, h h is a constant.

Calvin Lin Staff - 5 years, 1 month ago

Log in to reply

wow, thank you very much!

oscar donlan - 5 years, 1 month ago

Nice to have a solution from you. Thanks! +1.

Mehul Arora - 5 years, 1 month ago

Did it the same way! Cheers. Also thanks to OP for a great question :)

FrEshy Pisuttisarun - 5 years, 1 month ago
Ivan Koswara
Apr 29, 2016

To make things easier, consider the polynomial x ( x + a ) + 1 x'(x'+a') + 1 instead, where x = x + 1991 , a = a 1991 x' = x+1991, a' = a-1991 . Note that x ( x + a ) + 1 = ( x + 1991 ) ( x + a ) + 1 x'(x'+a') + 1 = (x+1991)(x+a) + 1 by substituting. Because ( x + 1991 ) ( x + a ) + 1 (x+1991)(x+a) + 1 is a perfect square for all integer x x , we also have x ( x + a ) + 1 x'(x'+a') + 1 to be a perfect square for all integer x 1991 x'-1991 , which means x ( x + a ) + 1 x'(x'+a') + 1 is a perfect square for all integer x x' . For the rest of the following solution, assume that we're working with the polynomial x ( x + a ) + 1 x(x+a) + 1 instead of ( x + 1991 ) ( x + a ) + 1 (x+1991)(x+a) + 1 ; we will substitute back at the end.

First, we claim that a a is an integer. This is easy. Substitute x = 1 x = 1 to get that a + 2 a+2 is a perfect square, and hence an integer. Since 2 is an integer, we have a a is also an integer.

Now, we can divide into cases.

Case 1 : a = ± 2 a = \pm 2

This is the easy case. The polynomial factorizes to ( x ± 1 ) 2 (x \pm 1)^2 , so for integer x x , we also have integer x ± 1 x \pm 1 , and hence ( x ± 1 ) 2 (x \pm 1)^2 is a perfect square. So a = ± 2 a = \pm 2 are solutions.

Case 2 : a = 1 , 0 , 1 a = -1, 0, 1

All these three fail with x = 2 x = 2 ; we have x ( x + a ) + 1 x(x+a) + 1 to be 3, 5, 7 respectively. So these three are not solutions.

Case 3 : a > 2 a > 2 or a < 2 a < -2

If a < 2 a < -2 , then substituting x = 1 x = 1 gives a + 2 a+2 to be a perfect square. But a + 2 < 0 a+2 < 0 , so it's impossible to be a perfect square. If a > 2 a > 2 , substituting x = 1 x = -1 gives a similar conclusion. Thus none of these are solutions.

Thus the only solutions are a = 2 , 2 a = -2, 2 .

Back to the original problem, we found the solutions for a a' . Getting the solutions for a a is easy: a = a + 1991 = 1989 , 1993 a = a'+1991 = 1989, 1993 , which sum to 3982 \boxed{3982} .

Moderator note:

Great solution. For polynomials of the form f ( x ) = x 2 + A x + B f(x) = x^2 + Ax + B , in order for f ( n ) f(n) to be a perfect square, the theory (or our guesses) tells us that we have f ( x ) = ( x + k ) 2 f(x) = (x+k)^2 . We can then try and track down the approximate value of k k to get a better handle on this polynomial.

Very nicely done. Instead of having the notation do double duty, you should just use completely different variables like y , b y, b instead.

Your solution is essentially saying that for all integers, we must have ( n + 1991 ) ( n + a ) 1 (n+1991)(n+a) \geq -1 , which only holds true for 1989 a 1993 1989 \leq a \leq 1993 . Otherwise, substituting in any integere between -1991 and -a will violate the inequality.

Calvin Lin Staff - 5 years, 1 month ago
Nihar Mahajan
Apr 24, 2016

We can write it as x 2 + ( a + 1991 ) x + 1991 a + 1 x^2+(a+1991)x+1991a+1 and since its a perfect square, its discriminant equals 0 0 giving ( a + 1991 ) 2 4 ( 1991 a + 1 ) = 0 a 2 3982 a + 199 1 2 4 = 0 (a+1991)^2-4(1991a+1)=0 \Rightarrow a^2-3982a+1991^2-4=0 . Since the question asks for sum, by vieta's formula we have sum as 3982 \boxed{3982}

Moderator note:

This solution makes the unstated (and unproven) assumption that " f ( n ) f(n) is a perfect square for all integers n n implies that f ( x ) f(x) is a perfect square polynomial".

Nice Solution. +0!.

Mehul Arora - 5 years, 1 month ago

Not quite. You have to explain what "the function evaluates to a perfect square on all integers" implies that "the function is a perfect square polynomial". Then, and only then, can you use the fact about discriminants.

Calvin Lin Staff - 5 years, 1 month ago

Log in to reply

can you please elaborate some more on this because I followed the same method to get the answer

Chaitnya Shrivastava - 5 years, 1 month ago

Log in to reply

See my comment in Chew-Seong's solution above.

Calvin Lin Staff - 5 years, 1 month ago
Josh Banister
Apr 25, 2016

This problem is quite simple to do analytically. If a quadratic is a perfect square then it must be of the form ( x + c ) 2 (x+c)^2 . In other words, the minimum of the quadratic must be at 0 0 . Since ( x + 1991 ) ( x + a ) + 1 (x+1991)(x+a)+1 is a quadratic expression, we must have its minimum at zero. Equivalent of this is ( x + 1991 ) ( x + a ) (x+1991)(x+a) has its minimum at 1 -1 The minimum of a quadratic occurs halfway between it's roots which in this case must be at 1991 a 2 \frac{-1991 - a}{2} and so the least value is ( 1991 a 2 + 1991 ) ( 1991 a 2 + a ) = 1991 a 2 × 1991 + a 2 = ( a 1991 ) 2 4 (\frac{-1991 - a}{2} + 1991)( \frac{-1991 - a}{2} + a) = \frac{1991 - a}{2} \times \frac{-1991 + a}{2} = -\frac{(a-1991)^2}{4} . Let this value equal 1 -1 and we have the equality ( a 1991 ) 2 = 4 (a-1991)^2 = 4 . By expansion and Vieta's formula, the sum of these two roots are 2 × 1991 = 3982 2\times1991 = \boxed{3982}

Moderator note:

This solution makes the unstated (and unproven) assumption that " f ( n ) f(n) is a perfect square for all integers n n implies that f ( x ) f(x) is a perfect square polynomial".

Nice solution! +1

Mehul Arora - 5 years, 1 month ago

Yes, if the quadratic was a perfect square polynomial, then your claim is true.

But, why must the quadratic be a perfect square polynomial? That is not obvious, not explained in your solution.

Calvin Lin Staff - 5 years, 1 month ago
William Isoroku
Apr 26, 2016

( x + 1991 ) ( x + a ) + 1 = n 2 (x+1991)(x+a)+1=n^2

So

( x + 1991 ) ( x + a ) = n 2 1 = ( n + 1 ) ( n 1 ) (x+1991)(x+a)=n^2-1=(n+1)(n-1)

That'll give 2 answers to a a . You can check by completing the square.

Moderator note:

This solution is not valid.

Why must n 2 1 n^2 - 1 be factorized only as ( n + 1 ) ( n 1 ) (n+1)(n-1) ?

For example, if n = 5 n = 5 , can't we have 2 × 12 2 \times 12 ?

Calvin Lin Staff - 5 years, 1 month ago

Log in to reply

But can't we say like this: Since this is true for any integer x x , we can choose x = n a + 1 x=n-a+1 . Substituting, we get ( n a + 1992 ) ( n + 1 ) = ( n 1 ) ( n + 1 ) ( a + 1993 ) ( n + 1 ) = 0 (n-a+1992)(n+1)=(n-1)(n+1) \Rightarrow(-a+1993)(n+1)=0

Now, if n = 1 n=-1 , the original expression become ( x + 1991 ) ( x + a ) = 0 (x+1991)(x+a)=0 which is not always true. Therefore, a = 1993 a=1993 .

Simmilarly, when we choose x = n a 1 x=n-a-1 , we will get a = 1989 a=1989 and we can check that both value of a satisfy the required condition.

Agil Saelan - 5 years, 1 month ago

Log in to reply

  1. No, because the value of x x will impact the value of n n . Technically, for clarity of presentation, you want the variable to be represented ( x + 1991 ) ( x + a ) + 1 = n x 2 (x+1991)(x+a) + 1 = n_x ^2 , indicating that n x n_x depends on the value of x x and it isn't fixed.
  2. Why must there exist a value of x x such that n x = 1 n_x = -1 ? This is essentially the mistake made in Mehu's solution (Assuming that f ( n ) f(n) must be equal to a specific perfect square that you chose. As an explicit example, the function f ( x ) = ( x 2 + 2 x + 100 ) 2 f(x) = (x^2 + 2x + 100) ^2 is a perfect square for all integer, but is never equal to 0 or 1 for any integer.
  3. Because of point 1, you might not be able to chose a x n x = a 1 x - n_x = -a - 1 .

Calvin Lin Staff - 5 years, 1 month ago
Mehul Arora
Apr 24, 2016

( x + 1991 ) ( x + a ) = 1 (x+1991)(x+a) = -1

Now, there are only two ways to express -1 as a product, i.e. 1 × 1 , 1 × 1 -1 \times 1, 1 \times -1

Case 1:

x + 1991 = 1 x + a = 1 x+1991= -1 \\ x+a = 1

Subtracting the latter equation from the former, we get 1991 a = 2 a = 1993 1991 - a = -2 \Rightarrow a = 1993

Case 2:

x + 1991 = 1 x + a = 1 x+1991 = 1 \\ x+a = -1

Again, subtracting the latter equation from the former, 1991 a = 2 a = 1989 1991-a = 2 \Rightarrow a =1989

Sum of solutions = 1989 + 1993 = 398 2 1989+ 1993 = 3982 _{\square}

Moderator note:

This solution is not valid.

Vieta's can be applied too, as suggested by Nihar's solution.

Mehul Arora - 5 years, 1 month ago

This question looks familiar, or is it? @Mehul Arora

Kshitij Alwadhi - 5 years, 1 month ago

Log in to reply

Uhm I don't seem to remember :P

Care to explain? :P xD

Mehul Arora - 5 years, 1 month ago

Log in to reply

Perhaps its an old RMO question.

Harsh Shrivastava - 5 years, 1 month ago

Log in to reply

@Harsh Shrivastava Yes it is. We got it in FIITJEE, and we're in the same batch. That was intended to taunt ;)

Mehul Arora - 5 years, 1 month ago

Log in to reply

@Mehul Arora Good job! :P

Kshitij Alwadhi - 5 years, 1 month ago

@Mehul Arora Ohk kudos!

Harsh Shrivastava - 5 years, 1 month ago

@Harsh Shrivastava Hm, I'm willing to bet that most people scored 0/1 for the RMO grading of this problem. E.g. none of the solutions here are rigorously correct.

Calvin Lin Staff - 5 years, 1 month ago

We are sure that x is an integer. But we aren't that a is also an integer. So are you sure that we can assume both brackets to be integers?

Kushagra Sahni - 5 years, 1 month ago

Log in to reply

There will be no value of a where a is non integral, and the expression is a perfect square.

Mehul Arora - 5 years, 1 month ago

Log in to reply

That we know by the method of making discriminant=0 which I did but how can you presume that?

Kushagra Sahni - 5 years, 1 month ago

Log in to reply

@Kushagra Sahni Who said I presumed? It's just that I didn't mention it in the solution :P

Mehul Arora - 5 years, 1 month ago

I disagree with this claim. Just because "when n is an integer, f ( n ) f(n) is a perfect square" doesn't imply that "when n is not an integer, f ( n ) f(n) is not a perfect square".

Remember that given a statement, we can only take the contrapositive.

Calvin Lin Staff - 5 years, 1 month ago

I don't get the first line. Why must we have ( x + 1991 ) ( x + a ) = 1 (x+1991)(x+a) = -1 for some value of x x ? Just because f ( n ) f(n) is a perfect square, doesn't imply that f ( n ) = 1 f(n) = 1 has a solution. E.g. The function f ( x ) = 100 f(x) = 100 satisfies the "perfect square when integer" condition, but doesn't have a solution to f ( x ) = 1 f(x) = 1 .

Calvin Lin Staff - 5 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...