find kth factor