Re: help with diophantine equation



john_ramsden@xxxxxxxxxxxxxx wrote:
>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
>
> It's a difference of squares, i.e. after multiplying every term
> by 12 it can be rearranged as:
>
> (6k + 73)^2 - (6n)^2 = 5161
>
> (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.

One need not blindly test all those possibilities.

First, note each factor has form 6m+73 = 1 (mod 3).
This excludes factorizations into negative factors,
since they are all = -1 (mod 3).

Second, using the symmetry n -> -n we may assume
n is positive and hence that 6 (k+n) + 73 is the
largest factor b in 5161 = a b. By elimination

n = (b-a)/12, k = n + (a-73)/6

This leaves only a,b = 13,397; 1,5161

with solutions n,k = 32, 22; 430,418

--Bill Dubuque
.



Relevant Pages

  • Re: Factoring problem solution
    ... because you are just guessing at what quadratics to ... >> use and, if they don't work, guessing again. ... which if all the 'e's" are even gives you a difference of squares. ... Adding rows is multiplying the corresponding "x^2 - N" and subtracting ...
    (sci.math)
  • Re: Factoring problem solution
    ... because you are just guessing at what quadratics to ... >> use and, if they don't work, guessing again. ... which if all the 'e's" are even gives you a difference of squares. ... Adding rows is multiplying the corresponding "x^2 - N" and subtracting ...
    (sci.crypt)
  • Re: [OT] Re: Recursive Functions
    ... Marcus Lessard wrote: ... >> I suppose as an example for recursive algorithms it is a little better ... > computation into a set of squares and then multiplying. ...
    (comp.lang.c)
  • Re: [OT] Re: Recursive Functions
    ... "Glen Herrmannsfeldt" ... > I suppose as an example for recursive algorithms it is a little better ... computation into a set of squares and then multiplying. ...
    (comp.lang.c)