The smallest common multiple of 1, 2 and 3 is the smallest common multiple of 1 and the smallest common multiple of 2 and 3.

The fifth Project Euler problem - Smallest Multiple - is stated as follows.

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

```
fn lcm(a: u64, b: u64) -> u64 {
if a <= 0 || b <= 0 {
0
} else {
a * b / gcd(a, b)
}
}
fn gcd(a: u64, b: u64) -> u64 {
if b <= 0 {
a
} else {
gcd(b, a % b)
}
}
fn main() {
let n = 20;
println!(
"{} is evenly divisible by all of the numbers from 1 to {}.",
(1..n).fold(n, |a, b| lcm(a, b)),
n
);
}
```

- [animation] Unknown Pleasures
- [tech-test] What is a binary tree and how to invert it using Kotlin
- [project-euler] Find Highly Divisible Triangular Numbers with Kotlin
- [project-euler] Find the Largest Product in a Grid with Rust
- [project-euler] Summation of the First Two Million Primes with Rust
- [project-euler] Finding the largest product in a series with Rust
- [project-euler] Finding the 10001st prime with Rust
- [js] The complete list of rational numbers with Stern-Brocot and Javascript
- [project-euler] Project Euler number six solved with Rust
- [project-euler] Smallest positive number that is evenly divisible by all of the numbers from 1 to 20 with Rust
- [project-euler] Finding the largest palindrome product with Rust
- [project-euler] Get the largest prime factor with Reason
- [project-euler] Find the sum of all even Fibonacci numbers below four million with OCaml
- [project-euler] Finding the sum of all multiples of 3 or 5 below 1000 with OCaml
- [project-euler] Special Pythagorean Triplet solved with Reason
- [personal] New Year's Resolution 2018