Here's a complete set of solutions for arbitrarily many coins to a more restrictive version of the problem, where the second weighing is not allowed to depend on the result of the first.
Any solution is a partition of the N coins into nine groups according to where they appear in each weighing: left, right, or neither. Call the groups LL, LR, LX, RL, RR, RX, XL, XR, XX.
It's clear that XX = 0. Moreover, either LL or RR must be zero since a heavier coin in one group would mimic a lighter coin in the other, and likewise, LR or RL, LX or RX, and XL or XR must be zero. Since they're all nonnegative, we can represent a solution unambiguously by four integers: LL−RR, LR−RL, LX−RX, XL−XR.
The problem is symmetric under interchange of the pans in either weighing or swapping the weighings. We may as well fix the pan order by saying LX = XL = 0 and the weighing order by saying LR = 0, so the solution becomes LL−RR, RL, RX, XR.
There are three (almost-)linear constraints on the four variables: the total number of coins is N and the number of coins on each side in each weighing must be equal: $$\begin{eqnarray} |\mathrm{LL} - \mathrm{RR}| + \mathrm{RL} + \mathrm{RX} + \mathrm{XR} &=& N \\ \mathrm{LL} &=& \mathrm{RR} + \mathrm{RL} + \mathrm{RX} \\ \mathrm{LL} + \mathrm{RL} &=& \mathrm{RR} + \mathrm{XR} \end{eqnarray}$$ Note the second one implies $\mathrm{LL}-\mathrm{RR} \ge 0$, so $\mathrm{RR} = 0$. The constraints can be solved to give $$\begin{eqnarray} \mathrm{RL} = N - 3\,\mathrm{LL} \\ \mathrm{RX} = 4\,\mathrm{LL} - N \\ \mathrm{XR} = N - 2\,\mathrm{LL} \end{eqnarray}$$ The resulting values are in range iff $\mathrm{LL} \in \left[ \frac N 4, \frac N 3 \right] \cap \mathbb Z$. I believe all of those are solutions as there is nothing else that would stop them from being solutions.
This gives no solutions for 1, 2, or 5 coins. There are obviously no solutions to the original problem for 1 or 2 coins, but Goldstein's solution works for 5, so apparently result-dependent weighing is necessary in that single case.