Write a polynomial equation for a sequence