SOLUTION: For how many integers n is n^2 + 18n + 13 a perfect square?

Algebra ->  Linear-equations -> SOLUTION: For how many integers n is n^2 + 18n + 13 a perfect square?      Log On


   



Question 1162885: For how many integers n is n^2 + 18n + 13 a perfect square?
Found 3 solutions by solver91311, jim_thompson5910, ikleyn:
Answer by solver91311(24713) About Me  (Show Source):
You can put this solution on YOUR website!


Two.





I looked at Jim's answer and so I went back and ran an Excel VBA routine to check from -100,000 to 100,000. Didn't find any more in that range which really doesn't prove anything more than the -1000 to 1000 that Jim ran but does provide somewhat more of a warm fuzzy feeling that there are only 2.


John

My calculator said it, I believe it, that settles it


Answer by jim_thompson5910(35256) About Me  (Show Source):
You can put this solution on YOUR website!

This is something you do through trial and error. Though there may be a clever proof or trick to be able to find all values of n quickly (I'm blanking on what that method would be).

I used a perl script to try out values of n from -1000 to 1000. The only two integers that make n^2 + 18n + 13 to be a perfect square are n = -27 and n = 9


If n = -27,
n^2 + 18n + 13 = (-27)^2 + 18(-27) + 13 = 256

If n = 9,
n^2 + 18n + 13 = (9)^2 + 18(9) + 13 = 256

Both values of n lead to the same perfect square.

It's quite possible that there may be more solutions. I'm not entirely sure as I only tested from n = -1000 to n = 1000.

Answer by ikleyn(52814) About Me  (Show Source):
You can put this solution on YOUR website!
.

            It looks  AMAZINGLY,  but there is the way to solve the problem formally,  in strict Algebra logic,  without trials and errors.


Let  n^2 + 18n + 13 = m^2   be a perfect square.


Then


    (n + 9)^2 - 68 = m^2

    (n + 9)^2 - m^2 = 68

    (n + m + 9)*(n - m + 9) = 68.


Decompositions for 68 are  1*68, 2*34, 4*17, 17*4, 34*2 and 68*1.


For each decomposition, we have the system of equations


    n + m + 9 =  1
    n - m + 9 = 68


    n + m + 9 =  2
    n - m + 9 = 34


    n + m + 9 =  4
    n - m + 9 = 17


    n + m + 9 = 17
    n - m + 9 =  4


    n + m + 9 = 34
    n - m + 9 =  2


    n + m + 9 = 68
    n - m + 9 =  1


Easy analysis shows that some of these systems produce non-integer solution.


The only system, which produces appropriate integer solution, is THIS


    n + m + 9 = 34
    n - m + 9 =  2


The solution is  n = 9, m = 16.


Therefore,  n = 9 is the solution to the problem.


If you analyze the similar systems with decomposition of the number 68 into the product of negative factors, 
you will find another solution n = -27.


In all, there are 2 (two) such numbers n, 9 and -27.

Solved.