Problem #78 is yet another problem which involves partitions. The question reads: Project Euler Problem 78: Coin partitions Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7. OOOOO OOOO O OOO OO OOO …
Tag Archives: Coding
Project Euler Problem #77
Problem #77 concerns partitions of numbers where the summands in each partition are composed of the prime numbers less than the number. The question reads: Project Euler Problem 77: Prime summations It is possible to write ten as the sum of primes in exactly five different ways: 7 + 3 5 + 5 5 + …
Project Euler Problem #76
Problem #76 concerns partitions of positive integers. The question reads: Project Euler Problem 76: Counting summations It is possible to write five as a sum in exactly six different ways: 4 + 1 3 + 2 3 + 1 + 1 2 + 2 + 1 2 + 1 + 1 + 1 1 + …
Project Euler Problem #75
Problem #75 concerns the perimeters of right triangles with integer side lengths. The problem reads: Project Euler Problem 75: Singular integer right triangles It turns out that 12 cm is the smallest length of wire that can be bent to form an integer sided right angle triangle in exactly one way, but there are many …
Project Euler Problem #74
Problem #74 concerns the sum of the factorials of the digits in a number. The question reads: Project Euler Problem 74: Digit factorial chains The number 145 is well known for the property that the sum of the factorial of its digits is equal to 145: 1! + 4! + 5! = 1 + 24 …
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 …