# Why do the Diophantine equation $\frac{x}{y}+\frac{y}{z}+\frac{z}{x}=n$ gives an elliptic curve?

In a book "Which way did the bicycle go" was tought a problem of integer solutions of certain Diophantine equation. This is the idea, not an exact quotation:

For which integers $n$ are there integers $x,y,z$ such that $\frac{x}{y}+\frac{y}{z}+\frac{z}{x}=n$? There are solutions when $n=5,6,41$. Andrew Bremner and Richard Guy [BG] have gone much farther with this, observing that the question is intimately related to questions of rational points on certain elliptic curve.

My edition of the book does not say what is the article [BG] so can anyone give a sketch why there is an elliptic curve that helps to solve the Diohantine equation above?

I have studied commutative algebra from Atiyah's & Macdonald's book "Introduction to Commutative Algebra" but I don't have further background on elliptic curves.

$$\frac{x}{y} + \frac{y}{z} + \frac{z}{x} = n$$ and set

$$x = -X^2, y = 2(nX+4-Y), z = 4X$$ then we get

$$-\frac{X^{2} n^{2} + X^{3} - Y^{2} + 8 \, X n + 16}{2 \, {\left(X n - Y + 4\right)} X} = 0$$

So we want the numerator of this expression to equal $0$ which we can rewrite as

$$X^{3} + X^{2} n^{2} + 8 \, X n + 16 = Y^2$$

If one is familiar with the theory of elliptic curves, then for each fixed $n$, this is recognized as an elliptic curve.

You can find the article of Bremner and Guy here.

It is also discussed on mathoverflow here which further references this as well as this here on MSE.