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 n\displaystyle n for which n219n+99\displaystyle n^2\,-\,19n\,+\,99 is a perfect square.
Let: n219n+99  =  k2\displaystyle \,n^2\,-\,19n\,+\,99\;=\;k^2

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

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

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

Then we have: 4k235=a2        (2k)2a2=35\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: (62,12)\displaystyle \,(6^2,\,1^2) and (182,172)\displaystyle (18^2,\,17^2)
    \displaystyle \;\;That is: k=3\displaystyle \,k\,=\,3 or k=9\displaystyle k\,=\,9

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

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


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

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

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

    \displaystyle \;\;That is: k=3\displaystyle \,k\,=\,3 or k=9\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.

. . 02122232425262\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
. . . . .1357911\displaystyle 1\qquad\qquad3\qquad\qquad5\qquad\qquad7\qquad\qquad9\qquad\qquad11\qquad\cdots

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

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

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


Sometimes there are more solutions.

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

and since these are the differences of consecutive squares, we have:
. . . . .357911\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}
. . 122232425262\displaystyle 1^2\qquad\qquad2^2\qquad\qquad3^2\qquad\qquad4^2\qquad\qquad5^2\qquad\qquad6^2

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