...

/

Solution: Last Digit of the Sum of Fibonacci Numbers

Solution: Last Digit of the Sum of Fibonacci Numbers

Look at the solutions for the Last Digit of the Sum of Fibonacci Numbers Problem.

Solution 1: Pisano period

The table below shows the first 11 Fibonacci numbers and the first 11 numbers Sn=F0+F1++FnS_n = F_0 +F_1 +\cdot \cdot \cdot+F_n.

Stop and think: Do you see any similarities between sequences F0,,F10F_0,\ldots,F_{10} and S0,,S10S_0,\ldots,S_{10}?

It looks like Sn=Fn+21S_n=F_{n+2}-1. Let’s prove it by induction. This condition certainly holds for the base step (n=0)(n = 0) since S0=F21S_0 = F_2 - 1. For the induction step, let’s assume that the statement holds for 0,1,,n0,1,\cdot \cdot \cdot,n and prove it for n+1n+1:

Sn+1=F0+F1++Fn+Fn+1=Sn+Fn+1=Fn+21+Fn+1=Fn+31S_{n+1}=F_0+F_1+\cdot \cdot \cdot+F_n+F_{n+1}=S_n+F_{n+1}=F_{n+2}-1+F_{n+1}=F_{n+3}-1.

Another way of arriving at the formula Sn=Fn+21S_n = F_{n+2} - 1 is to sum up the following equalities:

Fn=  Fn+2Fn+1Fn1=  Fn+1FnFn2=  FnFn1F2=  F4F3F1=  F3F2F0=  F2F1\begin{aligned}&F_{n} &= ~~&F_{n+2} - \color{blue}{F_{n+1}}\\ &F_{n-1} &= ~~&\color{blue}{F_{n+1}} - \color{red}{F_{n}}\\ &F_{n-2} &= ~~&\color{red}{F_{n}} - F_{n-1}\\ && \vdots\\ &F_{2} &= ~~&F_{4} - \color{green}{F_{3}}\\ &F_{1} &= ~~&\color{green}{F_{3}} - \color{red}{F_{2}}\\ &F_{0} &= ~~&\color{red}{F_{2}} - F_{1} \end{aligned}

Since the identically colored terms cancel out, the sum of all terms on the left is Sn ...