Proximity to perfect squares

Calculus Level 1

A function f(n)f(n) is defined over positive integers as follows:

f(n)={0if n is a perfect square;1if n is closer to the perfect square before it than to the one after it;1otherwise.f(n) = \begin{cases} 0 & \text{if }n\text{ is a perfect square}; \\ 1 & \text{if }n\text{ is closer to the perfect square before it than to the one after it}; \\ -1 & \text{otherwise}. \end{cases}

For example, f(1)=0f(1) = 0 because 1 is a perfect square; f(2)=1f(2) = 1 because 2 is closer to 1 than it is to 4; f(7)=1f(7) = -1 because 7 is closer to 9 than it is to 4.

What can be said about the series n=1f(n)n?\displaystyle \sum_{n=1}^{\infty} \frac{f(n)}{n}?


Problem Loading...

Note Loading...

Set Loading...