Solved by taking the 100th triangular number minus a 2000-year-old formula by Archimedes.

The sixth Project Euler problem - Sum Square Difference - is stated as follows.

The sum of the squares of the first ten natural numbers is 385. The square of the sum of the first ten natural numbers is 3025. Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.

```
fn sum_square_difference(n: u32) -> u32 {
(n*(n+1)/2).pow(2) - ((n*(n+1)*(2*n+1))/6)
}
fn main() {
let n = 100;
println!(
"The difference is {} with n = {}.",
sum_square_difference(n),
n,
);
}
```

- [project-euler] Project Euler Problem 17 - Number Letter Counts - solved with R
- [project-euler] Project Euler Problem 16 - Power Digit Sum - solved with Javascript
- [project-euler] Project Euler Problem 15 - Lattice Paths - solved with R
- [project-euler] Finding the 10001st prime with R
- [project-euler] Find longest Collatz sequence using Javascript
- [project-euler] Sum large numbers with Kotlin versus Javascript
- [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