The difference between f in our selected cell and the cell 2*n can be expressed using the following algebra:
new_f = 2(d + 1) + 1 - (old_e + 2n)
So we can now compute the difference algebraiclly
diff = 2(d + 1) + 1 - (e + 2n) - (2*d + 1 - e)
diff = 2d + 2 + 1 - e - 2n - 2d - 1 + e
diff = 2d + 2 - 2n - 2d
diff = 2 - 2n
Thus, when you're moving 2n right, regardless of e and d the f value changes by 2 - 2n.