Consider the following expression:

$$\sum_{k=0}^{\frac{N-1}{2}} \left\lceil\sqrt{k^2+N}\right\rceil - \sum_{k=0}^{\frac{N-1}{2}}\left\lfloor\sqrt{k^2+N}\right\rfloor - 1 = \frac{N-1}{2} - C$$

$C$ in this case is the amount of times a positive odd integer $N$ can be expressed as the product of two positive integers.

If the factorization of $N$ is known, and as a consequence $C$, we know for which $k$, $k^2 + N$ will be square numbers.

Assume we know the factorization of $N$ and we know $C$ for a given $N$, is it possible to find closed-forms for the two sums?

Take $7129$ for example. It is a prime number, so the sum will be equal to $$\frac{7129-1}{2} - 1 = 3563$$ I am interested in the contribution of both sums.


  • $\begingroup$ $C$ is not an integer if $N$ is even. $\endgroup$ Commented Aug 28, 2017 at 19:35
  • $\begingroup$ Yes, sorry, I updated the description, the expression is meant for positive odd integer $N$ $\endgroup$ Commented Aug 28, 2017 at 19:37
  • $\begingroup$ Fixed a few errors $\endgroup$ Commented Aug 28, 2017 at 20:06


You must log in to answer this question.

Browse other questions tagged .