find prime using iterator chain