MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: exponential diophantine equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62969] Re: exponential diophantine equations
  • From: mike_in_england2000 at yahoo.co.uk
  • Date: Fri, 9 Dec 2005 06:19:39 -0500 (EST)
  • References: <dn8qs9$hj7$1@smc.vnet.net><dn95f6$kna$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Andrea
No problem - mistakes happen.  Now I don't know much about diophantine
equations (but would like to know more) so I had a look at your
problem.

The main thing that I know about them is that they are very hard to
solve and that  there is no algorithm that can solve general
diophantine equations.  With this in mind it is not suprising that
Mathematicas standard commands cannot find a solution.

The approach I took is one of brute force and ignorance .  I define a
function - dioph[x,k] that corresponds to your expression.  I then loop
over a large number of values for x and k and test the result.  Every
pair of x,k values that satisfies your equation gets added to the list:

dioph[x_, k_] := (5 x)^2 - 2^k*3*(5 + k)^2 - 131*k - 7
Reap[
    Do[
      Do[
        If[dioph[x, k] == 0, Sow[{x, k}];]
        , {x, 0, 1000}
        ]
      , {k, 0, 1000}
      ]]

gave the output

{Null, {{{31, 6}}}}

so this looked at 1002001 possible x,k pairs and found the solution
x=31, k=6.  This  took about 16 seconds on my machine.  This is crude
and could probably be vastly improved but at least it finds solutions.

Recently I have been curious about diophantine equations.  Where did
this particular one come from?  Why do you want to solve it?

Thanks,
Mike


  • Prev by Date: Re: Types in Mathematica, a practical example
  • Next by Date: Re: Re: Re: Types in Mathematica thread
  • Previous by thread: Re: exponential diophantine equations
  • Next by thread: Re: exponential diophantine equations