# Pell's Equation

## Homework Statement

Solve the equation 6n^2-18n+16 = m^2

the solution should be from pell's equation or Diophantus equation:
a^2 x^2 + c = y^2

## The Attempt at a Solution

I put my equation in the form: 3/2 (2n-3)^2 + 5/2 = m^2

Thanks

For which variable should you solve? I assume for n, then from 3/2 (2n-3)^2 + 5/2 = m^2 I get (2n-3)^2 = 2/3 ( m^2 - 5/2 ) and then 2n-3 = +- \sqrt{2/3 ( m^2 - 5/2 )}, so n = 3/2 +- 1/2 \sqrt{2/3 ( m^2 - 5/2 )}. If you should solve for m, m = +- \sqrt{3/2 (2n-3)^2 + 5/2}.
But since that's trivial, I assume there are further conditions on m and n. Should they be rational? Or integers?
An integer solution is, for example, n = 0 and m = +-4, or n = 1 and m = +-2.

OK, thanks for help

but when n = 3/2 +- 1/2 \sqrt{2/3 ( m^2 - 5/2 )}
how can i find the integer values for n?

(I assume you solve it without using pell equation)

I saw it, but the problem i think thay always have the factor of X^2 =1
and in my example dont

what if i change the form of my equation to:

2/5 m^2 - 3/5 (2n-3)^2 = 1

this is close to Pell equation form x^2 - P*y^2 = 1

Yes, I see. I'm sorry, don't know more.

From n = 3/2 +- 1/2 \sqrt{2/3 ( m^2 - 5/2 )}, you see that 2/3 ( m^2 - 5/2 ) must be a perfect odd square for n to be integer, so you can equally solve 2/3 ( m^2 - 5/2 ) = (2k+1)^2, with k = 0,1,2,... This can be reexpressed as m = +- \sqrt{6 k^2 + 6 k + 4}, so you can in principle find all solutions by calculating the above for all k and checking if it gives you an integer m ...
For k < 200, you have luck for k = 0 with m = 2, k = 1 with m = 4, k = 6 with m = 16, k = 15 with m = 38, k = 64 with m = 158, k = 153 with m = 376.
In principle, this gives you all solutions, but I don't see any general formula. For me, the only thing I can see is that 2k < m < 3k for large k.