Write an algebraic equation for the following. The product of three and a squared number is twice the sum of the number and four.