Haskell CW II.2

Project Euler problems.

Warmup

On the line $y = 3x-5$, find at least 20 ordered pairs $(x,y)$ with $0\le x \le 5$.

Class work for 2.1–2.3

  1. Sum Square Difference The sum of the squares of the first ten natural numbers is,

     1^2 + 2^2 + ... + 10^2 = 385
    

    The square of the sum of the first ten natural numbers is,

     (1 + 2 + ... + 10)^2 = 55^2 = 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.

  1. Multiples of 3 and 5 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

  2. Smallest Multiple 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?

Last modified August 18, 2023: 2022-2023 End State (7352e87)