How we can find the first k elements of the matrix

I am unable to create the logic for finding the first k terms or F1 vector of the sequence.

hello @himanshu_goyal

pls study matrix exponentiation first.
there u will get how we can make matrix from a recurrence.

read this->exponentiation

i forgot to mention this->link

Actually in matrix exponentiation we take first k elements from the user. Now the point arise, if the value of k is large such as 11 then user has to calculate the number of ways for each case from k=1 to 11.

From the above quoted argument. I was thinking: what is the relevance of the question, as the user has to calculate the ways on his own for such a large value of k.

using this method we can find answer for very big value of N in just K^3 log(n) .

where in other methods the complexity is bit on higher side

So, you mean that i need to give the first k elements as the input for F1 vector even if the value of k is large

yeah initial matrix is required (k x k size) if u want to solve the problem using matrix exponentiation