what is the rule of the function table if the input is 1,8,5,10 and the output is 4,6,1,5

x y

1 4
5 1
8 6
10 5

not linear, since y changes direction
not quadratic, since y changes direction twice.
So, guessing cubic, I find

-109/1260 x^3 + 1961/1260 x^2 - 2333x + 3130

I doubt that is what you had in mind, but anything else would be even more complicated.