求使1^2+3^2+5^2.+n^2小于6000成立的最大正奇数n
问题描述:
求使1^2+3^2+5^2.+n^2小于6000成立的最大正奇数n
答
Sn=∑(2k-1)^2,k=1,到(n+1)/2
=∑(4k^2-4k+1)
=4*(n+1)/2*(n+3)/2*(n+2)/6-4*(n+1)/2*(n+3)/2/2+(n+1)/2
=(n+1)(n+3)(n+2)/6-(n+1)(n+3)/2+(n+1)/2
=(n+1)/6*[ (n^2+5n+6)-3(n+3)+3]
=(n+1)/6*(n^2+2n)
=n(n+1)(n+2)/6
由Sn