problem3 finds the largest prime factor of given number

problem3(value)

Arguments

value

A integer.

Value

A number

See also

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

Examples

problem3(1)
#> Warning: no non-missing arguments to max; returning -Inf
#> [1] -Inf
problem3(100)
#> [1] 5
problem3(13195)
#> [1] 29