I need to find a clear formula (without summation) for the following sum:
n∑k=1⌊√k⌋
Well, the first few elements look like this:
1,1,1,2,2,2,2,2,3,3,3,...
In general, we have (22−12) 1's, (32−22) 2's etc.
Still I have absolutely no idea how to generalize it for n first terms...
Answer
Hint
We have
p≤√k<p+1⟺p2≤k<(p+1)2⇒⌊√k⌋=p
so
n∑k=1⌊√k⌋=⌊√n+1⌋−1∑p=1(p+1)2−1∑k=p2⌊√k⌋=⌊√n+1⌋−1∑p=1p(2p+1)
Now use the fact
n∑k=1k=n(n+1)/2
and
n∑k=1k2=n(n+1)(2n+1)/6
to get the desired closed form.
No comments:
Post a Comment