Well it would be more convinient to have a function f where
N is the number of rings
n is a counter for the total moves , I.E. (N^2 -1)
nActual = the actual move you are at currently in the sequence.
1............nActual..........n
The function f has signature nActual
and f(nActual) returns { move the top ring from pole X , to pole Y }
a function that will tell us witch ring to move from pole X to Y.
So Lets start looking for some patterns.
Here we have 4 rings.
We can observe a pattern of repititious movements
the x in suggests witch 2 poles that is involved in moving a ring between them.
But wait a minute. How can we know anything about the [ from -> to ] set.
We cant!
Lets consider numbers to represent nActual.
We know Base10 number system, but lets move down
to examine Base3 since there are 3 rings
Base2 since we move between 2 poles
Base1 to tell us if we get more information with lower Base.