# Greatest integer function in infinite sum of geometric series

I am not sure how to approach this infinite sum. I can see that it's a geometric series and that has a straightforward solution, but I am not sure how to address the alternating signs with the greatest integer function. Any ideas?

$\sum_{n=0} ^\infty (-1)^{\lfloor n/m \rfloor}r^n$, such that $0<r<1$ and $m \in N$.

We have $0<r<1$, so a general geometric series $\sum_{n=0} ^\infty ar^n$ will converge to $\frac{a}{1-r}$, but our $a$ here is $(-1)^{\lfloor n/m \rfloor}$.

• Just to get it out of the way. $m=1$ is trivial and is the regular geometric series. – Zach466920 Jun 23 '15 at 21:35
• I think you will be very close to the answer if you look at the case $m=3$ (or $4$) and write down the first dozen terms. – André Nicolas Jun 23 '15 at 21:40
• I see the pattern, but I'm not sure how to express it in a closed form. The pattern is that, whatever you choose to be $m$, the first m-many partial sums will be positive, then the second m-many partial sums will be negative, then so on, switching back and forth between positive and negative for every m-many partial sums. – kathystehl Jun 23 '15 at 22:04

Let us do a concrete calculation, say with $m=4$. Our sum is equal to $$1+r+r^2+r^3-r^4-r^5-r^6-r^7+r^8+r^9+r^{10}+r^{11}-r^{12}-r^{13}-r^{14}-r^{15}+\cdots,$$ which can be rearranged as $$(1+r+r^2+r^3)-r^4(1+r+r^2+r^3)+r^8(1+r+r^2+r^3)-r^{12}(1+r+r^2+r^3)+\cdots.$$ This is an infinite geometric series, first term "$a$" equal to $1+r+r^2+r^3$ and common ratio $-r^4$. By the standard formula, the sum is equal to $$\frac{1+r+r^2+r^3}{1+r^4}.$$ Exactly the same reasoning shows that in the general case, the sum is equal to $$\frac{1+r+r^2+\cdots+r^{m-1}}{1+r^m}.\tag{1}$$ We can simplify a bit to get a closed form. Note that $$1+r+r^2+\cdots+r^{m-1}=\frac{1-r^m}{1-r}=\frac{2-(1+r^m)}{1-r}.$$ Divide by $1+r^m$. We find that (1) can be rewritten as $$\frac{2}{(1-r)(1+r^m)}-\frac{1}{1-r}.$$