(1+x)^n(3-x)的展开式中各项系数之和为1024,则n等于