Function to find permutation ( p ) of first N natural numbers such that there are exactly K elements of permutation such that GCD ( p [ i ] , i ) > 1
function Permutation ( n , k ) { let p = new Array ( n + 1 ) ;