If the coefficients of x in the 4th and 7th terms of the expansion (1+x)n are in the ratio 4:7, then find n