Back to home

Project Euler

About

To quote its own homepage: "Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems."

The problems start off simple enough; Problem 1 only asks for the sum of all multiples of 3 and 5 below 1000. However, the difficulty rapidly increases after the first fifty problems, and clever application of advanced mathematical concepts is almost always necessary. Some of the hardest problems I've solved include:

I started solving problems in late 2014 and basically never stopped. What began as a way to teach myself Python has become my nerdiest pastime by far. I've significantly broadened and deepened my knowledge of both mathematics and algorithms through solving these problems.

Project Euler has more than 1.2 million members from across every country on Earth (except Vatican City). After an extremely productive 2023, I rank among the top 150 solvers worldwide.

Solution writeups

Project Euler's code of conduct prohibits sharing solutions for all problems beyond the first hundred. Their reasoning — which I agree with — is that while researching the concepts behind problems is only proper, looking up solutions outright is antithetical to learning. However, the first hundred problems are an exception to this rule: the skills (in both math and coding) needed to solve them can be thought of as building blocks for the more advanced problems, making them a sort of extended tutorial. As such, I've compiled my approaches to these early problems below.

This repository of solutions is still incomplete; I'll be adding to it when I find the time.

  1. Multiples of 3 or 5
  2. Even Fibonacci Numbers
  3. Largest Prime Factor
  4. Largest Palindrome Product
  5. Smallest Multiple
  6. Sum Square Difference
  7. 10001st Prime
  8. Largest Product in a Series
  9. Special Pythagorean Triplet
  10. Summation of Primes
  11. Largest Product in a Grid
  12. Highly Divisible Triangular Number
  13. Large Sum
  14. Longest Collatz Sequence
  15. Lattice Paths
  16. Power Digit Sum
  17. Number Letter Counts
  18. Maximum Path Sum I
  19. Counting Sundays
  20. Factorial Digit Sum
  21. Amicable Numbers
  22. Names Scores
  23. Non-Abundant Sums
  24. Lexicographic Permutations
  25. 1000-digit Fibonacci Number
  26. Reciprocal Cycles
  27. Quadratic Primes
  28. Number Spiral Diagonals
  29. Distinct Powers
  30. Digit Fifth Powers
  31. Coin Sums
  32. Pandigital Products
  33. Digit Cancelling Fractions
  34. Digit Factorials
  35. Circular Primes
  36. Double-base Palindromes
  37. Truncatable Primes
  38. Pandigital Multiples
  39. Integer Right Triangles
  40. Champernowne's Constant
  41. Pandigital Prime
  42. Coded Triangle Numbers
  43. Sub-string Divisibility
  44. Pentagon Numbers
  45. Triangular, Pentagonal, and Hexagonal
  46. Goldbach's Other Conjecture
  47. Distinct Primes Factors
  48. Self Powers
  49. Prime Permutations
  50. Consecutive Prime Sum
  51. Prime Digit Replacements
  52. Permuted Multiples
  53. Combinatoric Selections
  54. Poker Hands
  55. Lychrel Numbers
  56. Powerful Digit Sum
  57. Square Root Convergents
  58. Spiral Primes

Back to home