Prime chain finder