I want to prove the following algorithm to find an Eulerian path in a complete graph:
In the complete graph $K_{n}$ where $n = 2k + 1, k \in \mathbb{Z}^+$, let us label the vertices $1, 2, ..., n$. Then we can construct an Eulerian path by starting at the first vertex, and traversing along each next edge we have not previously visited, clockwise (assuming the vertices on a circle where clockwise means increasing $i$). That is, for a vertex $i$, take an unvisited edge to a vertex $j > i$, for the smallest possible $j$. If there exists no such $j$, we take the first unvisited edge to a vertex $j$ for $j \geq 1$, again for the smallest possible $j$. If there exists no unvisited edges at some vertex, it terminates.
For example, a path on $K_5$ generated by this algorithm would be:
$$ 1 \to 2 \to 3 \to 4 \to 5 \to 1 \to 3 \to 5 \to 2 \to 4 \to 1 $$
I strongly suspect that this algorithm is correct, but I don't know how to prove it.
Also, relatedly, I would like to prove that on complete graphs with even vertices, $K_{n}$ where $n = 2k, k \in \mathbb{Z}$, the same algorithm produces a path which is the longest path that does not use the same edge more than once.
Intuitively, it seems to work, but I am clueless on how to begin proving this.