# $\sum_{k=1}^{\infty }\left\lfloor\frac{5}{5^k}\right\rfloor$ giving wrong answer?

Bug introduced in 7.0 or earlier and fixed in 11.0.1

When I try to evaluate the following:

$$\sum_{k=1}^{\infty }\Bigg\lfloor\frac{5}{5^k}\Bigg\rfloor$$

using

Sum[Floor[5/5^k], {k, 1, ∞}]

Mathematica provides an answer of $0$ when it clearly should be $1$. Using any finite limit for the summation, however, provides the correct answer. Why does this happen?

• What is the code you are using to get your result? Dec 24, 2015 at 3:27
• Interesting: stackoverflow.com/questions/8690884/… Dec 24, 2015 at 6:12
• Fascinating. Sum[Floor[5/5^k], {k, 0, \[Infinity]}] gives the expected 6, while Sum[Floor[5/5^k], {k, a, Infinity}] gives 0 for all larger a I've tested. Dec 24, 2015 at 12:51
• The reason why a finite limit gives a good result is that in that case Mathematica computes the result directly: calculate each term, sum them up. Using a symbolic limit also results in 0. I don't have any insight into why it misses the k == 1 case when doing it symbolically. Tagging as bug. Dec 24, 2015 at 13:16
• @Szabolcs, i.e. such finit limit Sum[Floor[5/5^k], {k, 1, 10^20}] gives 0. But Sum[Floor[5/5^k], {k, 0.99999999, Infinity}] gives 1. Definitely bug Dec 24, 2015 at 13:34