finished euler 23, using Set instead of nub, and for