working through project euler in r