Solving thus summation

33 Views Asked by At

$F_1 = 1, F_2 = 2, F_i = F_{i - 1} + F_{i - 2} (i > 2)$.

A new number sequence $Ai(k)$ by the formula:

$A_i(k) = F_i × i^k (i ≥ 1)$.I need to calculate the following sum: $A_1(k) + A_2(k) + \dots+ A_n(k)$. This answer has to be found modulo a large prime.

Please note $k$ will not exceed $20$.

I need to calculate the sum $A_1(k) + A_2(k) + \dots+ A_n(k)$ .