Suppose we are given, a(0)=x ; a(1)=y and the relation, a[i]=a[i1]+a[i2] and , we are asked to calculate a(n) , how to calculate it if n is as big as 10^9 ? Thanks ! :) asked 18 Jan, 09:18

I have found a formula on GeeksForGeeks site but since it involves floating operation it may produce some wrong results::
Edit: This method will work fine till n < 80, after that it produces wrong results. I don't think any formula exists for n as large as 1e9; answered 18 Jan, 10:05

Please refrain from answering the second part of question ( solving f(n)=f(n1)+f(n2)+3*n ) as it is from an ongoing contest on hackerearth.. answered 19 Jan, 08:43
Question link, please. In case if this is found true 
(19 Jan, 09:36)
@aryanc403 here : https://www.hackerearth.com/challenge/college/codathon19nitbhopal/algorithm/day31/
(19 Jan, 11:17)

@aryanc403 , at that time , I was a newbie so I bymistakely asked the question, but deleted it in just few minutes, I didn't even got the answer to my query so don't worry . About this question , it was just to get some general knowledge about fibonacci numbers and their computation , I really have no idea with which ongoing contest does this question match (the most basic query) but I will figure it out myself, don't bother yourselves :) I saw that recurrence relation on Quora : So to satisfy my curiosity, I asked it here. Sorry for such a big mistake. answered 19 Jan, 11:01

Use matrix exponential to calculate original nth fibonacci number. $ \begin{pmatrix} f(n + 1) & f(n) \\ f(n) & f(n  1) \end{pmatrix}^n \\ \\ \begin{pmatrix} 1 & 1 \\ 1 & 0 \end{pmatrix}^n$ Then multiply the submatrix $\begin{pmatrix} f(n) & f(n1) \end{pmatrix} \times \begin{pmatrix} y\\ x \end{pmatrix}$ The answer obtained is your $n$ modified fibonnaci number with $f(0) = x$ and $f(1) = y$ Above is the code implementation in java. answered 28 Feb, 22:07

Please do some research before asking questions :/
https://www.geeksforgeeks.org/programfornthfibonaccinumber/
Use Matrix Exponentiation to calculate it in log(N) time,it will be helpful. :)
I finally got the answer by myself .LOL.