Is it possible to write a math formula involving possible permutations, such as for the letters "ABC" in uppercase, no repeated combinations, and always generated in a static unchanging order.
Such as e.g., [A, B, C]
ABC # 1
CBA # 2
BCA # 3
CAB # 5
ACB # 4
BAC # 5
If given #4 not the actual value of "ACB", find that the value of the fourth iteration in the sequence would have been equal to ACB.
Is this possible without re-generating combinations or appending a key to a value?
CONTEXT: Trying to generate combinations from a static array of numbers in computer programming, and then by giving a key value such as an iteration number count, figure what the permutation would have been.