# Find an equation to transform $\{1, 2, 3, 4, 5,6, 7, 8\}$ to $\{8,7,6,5,4,3,2,1\}$

Is there a way to transform $\{1, 2, 3, 4, 5,6, 7, 8\}$ to $\{8,7,6,5,4,3,2,1\}$ by applying a single function? That is, transform $1$ to $8$, $2$ to $7$, $3$ to $6$ etc.

-
i find this but i dont know what is the n into the equation math.stackexchange.com/questions/100275/… –  Alexandre Jul 17 '12 at 17:24
Guy wants an interpolating polynomial like $9-x$, I guess. –  Guess who it is. Jul 18 '12 at 12:07
If you want to learn a general method to find any function of this sort have a look at this article: en.wikipedia.org/wiki/Lagrange_polynomial –  Shahab Jul 18 '12 at 13:00

$f(x) = 9 - x$
$f(1) = 9 - 1= 8$
$f(3) = 9 - 3 = 6$