Given any "n" values, there exist a unique polynomial of degree n-1 or less that gives those values. Here you are given 4 values so there exist a unique polynomial of degree 3 or less such, which we can write as \(\displaystyle z= ai^3+ bi^2+ ci+ d\). The four given values give four equations to solve for a, b, c, and d:
216a+ 36b+ 6c+ d= 7
343a+ 49b+ 7c+ d= 5
512a+ 64b+ 8c+ d= 3
729a+ 81b+ 9a+ d= 1
Of course, here that's overkill. Solving those equations we quickly find that a and b are 0.