Mostly, you have a problem with off by 1s.

Your biggest mistake is here

Code:
Perm(a,k+1,n-1);
In particular, you are decreasing n each recursive call, but n itself is supposed to be the length of a, but the length of a is unchanged. Otherwise, there are two more off by 1s, but you should be able to figure it out by just trying small example cases, like permuting the first 3 numbers.