First position of the kth sequence will be occupied by the number present at index = k / ( n - 1 ) !
first_num_index = k // n_partial_fact NEW_LINE k = k % n_partial_fact NEW_LINE return first_num_index , k NEW_LINE