# $\lfloor\frac12+\frac1{2^2}+\frac1{2^3}+\cdots\rfloor\;$ vs $\;\lim_{n\to\infty}\lfloor\frac12+\frac1{2^2}+\cdots+\frac1{2^n}\rfloor$

Is there any difference between answers of $$[1]$$ and $$[2]$$? $$\Bigg\lfloor\frac12+\frac1{2^2}+\frac1{2^3}+\cdots\Bigg\rfloor \tag*{\space.....[1]}$$ $$\lim _{n \rightarrow \infty} \Bigg\lfloor\frac{1}{2}+\frac{1}{2^{2}}+\frac{1}{2^{3}}+\cdots+\frac{1}{2^{n}}\Bigg\rfloor \tag*{ \space.....[2] }$$

If yes then please do explain that why I can’t write $$[2]$$ as $$[1]$$ even if $$n$$ tends to $$\infty$$ in $$[2]$$

(Notice the use of the 'floor' function indicated by the type of brackets.)

NOTE- PLEASE don’t unnecessarily edit $$[1]$$ and $$[2]$$. It is exactly as it should be.

• The first one is $1$ and the second one is $0$. Jul 16, 2020 at 14:57
• @WesleyStrik notice those are floor signs, not square brackets Jul 16, 2020 at 15:00
• In any case... $\lim\limits_{n\to \infty}f(a_n) \neq f(\lim\limits_{n\to\infty}a_n)$ in general. This is just one such example showcasing this. There are certain situations where pushing the limit inside the function is valid, but this is not one of those situations. Jul 16, 2020 at 15:03
• I can't say I care for the "$\infty$" at the end of your [1]. Jul 16, 2020 at 15:04
• A good answer would explain how this is down to the fact that you can't always exchange 'limit' and 'apply function', as 'floor' is not continuous. Jul 16, 2020 at 15:05

The difference the difference between $$\lim\limits_{n\to \infty} f(g(n))$$ and $$f(\lim\limits_{n\to \infty}g(n))$$.

In $$\lim _{n \rightarrow \infty} \Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\cdots+\frac{1}{(2)^{n}}\Bigg\rfloor \tag*{ \space.....[2] }$$ you take a sum, floor it, then take the limits of the floors.

In $$\Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\infty\Bigg\rfloor \tag*{ \space.....[1] }$$ which can is defined as, and can be written as, $$\Bigg\lfloor\lim\limits_{n\to \infty}(\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\frac{1}{(2)^{n}})\Bigg\rfloor \tag*{ \space.....[1] }$$ you take a sum, find its limit and then floor it in the end.

Different things.

.......

$$\lim _{n \rightarrow \infty} \Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\cdots+\frac{1}{(2)^{n}}\Bigg\rfloor \tag*{ \space.....[2] }=0$$

Why? Because $$0< \frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\cdots+\frac{1}{(2)^{n}} < 1$$ for all $$n$$. So $$\Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\cdots+\frac{1}{(2)^{n}}\Bigg\rfloor \tag*{ \space.....[2] }=0$$ for all $$n$$. So $$\lim _{n \rightarrow \infty} \Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\cdots+\frac{1}{(2)^{n}}\Bigg\rfloor \tag*{ \space.....[2] }=\lim_{n\to \infty} 0 = 0$$.

But $$\Bigg\lfloor\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\infty\Bigg\rfloor \tag*{ \space.....[1] }=\Bigg\lfloor\lim\limits_{n\to \infty}(\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\frac{1}{(2)^{n}})\Bigg\rfloor \tag*{ \space.....[1] }=1$$

Why?

Because $$\lim\limits_{n\to \infty}\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\frac{1}{(2)^{n}}= \lim\limits_{n\to \infty} 1- \frac 1{2^{n}} = 1$$. So $$\Bigg\lfloor\lim\limits_{n\to \infty}(\frac{1}{2}+\frac{1}{(2)^{2}}+\frac{1}{(2)^{3}}+\frac{1}{(2)^{4}}+...\frac{1}{(2)^{n}})\Bigg\rfloor \tag*{ \space.....[1] }= \Bigg\lfloor 1 \Bigg\rfloor = 1$$

The problem here is that we cannot simply exchange the limit and the function because the floor function is not continuous over $$\mathbb R$$.

Indeed we know that continuous functions map convergent sequences to convergent sequences. Therefore in that case we have: $$\lim\limits_{n\to \infty}f(a_n) = f(\lim\limits_{n\to\infty}a_n)$$ As @Jmoravitz remarked this does not have to hold for functions that fail to be continuous, e.g. in our case $$f: \mathbb R \to \mathbb N$$, defined by $$f(x)=\lfloor x \rfloor$$. Indeed by direct computation we recognise the geometric series: $$\left\lfloor\lim_{n \to \infty } \sum_{i=1}^n \frac{1}{2^i}\right\rfloor= \left\lfloor\sum_{i=1}^\infty \frac{1}{2^i} \right\rfloor= \left\lfloor\frac{1}{1-0.5}-1 \right\rfloor=1.$$ However, if we first floor the finite sum, we see that $$0<\sum_{i=1}^n \frac{1}{2^i}< 1$$ for all $$n \in \mathbb N$$. This is why we find: $$\lim_{n \to \infty } \left\lfloor \sum_{i=1}^n \frac{1}{2^i} \right\rfloor= \lim_{n \to \infty } 0=0.$$ We see that we cannot simply exchange the limit and "applying the function".

• I am seeing two versions of the same answer from you. Jul 16, 2020 at 16:31
• @StubbornAtom: That happened to me too recently. I don't think it was deliberate on Wesley's part $-$ more likely it's a glitch in the site software, saving an attempted edit as a new answer for some reason. Jul 17, 2020 at 15:21
• @TonyK I didn't say it was deliberate; I have seen it happen before. I informed him so that he deletes the duplicated post. Jul 17, 2020 at 15:27
• Odd. I deleted the duplicate answer.
– user459879
Jul 17, 2020 at 17:51