Let $F(n)$ be the $n$-th Fibonacci number. That is, $F(n)$ satisfies
$F(0)=0,F(1)=1,F(n)=F(n−1)+F(n−2) (if n≥2).$
Let $f_k(n)$ be the function such that
$f_0(n) = F(n)$,
$f_k(n) = \sum\limits_{i=1}^n f_{k-1}(i)\ \ ({\rm if}\ k \ge 1)$.
You are given that $f_1(1) = 1$, $f_2(2) = 3$ and $f_{10}(10) = 130965$.
Find $f_{10^8}(10^8) \pmod{1\ 000\ 000\ 007}$.
$$\sum_{n=1}^\infty f_n(n) t^n = \left(1 - \frac{t}{\sqrt{1-4t}}\right)\frac{t}{1-4t-t^2}$$
No idea how to proceed, just give you some ideas...
– achille hui Jan 10 '15 at 21:43$$ a_{n} = \begin{cases} 4 a_{n-1} + a_{n-2} - b_{n-2}, &n \ge 2\1,&n = 1\0,&n = 0\end{cases} \quad\text{ and }\quad b_{n} = \begin{cases} \frac{4n - 2}{n} b_{n-1}, & n \ge 1\ \1, & n = 0\end{cases} $$ Assume one has an efficient way to compute modular inverse of $n$ modulo $p = 10^9 + 7$. Using these recurrence relations, even for $N$ as large as $10^8$, computing $f_N(N) = a_N \pmod p$ by brute force still looks doable.
– achille hui Jan 11 '15 at 02:45