project euler solutions in javascript