Re: help with diophantine equation




mechmech wrote:
>
> I have this equation: 3*n*n = 3*k*k + 73*k + 14
>
> I am interested in the most efficient way to get the solution
> ( which is n=32 and k=22 ) besides the trial and error method
> ( k=1,2,3,,,, then calculate n ) because for big enough numbers
> n and k, the trial and error is useless.

It's a difference of squares, i.e. after multiplying every term
by 12 it can be rearranged as:

(6.k + 73)^2 - (6n)^2 = 5161

which means the left hand side can be factored as follows:

(6.(k - n) + 73).(6.(k + n) + 73) = 5161

So the most efficient method of solution is to list every
way in which 5161 can be expressed as the product of two
factors (including both negative!):

+- 1, +- 5161
+- 13, +- 397
+- 397, +- 13
+- 5161, +- 1

and equate linear factors to each pair and see if the
result gives integers k and n. (This will be the case
if any only if k - n and k + n are both integers of
the same parity, i.e both odd or both even.)

.