Suppose f is a degree n polynomial where f(a1) = b1, f(a2) = b2,
· · · f(an+1) = bn+1 where a1, a2, · · · an+1 are n + 1 distinct
values. We will define a new polynomial g(x) = b1(x − a2)(x − a3)·
· ·(x − an+1) / (a1 − a2)(a1 − a3)· · ·(a1 − an+1) + b2(x − a1)(x −
a3)(x − a4)· · ·(x − an+1) / (a2 − a1)(a2 − a3)(a2 − a4)·...