Problem 78 of Project Euler has been in my scope for a long time, since it is the first exercise on the list which is solved by less than 5000 people at the time of writing this post. The problem readsLet p(n) represent the number of different ways in which n coins can be separated into piles. Find the least value of n for which p(n) is divisible by one million.To me this was a rather easy problem to solve, and now you might ask why since it doesn't seem straight forward. The answer to that lies in the fact that I was reading the problem description a good while ago since as mentioned earlier it is the first problem which has been solved by less than 5000 people. A day or so later I listened to the second episode of Strongly Connect Components where Bruce Reznick mentioned that his prime research is on integer partitions and he mentions the exact example given in the problem description.

Continue reading...Saturday, September 17, 2011

For some reason Problem 61 of Project Euler is a problem that not so many people have solved compared to the problems in the sixties range. However, I think that it was a quite approachable problem which was fun to solve. The problem readsFind the sum of the only ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set.I used a fairly efficient brute force method to find the solution.

Continue reading...Saturday, May 28, 2011

Problem 45 of Project Euler asks us to find a number which is both pentagonal, hexagonal and triangle number based on the formulas for these types of numbers. This is actually a pretty easy problem to solve since we have already made the major part of the code in the solution to Problem 44. And the solution to the problem runs in 1ms.

Continue reading...Saturday, May 21, 2011

I have found a solution to the problemFind the pair of pentagonal numbers, Pj and Pk, for which their sum and difference is pentagonal and D = |Pk − Pj| is minimised; what is the value of D?But I can't explain why it is the correct solution, and it bothers me. If you can help me, please let me know.

Continue reading...This site uses cookies.

Saturday, January 7, 2012

3 Comments