Posts tagged “math”
5 posts Subscribe by RSS
5 posts
Project Euler 5: Building the Smallest Number Divisible by 1 to 20 from Least Common Multiples
Build the smallest number divisible by 1 to 20 by folding lcm(a, b) = a / gcd(a, b) × b with Euclid's algorithm, plus a correctness proof, overflow notes, and C++17 and Python 3 code.
Project Euler 4: Searching Products from the Top for the Largest Palindrome
Find the largest palindrome product of two 3-digit numbers by searching big products first and pruning, with a proof the pruning is safe, the link to 11, and C++17 and Python 3 code.
Project Euler 3: Finding the Largest Prime Factor by Dividing It Out
Find the largest prime factor of a 12-digit number by trial division. Covers why the leftover value is prime, the √n iteration bound, 64-bit integer range, and C++17 and Python 3 code.
Project Euler 2: Adding Only the Even Fibonacci Numbers
Prove every third Fibonacci term is even, derive the even-only recurrence E(k) = 4E(k−1) + E(k−2), and sum even terms up to four million, with C++17 and Python 3 code and a correctness proof.
Project Euler 1: Summing Multiples of 3 or 5 in O(1)
Add up every number below 1000 divisible by 3 or 5 without a loop, using inclusion–exclusion and the arithmetic series formula. C++17 and Python 3 code, a correctness proof and integer-range notes.
No posts match. Try another word.