If in the expansion of (a+b)n and (a+b)n+3, the ratio of the coefficients of second and third terms, and third and fourth terms respectively are equal, then n is