Category: Project Euler

Project Euler 134

ProblemPrime pair connection Consider the consecutive primes p1 = 19 and p2 = 23. It can be verified that 1219 is the smallest number such that the last digits are formed by p1 whilst also being divis

Project Euler 131

ProblemPrime cube partnership There are some prime values, p, for which there exists a positive integer, n, such that the expression n3 + n2p is a perfect cube. For example, when p = 19, 83 + 82×19 =

Project Euler 123

ProblemPrime square remaindersProblem 123 Let pn be the nth prime: 2, 3, 5, 7, 11, …, and let r be the remainder when (pn−1)n + (pn+1)n is divided by pn2. For example, when n = 3, p3 = 5, and 43 + 63

Project Euler 124

ProblemOrdered radicalsProblem 124 problem is here Solution bruteforce dictionary You can define rad function by using prime_division method. And from 1 to 100000, you can get each of rad value. I

Project Euler 121

ProblemDisc game prize fundProblem 121 A bag contains one red disc and one blue disc. In a game of chance a player takes a disc at random and its colour is noted. After each turn the disc is returned