Prime Factorization
A Python prime-factorization routine built on trial division and a Sieve of Eratosthenes-generated prime list.
Tag
Writing about Python.
A Python prime-factorization routine built on trial division and a Sieve of Eratosthenes-generated prime list.
Comparing Python methods for generating Fibonacci terms, recognizing valid terms, and finding their indices.
Comparing brute force with Euclid’s formula for the Pythagorean triplet in Project Euler problem 9.
A Python sliding-window solution for the greatest product of five consecutive digits in Project Euler problem 8.
Comparing two Python primality tests while finding the 10,001st prime for Project Euler problem 7.
Five Python primality tests, progressing from trial division through the 6k ± 1 optimization.
Using summation formulas to solve Project Euler problem 6, with proofs for the sums of natural numbers and their squares.
Solving Project Euler problem 5 in Python with a divisibility test and a GCD-based least common multiple.
Comparing brute-force and divisibility-based Python solutions for the largest palindromic product of two three-digit numbers.
Two Python solutions to Project Euler problem 3: the Unix factor command and a portable largest-prime-factor algorithm.
A faster solution to Project Euler problem 2 that generates only the even Fibonacci terms needed for the sum.
A Python and Java solution to Project Euler problem 2 that uses the Golden ratio to step between even Fibonacci terms.
Solving Project Euler problem 1 with inclusion-exclusion and arithmetic-series formulas in Python, Java, Perl, C++, and Ruby.