AIME Problem: sum of all n>0 where n^2-19n is square

Re: AIME Problem

Hello, Trenters4325!

Find the sum of all positive integers \(\displaystyle n\) for which \(\displaystyle n^2\,-\,19n\,+\,99\) is a perfect square.
Let: \(\displaystyle \,n^2\,-\,19n\,+\,99\;=\;k^2\)

Then we have the quadratic equation: \(\displaystyle \,n^2\,-\,19n\,+\,(99\,-\,k^2)\;=\:0\)

Quadratic Formula: \(\displaystyle \:n\;=\;\frac{-(-19)\,\pm\,\sqrt{(-19)\,-\,4(1)(99\,-\,k^2)}}{2(1)} \;= \;\frac{19\,\pm\,\sqrt{4k^2\,-\,35}}{2}\)

Since \(\displaystyle n\) is an integer, \(\displaystyle 4k^2\,-\,35\) must be a square, say, \(\displaystyle a^2.\)

Then we have: \(\displaystyle \,4k^2\,-\,35\:=\:a^2\;\;\Rightarrow\;\;(2k)^2\,-\,a^2\:=\:35\)

We have two squares that differ by 35.

The only such squares are: \(\displaystyle \,(6^2,\,1^2)\) and \(\displaystyle (18^2,\,17^2)\)
\(\displaystyle \;\;\)That is: \(\displaystyle \,k\,=\,3\) or \(\displaystyle k\,=\,9\)

If \(\displaystyle k\,=\,3,\;n\:=\:\frac{19\,\pm\,1}{2}\:=\:10,\,9\)

If \(\displaystyle k\,=\,9:\;n\:=\:\frac{19\,\pm\,17}{2}\;=\;18,\,1\)


The sum of the \(\displaystyle n\)'s is: \(\displaystyle \,1\,+\,9\,+\,10\,+\,18\;=\;38\)
 
Re: AIME Problem

soroban said:
We have two squares that differ by 35.

The only such squares are: \(\displaystyle \,(6^2,\,1^2)\) and \(\displaystyle (18^2,\,17^2)\)

\(\displaystyle \;\;\)That is: \(\displaystyle \,k\,=\,3\) or \(\displaystyle k\,=\,9\)
Did you just come up with those pairs mentally?
 
Re: AIME Problem

Hello, Trenters4325!

Did you just come up with those pairs mentally?
No, I had some help . . .

Consecutive squares differ by consecutive odd numbers.

. . \(\displaystyle 0^2\underbrace{\qquad\quad}1^2\underbrace{\qquad\quad}2^2\underbrace{\qquad\quad}3^2\underbrace{\qquad\quad}4^2\underbrace{\qquad\quad}5^2\underbrace{\qquad\quad}6^2\underbrace{\qquad\quad}\qquad\cdots\)
. . . . .\(\displaystyle 1\qquad\qquad3\qquad\qquad5\qquad\qquad7\qquad\qquad9\qquad\qquad11\qquad\cdots\)

If the difference is an odd number, \(\displaystyle 2n\,+\,1\),
the smaller square is \(\displaystyle n^2\); the larger is \(\displaystyle (n\,+\,1)^2\).

We have the difference: \(\displaystyle \,2n\,+\,1\;=\;35\;\;\Rightarrow\;\;n\,=\,17\)

And that's how I found: \(\displaystyle 18^2\,-\,17^2\:=\:35\)


Sometimes there are more solutions.

Since \(\displaystyle \,35\;=\;5\,\times\,7\;=\;7\,+\,7\,+\,7\,+\,7\,+\,7\)
\(\displaystyle \;\;\)which can be modified to: \(\displaystyle \,3\,+\,5\,+\,7\,+\,9\,+\,11\)

and since these are the differences of consecutive squares, we have:
. . . . .\(\displaystyle 3\qquad\qquad\:5\qquad\qquad\:7\qquad\qquad\:9\qquad\qquad\:11\)
. . \(\displaystyle \;\,\overbrace{\qquad\qquad}\;\,\overbrace{\qquad\qquad}\;\,\overbrace{\qquad\qquad}\;\;\overbrace{\qquad\qquad}\;\;\overbrace{\qquad\qquad}\)
. . \(\displaystyle 1^2\qquad\qquad2^2\qquad\qquad3^2\qquad\qquad4^2\qquad\qquad5^2\qquad\qquad6^2\)

And that's how I found: \(\displaystyle 6^2\,-\,1^2\:=\:35\)
 
Top