Write as a Function of n a_n=3n-2