Algebra Pre-Algebra and Basic Algebra Math Forum

 August 19th, 2016, 09:37 AM #1 Senior Member   Joined: Oct 2015 From: Greece Posts: 139 Thanks: 8 Even Fibonacci Numbers Hello! I don't really have good knowledge about Series in mathematics and I can't solve the problem below: Find the sum of the even terms of Fibonacci's function which are less than four million, with first two terms 1 and 2. We also can have the help of a computer. So I thought that this would be easy if every time I calculate the next term and if that term divided by 2 gives me a modulus of 0 (which means that it's an even number), then I will add it to my sum. But this is impossible because I need to do this four million times - 1 even for a computer it takes a lot time to calculate that!!!! So I was wondering if using mathematical series, can I find the sum easily? How can I succeed then? Thanks Last edited by skipjack; August 19th, 2016 at 04:13 PM. August 19th, 2016, 09:44 AM #2 Senior Member   Joined: Oct 2015 From: Greece Posts: 139 Thanks: 8 Actually, I'm wrong; if I do this four million times - 1, I will take terms that are a lot greater than four million because every new term in Fibonacci becomes a lot greater than the previous term. So I don't really know. Please help!!! Last edited by skipjack; August 19th, 2016 at 03:58 PM. August 19th, 2016, 11:52 AM #3 Senior Member   Joined: Sep 2015 From: USA Posts: 2,645 Thanks: 1476 A quick program in Mathematica, but it's written in standard style so it can be easily translated to the language of your choice. fprev = 1; fcurr = 2; sum = 0; While[fcurr < 4000000, tmp = fcurr; fcurr = fcurr + fprev; fprev = tmp; If[EvenQ[fcurr], sum += fcurr]; ]; sum (* this just displays the final sum *) 4613730 Thanks from topsquark and babaliaris Last edited by romsek; August 19th, 2016 at 11:57 AM. August 19th, 2016, 04:30 PM   #4
Global Moderator

Joined: Dec 2006

Posts: 21,119
Thanks: 2331

Quote:
 Originally Posted by babaliaris Find the sum of the even terms of Fibonacci's function which are less than four million, . . . with first two terms 1 and 2.
This specification is unclear. Why does it state that the first term is 1, given that 1 isn't even? If you are being asked to sum the values 2, 8, 34, etc., where each value is less than four million, you have only 11 values to sum, so you wouldn't need a computer . . . you could do that by hand. August 20th, 2016, 06:32 AM   #5
Senior Member

Joined: Oct 2015
From: Greece

Posts: 139
Thanks: 8

Quote:
 Originally Posted by romsek A quick program in Mathematica, but it's written in standard style so it can be easily translated to the language of your choice. fprev = 1; fcurr = 2; sum = 0; While[fcurr < 4000000, tmp = fcurr; fcurr = fcurr + fprev; fprev = tmp; If[EvenQ[fcurr], sum += fcurr]; ]; sum (* this just displays the final sum *) 4613730
I wrote the exact same code, but in my computer the loop could never finish.
So I thought maybe I could find the sum using series.

Actually I did one mistake :P . I didn't put while (fcurr < 4000000) but instead I had a counter (counter < 4000000, counter++)
and this is that drove me saying 4 million times - 1 which was a wrong decision. I will try that and tell you the results.

Ok I did it and it worked in an instant. But I must correct that you forgot to sum the 2. So the result is 4613732.

I also would like to know, is this possible without a computer using mathematic techniques
(and I'm thinking of series of course :P )? Or we must wait for someone to invent new mathematical techniques Last edited by skipjack; August 21st, 2016 at 02:17 AM. August 20th, 2016, 06:42 AM   #6
Senior Member

Joined: Oct 2015
From: Greece

Posts: 139
Thanks: 8

Quote:
 Originally Posted by skipjack This specification is unclear. Why does it state that the first term is 1, given that 1 isn't even? If you are being asked to sum the values 2, 8, 34, etc., where each value is less than four million, you have only 11 values to sum, so you wouldn't need a computer . . . you could do that by hand.
It gives you the 1 because you can't calculate the next term without it, even if it's not an even number. Then you have to choose only the even terms that occur and sum them.

Maybe you didn't understand quite well.

The 11th term in Fibonacci is the number 144 which is not the last term that is less than 4 million. I must sum all the even terms up to the last which is less than 4 million.

Last edited by skipjack; August 20th, 2016 at 07:13 AM. August 20th, 2016, 07:18 AM #7 Global Moderator   Joined: Dec 2006 Posts: 21,119 Thanks: 2331 The 11th even term is 3524578, which is the last even term under 4 million. The even terms are 2, 8, 2 + 4*8 = 34, 8 + 4*34 = 144, etc. Thanks from babaliaris August 20th, 2016, 07:26 AM   #8
Senior Member

Joined: Oct 2015
From: Greece

Posts: 139
Thanks: 8

Quote:
 Originally Posted by skipjack The 11th even term is 3524578, which is the last even term under 4 million. The even terms are 2, 8, 2 + 4*8 = 34, 8 + 4*34 = 144, etc.
You meant the 11th even term my bad Then there is actually a way to figure this out without the help of
a computer!!! Thank you very much! Maths is really awesome!

I wish I could be better in maths but it's so difficult to gain this knowledge. I'm trying 2 years to pass calculus in the university that I'm studying,
but I failed the exams 3 times because of Series and maybe integrals too. To tell the truth, I wasn't also much of a reader. Last edited by skipjack; August 20th, 2016 at 08:49 AM. August 20th, 2016, 09:00 AM #9 Global Moderator   Joined: Dec 2006 Posts: 21,119 Thanks: 2331 This is an algebra question, so I've moved it to the Algebra section of the site. August 20th, 2016, 09:42 AM   #10
Senior Member

Joined: Oct 2015
From: Greece

Posts: 139
Thanks: 8

Quote:
 Originally Posted by skipjack This is an algebra question, so I've moved it to the Algebra section of the site.
Ok no problem, didn't know that  Tags fibonacci, numbers Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Roli Linear Algebra 6 April 23rd, 2014 02:56 PM icemanfan Number Theory 18 March 13th, 2012 11:00 AM zolden Number Theory 12 January 26th, 2009 03:27 PM toejam Number Theory 2 January 4th, 2009 10:04 AM Fra Real Analysis 1 March 21st, 2008 11:50 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      