Fill the gaps in Eulers proof of Fermats last theorem for n=3 I wanted to read Euler's proof of Fermat's last theorem for n=3 but the versions I have found all seem to have a gap.  The key missing result is
$$ p^2 + 3q^2 = c^3=> p = r(r^2 + 3s^2),  q = 3r(r^2 - s^2) $$
for some r,s assuming p,q relatively prime and c odd.
Which is equivalent to the lemma below from a book by Edwards
Let p and q be relatively prime numbers such that pp +3qq is a cube. Then there exist integers a and b such that $p+q\sqrt{-3} = (a+b\sqrt{−3})^3$
It is clear from many of the proofs that if $p^2+3q^2 = c^3$ then $r^2+3s^2 = c$ for some r,s
From there it follows that
$$p^2 + 3q^2 = [r(r^2 + 3s^2)]^2 + 3*[3r(r^2 - s^2)]^2$$
But this result isn't sufficient to prove the necessary lemma.
Dan Harmon's blog, gets this wrong, but apparently the error Euler made was similar, so he is in good company.
This proof acknowledges the gap, and provides a reference to a proof of the required lemma, but I don't have access to the book
Edwards, Harold M.“Fermat’s Last Theorem: A Genetic Introduction
to Algebraic Number Theory.” Springer-Verlag. New York. 1977.
Euler wrote a paper in latin that is said to fix the problem with his first proof, but I can't see that it does this.  I can't read latin though, so maybe google translate misled me
I found a copy of Euler's proof in German(I think) on p159 here,Bergman but I can't read it.
 A: Below are excerpts from H. M. Edwards, giving proof of the Lemma needed to close the gap in Euler's published proof of Fermat's Last Theorem for the case $n=3$.
"Lemma. Let $a$ and $b$ be relatively prime numbers such that $a^2+3b^2$ is a cube.  Then there exist integers $p$ and $q$ such that $a+b\sqrt{-3}=(p+q\sqrt {-3})^3$.
Proof.  Let $a^2+3b^2=P_1P_2...P_n$ be a factorization into $4$'s and odd primes as in (4). If this factorization contains exactly $k$ factors of $4$ then $2^{2k}$ is the largest power of $2$ which divides $a^2+3b^2$ and, since $a^2+3b^2$ is a cube, it follows that $2k$ and hence $k$ are multiples of $3$. Moreover, any odd prime $P$ in the factorization must occur with a multiplicity which is a multiple of $3$. Thus $n$ is divisible by $3$ and the factors $P_1P_2...P_n$ can be arranged in such a way that $P_{3k+1}=P_{3k+2}=P_{3k+3}$. It follows that in the factorization of $a+b\sqrt{-3}$ given by (3) the factors corresponding to each group of three $P$'s are identical because the only choice is the choice of sign
$p^+_-q\sqrt{-3}$ and both signs cannot occur. Taking one factor from each group of three and multiplying them together then gives a number $(c+d\sqrt{-3})^3$ such that $a+b\sqrt{-3}={^+_-}(c+d\sqrt{-3})^3$. Since $-(c+d\sqrt{-3})^3=(-c-d\sqrt{-s})^3$ the desired result follows."
The Lemma evidently rests on some preliminaries since Edwards refers to results (3) and (4) in the course of his proof:
(3) "Let $a$ and $b$ be relatively prime. Then $a+b\sqrt{-3}$ can be written in the form$$a+b\sqrt{-3}={^+_-}(p_1{^+_-}q_1\sqrt{-3})(p_2{^+_-}
q_2\sqrt{-3})\cdot\cdot\cdot(p_n{^+_-}{q_n}\sqrt{-3})$$where the $p$'s and $q$'s are positive integers and ${p_i}^2+3q_i^2$ is either $4$ or an odd prime
If $a^2+3b^2$ is even then it is divisible by $4$. If $a^2+3b^2$ is not $1$ then it has factor $P$ equal to either $4$ or an odd prime and either (1) or (2) gives $a+b\sqrt{-3}=(p^+_-q\sqrt{-3})(u+v\sqrt{-3})$ where $p^2+3q^2=P$. Then $u$ and $v$ are relatively prime and the problem of taking a factor $p^+_-q\sqrt{-3}$ out of $u+v\sqrt{-3}$ is the same as that of taking one out of $a+b\sqrt{-3}$ except that $u^2+3v^2=(a^2+3b^2)/P$ is smaller than $a^2+3b^2$. Iterating this process must eventually lead to a stage $a+b\sqrt{-3}=(p_1{^+_-}{q_1}\sqrt{-3})\cdot\cdot\cdot(p_n{^+_-}{q_n}\sqrt{-3})(u+v\sqrt{-3})$ where $u^2+3v^2=1$. Then $u={^+_-1}$, $v=0$, $u+v\sqrt{-3}= {^+_-1}$ and the factorization is complete."
(4) "Let $a$ and $b$ be relatively prime. Then the factors in the above factorization of $a+b\sqrt{-3}$ are completely determined, except for the choice of signs as indicated, by the fact that $({p_1}^2+3{q_1}^2)({p_2}^2+3{q_2})^2\cdot\cdot\cdot({p_n}^2+3{q_n}^2)=a^2+3b^2$ is a factorization of $a^2+3b^2$ into odd primes and $4$'s. Moreover, if the factor $p+q\sqrt{-3}$ occurs then the factor $p-q\sqrt{-3}$ does not, and conversely. The thing to be proved in the first statement is that $p^2+3q^2=P$ determines $p$ and $q$, up to sign, if $p$ is $4$ or an odd prime. This is clear in the case $P=4$. If $P$ is an odd prime and if $a^2+3b^2$ were another representation of it then, by (2),$$a+b\sqrt{-3}=(p^+_-q\sqrt{-3})(u+v\sqrt{-3})$$and $P=P(u^2+3v^2)$, that is, $u^2+3v^2=1$, $u={^+_-1}$, $v=0$, $a+b\sqrt{-3}={^+_-}(p^+_-q\sqrt{-3})$ as was to be shown. The second statement is simply the observation that $p+q\sqrt{-3}$ and $p-q\sqrt{-3}$ would combine to give a factor $p^2+3q^2$, which is impossible if $a$ and $b$ are relatively prime."
Since (3) and (4) above make reference to (1) and (2), this lengthy citation of Edwards is not quite complete. I omit the proofs for now, but in (1) and (2) Edwards shows:
(1) "If $a$ and $b$ are relatively prime and if $a^2+3b^2$ is even then $a+b\sqrt{-3}$ can be written in the form$$a+b\sqrt{-3}=(1^+_-\sqrt{-3})(u+v\sqrt{-3})$$where the sign is appropriately chosen and where $u$ and $v$ are integers."
(2) "If $a$ and $b$ are relatively prime and if $a^2+3b^2$ is divisible by the odd prime $P$ then $P$ can be written in the form $P=p^2+3q^2$ with $p$ and $q$ positive integers and $a+b\sqrt{-3}$ can be written in the form $a+b\sqrt{-3}=(p^+_-q\sqrt{-3})(u+v\sqrt{-3})$ where the sign is appropriately chosen and where $u$ and $v$ are integers."
I hope this is of some use in filling the gap in question.
