Here is a function that will generate random permutations of a set of integers, where a permutation is just an arrangement of the integers {1, 2, ..., n}.
Enter a positive integer n (1-40): Random permutation of {1, ..., n}.