The original post was a little ambiguous: "I need to find the sum of all 
numbers at even positions in the Fibonacci series upto 2 million."

But the project euler page 
(http://projecteuler.net/index.php?section=problems&id=2) is clear: "Find the 
sum of all the even-valued terms in the sequence which do not exceed four 
million."

Depending on which value you are after, it may not be necessary to enumerate a 
million terms of the fibonacci sequence.  In fact, only about thirty are 
needed.

Now if you want to do the harder problem, I suggest using GMP or some other 
Numerical extension, and not Python :)

Or play some interesting math tricks.  The wikipedia page on fibonaccis lists 
a lot of identities that could be exploited in intriguing ways.

Cheers
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to