clojure-hackos.sequence-equation

Solution to the Sequence Equation problem See: https://www.hackerrank.com/challenges/permutation-equation

permute

(permute n p)

Returns the sequence of elements in p that satisfy the equation: p(p(y))x, where x is any value in the interval [1, n(p)].