# Questions tagged [diophantine-equations]

Questions on the use of Mathematica to find integer/rational solutions to equations.

48 questions
Filter by
Sorted by
Tagged with
827 views

### Partitioning a number into consecutive integers

Consider n=45; then $$1+2+3+4+5+6+7+8+9=45$$ $$5+6+7+8+9+10=45$$ $$7+8+9+10+11=45$$ $$14+15+16=45$$ $$22+23=45$$ Question: how to find all representations of a ...
2k views

### Puzzle — 20 People to consume 20 units of food under constraints

I am learning Mathematica because I love it. I also love solving puzzles so I think it would be a nice way to learn Mathematica through puzzles. This is first puzzle in series I intend to solve. So ...
5k views

### How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
629 views

### Is there a way to use functions like Prime[n] within Solve[]?

I'm trying to see if a number can be written as the sum of two prime numbers. Ideally, I would like to use Solve[ Prime[n] + Prime[m] == 100, {n, m}] But that ...
586 views

### FindInstance with a Diophantine equation seems to go on forever

I tried to find a non-trivial integer solution to the equation $$2012^2=a^2+b^2+c^2+d^2+e^2$$ with Mathematica but the computation takes minutes; I might be doing something wrong. ...
1k views

### Solving/Reducing equations in $\mathbb{Z}/p\mathbb{Z}$

I was trying to find all the numbers $n$ for which $2^n=n\mod 10^k$ using Mathematica. My first try: Reduce[2^n == n, n, Modulus -> 100] However, I receive ...
424 views

### Efficient way to solve equal sums $x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k$ with Mathematica?

I need to solve the system of equations, call it $S_1$, in the integers $$x_1x_2x_3x_4x_5 = y_1y_2y_3y_4y_5$$ $$x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k,\;\; k= 2,4,6$$ I used a very ...
3k views

### Finding the number of solutions to a diophantine equation

I want to count total number of the natural solutions (different from 0) of the equation $2x + 3y + z = 100$, but don't know how. How can I calculate it using Mathematica? I tried: ...
3k views

### How can I solve the equation with integers as a solution?

I want to solve the equation $$(x-1)^2 + (y-1)^2 + (z-1)^2 = 49$$ where $x$, $y$, $z$ are integer and $x \neq 1$, $y \neq 1$, $x \neq 1$. How do I tell Mathematica to do that?
723 views

145 views

### Unexpected behaviour with FindInstance

Evaluating FindInstance[a/(b + c) + b/(a + c) + c/(a + b) == 4, {a, b, c}, Integers] does what I'd expect it to do: find a solution to the equation in integers. ...
115 views

### Find out whether solutions exist rather than full-blown solution search

I have some quadratics, and I am trying to find out whether there exist solutions in the integers. The following tells me that the first does, wheraeas the second doesn't: ...
121 views

### Finding all solutions in the Roth's theorem

Roth's theorem. For all algebraic irrational $\alpha$ $$\displaystyle \left \lvert \alpha - \frac{p}{q} \right \rvert < \frac{1}{q^{2 + \epsilon}}$$ with $\epsilon>0$, has finitely many ...
184 views

119 views

### How to test solvability of a Diophantine equation?

When applying the BRC theorem I need to test if an equation has a non-zero solution in integers. The equation is of form: $$x^2 + by^2 + cz^2 = 0$$ We could try to directly check if this equation ...
990 views

I have a two lists $LHS$ and $RHS$, both of size $n$. I want to solve a system of inequalities of the form: $$LHS[1] \leq RHS[1]$$ $$LHS[2] \leq RHS[2]$$ $$LHS[3] \leq RHS[3]$$ $$\vdots$$ $$LHS[n]... 1answer 81 views ### How do we show reduction steps? This produces 3 equivalent Diophantine equations. How can we show the reduction steps? I need to do this for a paper. ... 0answers 84 views ### diophantine linear equation with condition on the sum of coefficients [closed] I am trying to solve the following diophantine equation x*a + y*b == c where a,b,c are integers and the absolute value of their sums is, for instance, 4. Then I ... 1answer 87 views ### Unexpected omission by Wolfram Alpha [closed] When Alpha is submitted the equation a(a^2-1)=2b^2, it unexpectedly forgets the integer solution a=1,b=0. What could explain this ? http://www.wolframalpha.com/input/?i=a(a%5E2-1)%3D2b%5E2 1answer 277 views ### Solving Diophantine equations Given a complex number z and a positive integer n, I would like to be able to find integer solutions \alpha,\beta,\gamma to the Diophantine equation$$0 < a^2\vert z \vert^2 + \beta\textrm{ ...
Solve this equation using Mathematica: $2^x + 113^y = z^2$, $\operatorname{gcd}(x, y) = 1$.