1

How solve the following equation in Mathematica (preferably in one line) for pairs of $(x,y)$ such that $x$ and $y$ are primes?

$x^3-y^4=1$

Artes
  • 57,212
  • 12
  • 157
  • 245
Rebel
  • 115
  • 5

2 Answers2

6

FindInstance cannot prove that there are no solutions, especially when the domain of solutions is the set of primes. More acceptable approach would be:

Reduce[x^3 - y^4 == 1, {x, y}, Primes]
False

or

Resolve[Exists[{x, y}, x^3 - y^4 == 1 ], Primes]
False

Nonetheless neither Reduce nor Resolve with Exists can work successfully in general (with different equations) with Primes. This issue is quite similar to difficulty of deciding whether the Collatz conjecture is true or false.

Let's prove the theorem mathematically. We can see that both $x$ and $y$ cannot be both odd, neither both even since $x^3-y^4$ is odd, and so one of them has to be even, the only even can be $y=2$ since $2^3-y^4<0$ for any prime $y$. Now $x^3=2^4+1=17$ cannot be satisfied for any whole number $x$. QED.

Artes
  • 57,212
  • 12
  • 157
  • 245
  • 1
    Up to the documentation (see Properties and RElation section),"When there are no solutions, FindInstance returns an empty list:" and (see Details and Options) "FindInstance may be able to find instances even if Reduce cannot give a complete reduction." – user64494 Sep 01 '23 at 17:04
  • However, +1 for your answer. – user64494 Sep 01 '23 at 17:10
  • 1
    @user64494 It's natural that FindInstance returns an empty list when there are no solutions, otherwise it would be useless. In our case we need proving that there are no solutions and for this task, Reduce or Resolve are more suitable since e.g. Reduce returns boolean formulae while FindInstance returns replacement rules and the former is appropriate for complete description of solution sets, for this issue see e.g. in What is the difference between Reduce and Solve? – Artes Sep 01 '23 at 22:38
4

Indeed, this can be done in one line:

FindInstance[x^3 - y^4 == 1, {x, y}, Primes]

{}

No solution in the primes.

user64494
  • 26,149
  • 4
  • 27
  • 56