Need help on remainder factor theorem question. Source--(https://brilliant.org/wiki/remainder-factor-theorem/)
Question--In an attempt to discover a formula for the Fibonacci numbers, Alex finds a cubic polynomial $h(x)$ such that $h(1)=1$, $h(2)=1$, $h(3)=2$ and $h(4)=3$. What is the value of $h(5)$?
answer by brilliant.org--
Consider the cubic polynomial $j(x)=h(x)−x+1$. Then $j(1) = 1$, $j(2) = 0, j(3) = 0$ and $j(4)=0$. By the remainder factor theorem, we have
$j(x)=A(x) (x-2)(x-3)(x-4),$
where A(x) is a polynomial. Since j(x) is a cubic, it follows that A(x) has degree 0 and thus is a constant which we denote by A. Substituting x=1, we obtain
$1 = j(1) = A(1-2)(1-3)(1-4)$ implies $A = -1/6$
Thus, $h(x) = j(x)+x-1 = -1/6 (x-2)(x-3)(x-4)+x-1$. Hence,
$h(5)=−1/6(5−2)(5−3)(5−4)+5−1=3$
Note: The closed form of the Fibonacci sequence is an exponential function. This cannot be approximated using a polynomial function for large values of n.
my doubt- how $j(x)=h(x)-x+1$  and what is $-x+1$ here? Please explain this in details . I am new in this topic . Thats why I need help.
 A: The purpose of choosing $j(x)=h(x)-x+1$ is so that for the values of $j(2,3,4)$ will result in equaling zero so that it is possible to factorise $j(x)$.
To recontextualise this question to see what I mean, say we change the question so that the cubic $h(x)$ instead gives $h(2)=-5, h(3)=-7, h(4)=-9$. Since you want $j(2,3,4)=0$ this time you would consider $j(x)=h(x)+2x+1$. Then you would follow the same steps as the brilliant.org answer.
A: Forget $h(x)$.... just forget it.  (for now).
Suppose we ask an entirely different question:
How do we find a cubic polynomial $j(x)$ so $j(1) = 1$ but $2,3,4$ are the three roots of $j(x)$?
Well as $x = 2, 3,4$ are the three roots of $j(x)$ we can use the remainder theorem to find that $j(x) = A(x) (x-2)(x-3)(x-4)$ but as we want $j(x)$ to be a cubic we have $A(x)$ is just a constant we can call $A$.  And as $j(1) = A(1-2)(1-3)(1-4) = 1$ we find $A = -\frac 16$ and $j(x) = -\frac 16(x-2)(x-3)(x-4)$.
That gives use a cubic polynomial $j(x)$ where $j(1) =1; j(2)=0;j(3)=0; j(4) = 0$.
But we didn't want that!
We wanted a cubic polynomial $h(x)$ where $h(x)=1; h(2)=1;h(3)=2; h(4)=3$.
How do we find that?
Well notice that $D(x) = h(x) - j(x)$ is a polynomial so that
$D(1) = h(1) - j(1) =1-1 = 0; D(2)=h(2)-j(2)=1-0=1;D(3)=h(3) - j(3)= 2-0=2$ and $D(4) = h(4)-j(4) = 3-0 =3$.
So what polynomial has
$\begin{cases}D(1)= 0\\D(2)=1\\D(3)=2\\D(4)=3\end{cases}$
?
It's easy to see that is just a linear progression and is the polynomial $D(x) = x-1$.
So $h(x) - j(x) = D(x) = x-1$ so
$j(x) = h(x) -x+1$.  And $h(x) = j(x)+x -1$.
And we had $j(x) = -\frac 16(x-2)(x-3)(x-4)$ and we have $h(x) = j(x) + x -1$ so
$h(x) = -\frac 16(x-2)(x-3)(x-4) + x-1$.
And that's that.  That is the cubic polynomial where $h(1)=1; h(2)=1; h(3)=2; h(4)=4$.
And $h(5)=-\frac 16(5-2)(5-3)(5-4) + 5-1 = -\frac 16\cdot 3\cdot 2\cdot 1 + 4=-1 + 4 =3$
=====
In general if we want to find a polynomial where $h(w_1)=c_1; h(w_2)=c_2; ..... h(w_k)=c_k$ a strategy is to use the remainder theorem to find a polynomial $j_1(x)$ where $j_1(w_1) = c_1$ but $j_1(w_i) = 0$ for all other $w_i$.
The we can reduce the question to finding a polynomial $D_1(x) = h(x) - j_1(x)$ where $D_1(w_1) = 0$ and $D_1(w_i) = c_i$ for all the other $w_i$.  That might not seem any easier, but notice we did reduce the number of non-zero values by $1$ and if we reiterate we will eventually find a $D_k(x)$ where $D_k(w_{1...,k-1}) = 0$ and $D_k(w_k) = c_k$ and we can find that with the remainder theorem and the putting it all together we will have found $h(x)$.
