problem5 finds the smallest positive number that is evenly divisible by all of the numbers from 1 up to given limit

problem5(limit)

Arguments

limit

Number to be checking delimiter

Value

The smallest number

Complexity

This function has the following complexity O( $n^ 5 2 $ 2 )

See also

https://projecteuler.net/problem=5 for more info about it

Examples

problem5(5)
#> [1] 12
problem5(10)
#> [1] 2520
problem5(20)
#> [1] 232792560