<s>[INST] Ramanujan, sum of two cubes - how was it discovered? I'm looking for motivation for, and hopefully a derivation of, Ramanujan's sum of  cubes formula 
$$\left(x^2+7xy-9y^2\right)^3+\left(2x^2-4xy+12y^2\right)^3=\left(2x^2+10y^2\right)^3+\left(x^2-9xy-y^2\right)^3$$
I can't see where one could start to justify this without actually expanding everything out. 
Additionally, does it provide a parametrisation of the surface 
$$X^3+Y^3=Z^3+1$$ in $\mathbb{Q}^3$
with 
$$X=\frac{x^2+7xy-9y^2}{2x^2+10y^2}$$
$$Y=\frac{2x^2-4xy+12y^2}{2x^2+10y^2}$$
$$Z=\frac{x^2-9xy-y^2}{2x^2+10y^2}$$
 [/INST] Observe that the discriminants of $x^2 + 7 x y -9 y^2$ and $x^2 - 9 xy - y^2$ are $85$ and the discriminants of $2x^2 - 4 x y + 12 y^2$ and $2x^2 + 10 y^2$ are $-80$.  This suggests that these integral  binary quadratic forms might be equivalent in pairs.  Testing this, we find
$$  \left. x^2 + 7 x y -9 y^2 \right|_{\pmatrix{x \\ y} \mapsto \pmatrix{\frac{11}{\sqrt{85}}x - \frac{7}{\sqrt{85}}y \\ \frac{9}{\sqrt{85}}x + \frac{2}{\sqrt{85}}y}} = x^2 -9x y - y^2  $$
and
$$  \left. 2x^2 - 4 x y + 12 y^2 \right|_{\pmatrix{x \\ y} \mapsto \pmatrix{x + y \\ y}} = 2x^2 + 10y^2  $$
Now we know that the sets of integers generated by each member of the first pair are the same.  (Generically, each member of that set is generated by different choices of $x$ and $y$ in the two forms.)  Likewise, there is a set of integers generated by each member of the second pair.
The minimum positive member of the first set is $1$, from $x^2 - 9 x y - y^2$ with $x = 1, y = 0$.  The minimum positive member of the second set is $2$ from $2x^2 + 10y^2$ with $x = 1$, $y = 0$.  This suggests a method of choosing pairs from the class of the first pair and the class of the second pair:


*

*Pick random representatives from each class.  Find the minimum positive representable value in each class and find $(x,y)$ pairs that realize that minimal value for the randomly chosen forms.

*If possible, find a change of variables that transforms one of the random class members to represent the minimal value at the same $(x,y)$ pair as the member from the other class.  This gives the two forms on the right-hand sides of the two above display equations.

*Now perform a "random" transform on one.  This gives the lower-left member in the above displays.

*Figure out where the lower transform moves the $(x,y)$ location of the minimal positive representable value and find a transform to the upper-right form moves its minimal point to the same place.  This transform produces the upper-left form from the upper-right form.


(There's probably a slick way to get that upper transform from the lower transform, but I'm still working through my first cup of coffee, so I'll just leave the procedure above.)
</s>