I think that Problem 137 of Project Euler is a really fantastic problem since it has so many facets of how it can be solved. I will go through a one of them, and then link to a few other. The problem readsConsider the infinite polynomial series AF(x) = xF1 + x2F2 + x3F3 + ..., where Fk is the kth term in the Fibonacci sequenceWe shall call AF(x) a golden nugget if x is rational. Find the 15th golden nugget.I honestly don't know a whole lot about infinite series, and I am always quite intimidated by them. However, I know enough about them to know that there is something called a generating function which should be the keyword here.

Continue reading...Saturday, July 7, 2012

Problem 104 of Project Euler is squeezed in between three related problems, but that should not keep us from actually solving it. The problem reads Given that Fk is the first Fibonacci number for which the first nine digits AND the last nine digits are 1-9 pandigital, find k. It is pretty obvious to me that there is a brute force approach which requires almost no brainpower to implement, so I went for that one first to see if that would do the trick.

Continue reading...Wednesday, May 9, 2012

In problem 10229 at UVa Online Judge, Modular Fibonacci, our task is to calculate huge Fibonacci numbers, modulo some given integer.We analyse different methods of computing Fibonacci numbers, but they are either too slow or aren't applicable in our situation. We end up developing a fast solution that makes use of Fibonacci numbers in matrix form and exponentiation by squaring.

Continue reading...Sunday, January 30, 2011

Back to the big numbers again in Problem 25 of Project Euler. The problem reads What is the first term in the Fibonacci sequence to contain 1000 digits?With the BigInteger class this is rather easy to brute force. So a brute force solution is one of the two solutions I will show you. The other solution is one you can use with a calculator, or if you are good at mental arithmetic, you can do it with pen and paper.

Continue reading...Friday, September 17, 2010

The question treats one of the most famous and well known number sequences in the world; the Fibonacci sequence. The question isFind the sum of all the even-valued terms in the sequence which do not exceed four million.The problem is approach in a brute force approach, which is then refined, to become more efficient.

Continue reading...
Saturday, February 23, 2013

7 Comments