Euler problems in R