# Diophantine equations module for SymPy

Hi Everyone !!! I am going to spend this summer doing my first open source project with SymPy. I will work on creating a Diophantine Equation module. I hope this will be a nice and a very useful enhancement.

The word “Diophantine” comes with the name Diophantus, a mathematician lived in the great city of Alexandria sometime around 250 AD. Often referred to as the “father of Algebra”, Diophantus in his famous work “Arithmetica” presented 150 problems that marked the early beginnings of number theory, the field of study about integers and their properties.

We call a “Diophantine equation” to an equation of the form,
f(x1, x2, …. xn) = 0 where n >= 2 and x1, x2, … xn are integer variables. If we can find “n” integers a1, a2, … an which satisfy the above equation, we say that the equation is solvable. Three basic problems arise concerning Diophantine equations.

1. Is the equation solvable?
2. In case of solvability, is the number of solutions finite or infinite?
3. If solvable can we find all of it’s solutions?

I plan to implement following classical Diophantine equations which are found most often in number theory.

1. a1x1 + a2x2 + a3x3  + …+ anxn = b (Linear Diophantine equation)
Here a1, a2, … an and b are constants. This solvable if gcd(a1, a2, …, an) divides b. Here gcd stands for greatest common divisor.

2.  x1**2 +  x2**2 +  x3**2 + … xn**2 = k
Here k is an non negative integer. There will be a number of solutions depending on n and k.

3. x1**2 + x2**2 + x3**2 + … xn**2 = xn+1**2 (Extension of Pythogorean equation)

4. x**2 + axy + y**2 = z**2
Here a is an integer constant.

5. x**2 – Dy**2 = 1  (Simplified Pell’s equation)
Here D is a non square positive integer.

If time permits, I hope to start on exponential Diophantine equations too.