$f$ is a sequence of numbers and $v$ is the sequence of the difference between the consecutive terms of $f$.
For example, if $f = 1, 3, 4, 7, 5$, then $v = 2, 1, 3, {-2}$.
$f$ is $0\mathrm{-indexed}$, i.e., $1$ is the $0\mathrm{th}$ element of $f$.
$v$ is $1\mathrm{-indexed}$, i.e., $2$ is the $1\mathrm{st}$ element of $v$. But the $0\mathrm{th}$ element of $v$ can be taken to be $0$ or any other arbitrary number.
Here is the original problem I am trying to solve:
Given $f_0 = 0$ and $v = 1, 2, 1, 0, 1, 2, 1, 0, \text{...}$ $v$ is periodic and has a period of $4$.
Find formulas for $f_i$ and use it to calculate $f_{12}$ and $f_{63}$.
Here is a formula I came up with ($v$ is $1\mathrm{-indexed}$ but $v_0$ can be assigned a value of desired):
$$v_0 = 0$$ $$v_1 = v_3 = 1$$ $$v_2 = 2$$ $$v_x = v_{\text{(x mod 4)}}$$
The formula for $v_x$ can be used in the formula of $f_x$:
$$f_0 = 0$$ $$f_1 = 1$$ $$f_2 = 3$$ $$f_3 = f_4 = 4$$ $$f_x = f_{x-1} + v_x$$
The last rule simply takes the previous $f$ and adds the current $v$ to it.
All this works fine but the trouble is doing the recursive calculation on hand for $f_x$ can quickly become overwhelming. Questions similar to these are expected to be on the exam where calculators won't be allowed.
Can a simpler, hand calculation friendly formula be found for $f_x?$
Yes, it can be found $$f_{x+4}=f_x+v_{x+1}+v_{x+2}+v_{x+3}+v_{x+4} $$ Now, $v_{x+1}+v_{x+2}+v_{x+3}+v_{x+4} = v_0+v_1+v_2+v_3 = 4$, so that $f_{x+4}=f_x+4$.
For example: $$f_{4k}=f_{4(k-1)}+4=...=f_{4(k-m)}+4m = ... = f_0+4k=4k $$ Similar can be told about $f_{4k+1}$, $f_{4k+2}$, $f_{4k+3}$. We are arrive at a form that's easy for calculations.