worked on projecteuler31