Tag: prime decomposition
-
Project Euler #5
Problem 5 asks: “What is the smallest number divisible by each of the numbers 1 to 20?” Instead of 20, we will consider the question for any natural number. This is a great question as it gets you to start thinking about number theory! Specifically, how numbers are composed as the products of primes. As…
-
Project Euler Problem #3 Complete!
Problem #3 asks: “What is the largest prime factor of the number 600,851,475,143?” Barring a naive, “brute-force” approach, the real question becomes: “How can we decompose any number, n, into prime factors?” I approached the problem by deciding to iterate through 2 and the rest of the odd naturals less than sqrt(n). Again, simply trying…