Some project euler solutions in java