# Proving true or false integral solution to equation $X^2-13Y^2 = 7$

The equation $$X^2 −13Y^2 = 7$$ has a integer solution, such that there is a pair $$(x,y) \in\Bbb Z^2$$ such that $$x^2 −13y^2 = 7$$.

I'm struggling to understand how this is supposed to be proved without brute forcing? I am relatively a beginner to mathematical proofs, so I would like to know how you would solve a proof like this as well.

• Grammatically? Not sure what you mean by that word here. Proving there is a solution to an equation like this can be done as simply as showing a solution. Proving there is no solution can be harder. Try looking modulo a number. Jul 11 at 16:35
• You are probably expected to first look at suitable congruences and divisibility results. Like $7\mid x^2+y^2$ if and only if _____? Quadratic residues are another recurring trick. Jul 11 at 16:36
• The equation can be rearranged as $X=\sqrt{7+13Y^2}$. I wrote a short Python script to test for all $Y \in \{-10^7,10^7\}$, whether or not $X$ is a whole number. The program returned no whole solutions for $X$. The closest it ever got to a whole number was for $Y = \pm 5097243, X = 18378371.000000082$ Jul 11 at 16:52
• Using modulo was the approach I was looking for. When I said grammatically I meant without needing to brute force a solution and prove it in that manner, apologies for the confusion. Jul 11 at 22:34

Easier than $$\bmod 7$$ is $$\bmod 13$$, whereby $$x^2-13y^2=7 \Rightarrow x^2\equiv 7 \bmod 13$$. The squares $$\bmod 13$$ are $$\{0,1,3,4,9,10,12\}$$. Hence there can be no integer solution to the original equation.

• Good point, I tried the wrong choice first!
– PC1
Jul 11 at 17:03
• Thank you, the example using modulus is very helpful since I was somewhat lost, @PC1's comment was helpful as well for giving a baseline which helps me get a feel for how to do this problem. Jul 11 at 22:29

We can prove that $$x^2\equiv\{0,1,2,4\}\mod7$$, for all $$x\in\mathbb Z$$. We can also prove that $$13y^2\equiv\{0,3,5,6\}\mod7$$ for all $$y\in\mathbb Z$$. So the only solutions happen when $$x^2\equiv13y^2\equiv0\mod7$$. This happens if and only if $$x\equiv y\equiv0\mod7$$.

So the left side of $$x^2-13y^2$$ must be a multiple of $$7^2$$, which is not possible as it must be equal to $$7$$.

There is no solution.

This is a generalized Pell's Equation and their theory is very heavy.

For this equation, let's work modulo 7.

Then the equation is $$x^2+y^2=0$$ modulo 7.

$$x^2$$ can be 0,1,2,4 modulo seven but then $$y^2$$ must be 0,6,5, or 3 modulo 7 respectively. So $$x$$ and $$y$$ must be both divisible by 7.

But then from the integral equation we get $$u^2-13v^2=\frac{1}{7}$$ for some integers $$u,v$$. Absurd. So there is no solution.