# Formula for something that is probably easy

Closed
RoystonDA
Posts
2
Registration date
Monday January 5, 2015
Status
Member
Last seen
January 5, 2015
- Jan 5, 2015 at 09:18 PM
This is for a project I'm working on and it's just trying to figure out how many variations there are going to be, so I'll ask using a basic setup.

Ok, so the set up is this:

123

If we re-arrange the numbers without re-using any, we'll get 6 variations:

123
132
213
231
312
321

But then I change it to include a second line:

123
123

Now let's say we have the bottom line being the line that changes first so after 6 variations it'll end like so:

123
321

And then change the top, however, the bottom line does not go back to the first variation as the paring has already been used:

WRONG:
132
123

RIGHT:
132
132

Because of this rule (a name to this pattern would be useful please and thank you), instead of going through 6 variations until the top line changed again we only have 5, and each time we finish a cycle, we take one more out until we get to:

321
321

by which point we'd have had 21 variants. Meaning that 1=6, 2=21, 3=56.
My question is, what is the formula to work out this pattern?