Gapplet

Give the number of elements of Sn and list the first few elements according to alphabetic order.

Here, if a permutation is written g = [4,3,1,5,2], it means that it belongs to S5 and satisfies

g(1) = 4,  g(2) = 3,  g(3) = 1,  g(4) = 5,  g(5) = 2.


Input n 
e.g., 12
 
 
Compute n! and some elements