project euler implementations in js