Function to find the index of number at first position of kth sequence of set of size n
def findFirstNumIndex ( k , n ) : NEW_LINE INDENT if ( n == 1 ) : NEW_LINE INDENT return 0 , k NEW_LINE DEDENT n -= 1 NEW_LINE first_num_index = 0 NEW_LINE DEDENT