Project Euler Problem #73

Problem #73 concerns Farey Sequences. The problem reads: Project Euler Problem 73: Counting fractions in a range Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d ≤ 8 in ascending order of size, we get: 1/8, 1/7, 1/6, 1/5, 1/4, …

Project Euler Problem #72

Problem #72 concerns Farey sequences. The question reads: Project Euler Problem 72: Counting fractions Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d ≤ 8 in ascending order of size, we get: 1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, …

Project Euler Problem #71

Problem #71 concerns Farey Sequences. The question reads: Project Euler Problem 71: Ordered fractions Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d ≤ 8 in ascending order of size, we get: 1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, …

Project Euler Problem #70

Problem #70 concerns Euler’s Totient Function again. The problem reads: Project Euler Problem 70: Totient permutation Euler’s Totient function, φ(n) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are …

Project Euler Problem #69

Problem #69 concerns multiplicative functions, and more specifically, Euler’s Totient Function. The question reads: Once again, I apologize for not embedding this within WordPress. As it turns out, this problem can be done by hand with a little mathematical knowledge. Here’s my solution: Solution #1: Mathematical Approach This solution makes use of the fact that …

Project Euler Problem #68

Problem #68 concerns magic 5-gon rings that are very similar to magic squares. The question reads: This is yet another problem that I dreaded solving for years because I thought it would be a pain to implement. Luckily, it’s not too bad with a little brute force. Here’s my solution: Solution #1: Brute Force Approach …

Project Euler Problem #67

Problem #67 is the first instance of a problem that is just a more computationally intensive version of an earlier problem. The question reads: Project Euler Problem 67: Maximum path sum II By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top …

Project Euler Problem #66

Problem #66 concerns the minimal solutions to Pell Equations. The question reads: Project Euler Problem 66: Diophantine equation Consider quadratic Diophantine equations of the form: x2 – Dy2 = 1 For example, when D=13, the minimal solution in x is 6492 – 13×1802 = 1. It can be assumed that there are no solutions in positive integers when D is square. …

Project Euler Problem #65

Problem #65 concerns the infinite continued fraction for e. The question reads: Once again, I apologize for not embedding this problem in WordPress. The problem had a ton of LaTeX this time and I thought it would be easier to just upload a screenshot. Unfortunately, the continued fractions for e cannot be reduced to solving …

Project Euler Problem #64

Problem #64 is another Project Euler problem that concerns infinite continued fractions for irrational numbers. The question reads: I apologize for not embedding the wording of the problem within WordPress. I was a bit lazy this time because the problem was so long. This is a good example of when a coding problem gives too …

Design a site like this with WordPress.com
Get started