The Fibonacci numbers 1, 1, 2, 3, 5, 8, . . . form a sequence where each term, after the first two, is the sum of the two previous terms. How many of the first 1000 terms are even?
index=1000; i=0; n=1;i++;p=1;i++;printn,",",p,", ", ;loop1:n=n+p;i++;printn,", ", ;if(i>=index, goto loop3,0);loop2:p=p+n; i++;printp,", ", ;if(i>=index, goto loop3,0); if(i<=index and index%2==0, goto loop1, goto loop1); loop3:print"= Fibonacci Nos =",i
only 33 integers found: 0 | 2 | 8 | 34 | 144 | 610 | 2584 | 10946 | 46368 | 196418 | 832040 | 3524578 | 14930352 | 63245986 | 267914296 | 1134903170 | 4807526976 | 20365011074 | 86267571272 | 365435296162 | 1548008755920 | 6557470319842 | 27777890035288 | 117669030460994 | 498454011879264 | 2111485077978050 | 8944394323791464 | 37889062373143906 | 160500643816367088 | 679891637638612258 | 2880067194370816120 | 12200160415121876738 | 51680708854858323072
(assuming only positive integers)
The Fibonacci numbers 1, 1, 2, 3, 5, 8, . . . form a sequence where each term, after the first two, is the sum of the two previous terms.
How many of the first 1000 terms are even?
Even Fibonacci numbers: \(\large f_{3n} ,\ n\in N\)
source: http://oeis.org/search?q=even+fibonacci&sort=&language=german&go=Suche
\(\begin{array}{|rcll|} \hline f_{\color{red}3}=2,\ f_{\color{red}6}=8,\ f_{\color{red}9} = 34,\ f_{\color{red}12}=144,\ \ldots,\ f_{\color{red}3n},\ \ldots \text{ Fibonacci numbers are even} \\ \hline \\ \begin{array}{rcll} \text{arithmetic series:} \\ 3+(n-1)\cdot 3 &=& 1000 \\ (n-1)\cdot 3 &=& 997 \\ n-1 &=& \dfrac{997}{3} \\ n &=& 1+\dfrac{997}{3} \\ n &=& 333.\overline{3} \\ \mathbf{n} &=& \mathbf{333} \\ \end{array} \\ \hline \end{array}\)