已知等差数列{an}中,a1=4,又a1,a7,a10成等比数列,若前n项和Sn=11,求n