<s>[INST] Solving a Diophantine equation3 The Diophantine equation that I have to solve is:
$$343x^2-27y^2=1$$
This question has already been posted by other user but it has not received an answer.
I proved to solve it.
This is my attempt:
substituting for $x^2=u$ and $y^2=v$ the equation becomes a Diophantine linear equation:$$343u-27v=1$$
using Euclid's algorithm to solve the equation, the solutions are:
$$
\left\{
\begin{array}{ll}
u=10+27k \\
v=127+343k\end{array} 
\right.
$$
substituting these solutions in first equation we obtain:
$$y^2=127+343\cdot (\frac {x^2-10}{27})$$
$x^2-10$ has to be a multiple of $27$ therefore $$x^2=c27+10 \tag{1}$$ (with $c$ integer)
$(1)$ becomes $$(x-1)(x+1)=9\cdot (3c+1)$$
obtaining two systems:
$$
\left\{
\begin{array}{ll}
x+1=n9 \\
x-1=\frac {3c+1}{n}\end{array} 
\right.
$$
and 
$$\left\{
\begin{array}{ll}
x-1=n9 \\
x+1=\frac {3c+1}{n}\end{array} 
\right.
$$
The solution of the first is $c=3p+1$ (with $p$ integer):
indeed if $x+1\equiv 0\pmod 3$ $c$ has to be $c\equiv 1\pmod 3$ because $c(x-1)-1$ has to be a multiple of $3$.
The solution of the second system is $c=3p+2$: indeed if $x-1\equiv 0\pmod 3$ $c\equiv 2\pmod 3$. How can I can continue and are there other solutions?
 [/INST] $343x^2-27y^2=1$
$⇒343x^2≡1 mod 27$
$343≡19 mod 27$
we can find that if $x=8$ we get:
$343 . 8^2 ≡ 1 mod 27$
We can see that x belong to a set its members make an arithmetic progression and have following specification:
$s . 19 ≡ 1 mod 27$; $s = [10, 37, 64, . . a+27k]$
where $a=10$; and $d=27$ is common ratio.
With $k=5257504398$ we get $x=376766$
Also $y^2=343 k$ that gives $y=1342879$
Therefore the parametric solution is:
$x=\sqrt{10+27k}$ 
$y=\sqrt{343 k}$
This equation probably has more solutions. 
</s>