The following question is somewhat difficult to motivate, so I'll state it simply and see if anyone has a nice answer.
Consider two permutations $\sigma, \tau \in S_n$ on a set of $n$ elements. For two numbers $j,k$ with $1 \leq j,k \leq n$, let us define the following equivalence relation: we say $j \sim k$ if $k$ can be obtained from $j$ via repeated applications of $\sigma$ and $\tau$. For example, if $\sigma = (1 \ 2) (3)$ and $\tau = (1) (2 \ 3)$, then $1 \sim 2 \sim 3$ and there is only one equivalence class. On the other hand, if $\sigma = \tau = (1 \ 2)(3)$, then only $1 \sim 2$ and there will be two equivalence classes.
Question: for general $\sigma$ and $\tau$ and general $n$, is there a simple expression for the number of equivalence classes as defined above? Ideally, it would be nice if the answer could be given in terms of the number of cycles in $\sigma$, $\tau$, $\sigma^{-1} \tau$, etc, or other simple properties of $\sigma$ and $\tau$ (the character of the permutation, etc).
Call the number of equivalence classes $E$, and the number of cycles in a permutation $\sigma$ $C(\sigma)$. Here are a couple (fairly trivial) observations:
If $\sigma = \tau$, then of course $E = C(\sigma)$.
If $\sigma = e$, then $E = C(\tau)$. Similarly, if $\tau = e$ then $E = C(\sigma)$.
Clearly from the definition, $E \leq \min \{ C(\sigma), C(\tau) \}$.
A somewhat intuitive way to think about the problem: two numbers $j, k$ are related if they are in the same orbit of either $\sigma$ or $\tau$. We can imagine first writing down the orbits of $\sigma$ and $\tau$ side by side, then joining any two orbits sharing a common entry. The final remaining number of sets is $E$.
Unfortunately, I haven't made any meaningful progress beyond the above; I suspect if there is an answer, it might be using machinery I'm not previously familiar with. Thanks in advance for any insight!
This isn't an equivalence relation. In your example, $1 \sim 2$ and $2 \sim 3$, but $1 \nsim 3$.
In your revised question, the easiest result is that the size of the orbit of $j$ is the index of its stabilizer: $\vert \mathscr O(j) \vert = [H:C_H(j)]$, where $C_H(j)= \{ \rho \in H \mid \rho(j)=j \}$. That means that the size of each orbit must divide $\vert H \vert$, which may help determine how many orbits there can be.