10
$\begingroup$

Motivation: Let $k$ be a positive integer and $m=4k+1$. I want to find the necessary conditions for the following identity to hold: $$\displaystyle\sum_{i=1}^{k}\lfloor\sqrt{im}\rfloor=\frac{m^2-1}{12}$$

Since $\lfloor\sqrt{im}\rfloor\geqslant j$ is equivalent to $im>j^2-1$, where $j$ is a positive integer not exceeding $2k$, it can be shown that the left-hand side is equal to $$2k^2-\sum_{j=1}^{2k}\left\lfloor\frac{j^2}{m}\right\rfloor+\left\lfloor\frac{2k}{r}\right\rfloor$$ where $r$ is the least positive integer such that $m$ divides $r^2$.

(i) If all the prime factors $p_1,p_2,\dots$ of $m$ satisfy $p_1\equiv p_2\equiv\dots\equiv1\pmod{4}$, then $x^2\equiv-1\pmod{m}$ has a solution. Let $j'$ denotes the unique integer such that $j'\equiv xj\pmod{m}$ and $|j'|\leqslant 2k$ for each $j$. Then $$\left\lfloor\frac{j^2}{m}\right\rfloor + \left\lfloor\frac{j'^2}{m}\right\rfloor = \frac{j^2}{m} + \frac{j'^2}{m} + \epsilon_{j}$$ where $\epsilon_{j} = 0$ if $m$ divides $j^2$, and $\epsilon_{j} = -1$ if $m$ does not divide $j^2$. Since $m$ divides $j^2$ if and only if $r$ divides $j$, then it follows that $$\sum_{j=1}^{2k}\left\lfloor\frac{j^2}{m}\right\rfloor =\frac{1}{2}\sum_{j=1}^{2k}\left(\left\lfloor\frac{j^2}{m}\right\rfloor+\left\lfloor\frac{j'^2}{m}\right\rfloor\right) = \frac{1}{2}\sum_{j=1}^{2k}\left(\frac{j^2}{m}+\frac{j'^2}{m}-1\right) + \frac{1}{2}\sum_{j=1}^{2k}\left(1+\epsilon_{j}\right) =\frac{2k(k-1)}{3}+\frac{1}{2}\left\lfloor\frac{2k}{r}\right\rfloor$$ Thus the identity in the above question holds if and only if $\left\lfloor\frac{2k}{r}\right\rfloor=0$, which is equivalent to $m$ being squarefree.

(ii) If there exists a prime factor $p\equiv3\pmod{4}$ of $m$, I have no idea how to deal with it.

By using Python, I found that the identity holds for $m=245,605,637,1805,2989,6877$. For each of these $m$ and each prime factor $p$ of the form $4n+3$, there exists an integer $l$ such that $p^{2l}$ divides $m$ while $p^{2l+1}$ does not. This leads to the following question:

Question: Let $k$ be a positive integer such that $m=4k+1$ has a prime factor $p\equiv 3\pmod{4}$ with an odd exponent in the prime factorization of $m$. Equivalently, $m$ is not a sum of two square. Is it true that $$\displaystyle\sum_{i=1}^{k}\lfloor\sqrt{im}\rfloor \neq \frac{m^2-1}{12}?$$

Update Dec 31

(a) There are exactly $40$ positive integers $m$ within the range of $1\leqslant k\leqslant 10^6$ (verified via Python), each of which satisfies the identity and has at least one prime factor of the form $4n+3$. All of these $m$ can be expressed as a sum of two integer squares. Below are their prime factorizations.

$$245 = 5\times 7^2$$ $$605 = 5\times 11^2$$ $$637 = 13\times 7^2$$ $$1805 = 5\times 19^2$$ $$2989 = 61\times 7^2$$ $$6877 = 13\times 23^2$$ $$12005 = 5\times 7^4$$ $$13673 = 113\times 11^2$$ $$16577 = 137\times 11^2$$ $$31213 = 13\times 7^4$$ $$53429 = 101\times 23^2$$ $$73205 = 5\times 11^4$$ $$90569 = 41\times 47^2$$ $$106097 = 17\times 79^2$$ $$112993 = 313\times 19^2$$ $$130181 = 29\times 67^2$$ $$146461 = 61\times 7^4$$ $$381517 = 397\times 31^2$$ $$399829 = 181\times 47^2$$ $$588245 = 5\times 7^6$$ $$602213 = 173\times 59^2$$ $$623113 = 337\times 43^2$$ $$651605 = 5\times 19^4$$ $$791437 = 157\times 71^2$$ $$859301 = 389\times 47^2$$ $$1018349 = 461\times 47^2$$ $$1124381 = 509\times 47^2$$ $$1529437 = 13\times 7^6$$ $$1654433 = 113\times 11^4$$ $$1828613 = 293\times 79^2$$ $$2005817 = 137\times 11^4$$ $$2015561 = 449\times 67^2$$ $$2220649 = 1201\times 43^2$$ $$2697889 = 601\times 67^2$$ $$2983217 = 857\times 59^2$$ $$3033397 = 157\times 139^2$$ $$3093161 = 449\times 83^2$$ $$3637933 = 13\times 23^4$$ $$3720925 = 13\times 5^2 \times 107^2$$ $$3887089 = 241\times 127^2$$

In this list, $3720925$ is the smallest integer that has more than 2 distinct prime factors. The other integers are of the form $pq^{2k}$, where $p\equiv1\pmod{4}$, $q\equiv3\pmod{4}$ are primes and $k$ is a positive integer.

It appears that if $pq^{2k}$ is in this list, then so is $pq^{2k+2}$.

(b) As David E Speyer noted, there is a similar question post in MO with several brilliant answers and comments: Conjecture $ \sum _{i=1}^{n-1}\lfloor \frac{i^2}{n}\rfloor \ge \frac{\left(n-1\right)\left(n-2\right)}3$ where $n\in\mathbb N^*$

Based on the answer of David E Speyer in that post and a theorem of Dirichlet, it can be proved that when $m$ is a squarefree number with a prime factor $p\equiv3\pmod{4}$, $$\sum_{i=1}^{k}\lfloor\sqrt{im}\rfloor = \frac{m^2-1}{12} - \frac{S(m)}{2} < \frac{m^2-1}{12}$$

where $S(m)$ is defined as in the answer from Henri Cohen.

$\endgroup$
6
  • 2
    $\begingroup$ Could you explain how to get from $\frac{1}{2}\sum_{j=1}^{2k}\left(\left\lfloor\frac{j^2}{m}\right\rfloor+\left\lfloor\frac{j'^2}{m}\right\rfloor\right)$ to $\frac{2k(k-1)}{3}+\frac{1}{2}\left\lfloor\frac{2k}{r}\right\rfloor $? $\endgroup$ Commented 2 days ago
  • 1
    $\begingroup$ Why is your set of test cases so small? Usually, we test all $k = 1...N$ and numbers $m=4k+1$ that meet the conditions, where $N = 20...10,000$ the higher the more confident we can be to proceed with the proof assuming no counter-example was found. $\endgroup$ Commented 2 days ago
  • 2
    $\begingroup$ @DanielWeber I've edited and supplemented some steps. It makes use of the identity $\left\lfloor\frac{j^2}{m}\right\rfloor + \left\lfloor\frac{j'^2}{m}\right\rfloor = \frac{j^2}{m}+\frac{j'^2}{m}+\epsilon$, where $\epsilon=0$ if $r$ divide $m$, and $\epsilon=-1$ in other case. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ @DanielWeber Sorry for my typo. '$r$ divides $m$' should be replaced with '$r$ divides $j$'. $\endgroup$ Commented yesterday
  • 3
    $\begingroup$ I answered a similar question at mathoverflow.net/questions/442497 . $\endgroup$ Commented yesterday

1 Answer 1

8
$\begingroup$

If $D<0$ congruent to $1$ mod 4, define $h'(D)=h(D)$, class number of the quadratic order of discriminant $D$ if $D\ne-3$, and $h'(-3)=1/3$. Define $$S(m)=\sum_{d\mid m,d\equiv3\pmod4}h'(-d)$$ Finally, write $m=m_0f^2$ with $m_0$ squarefree. Experimentally, the OP's sum is equal to $$\dfrac{m^2-1}{12}+\dfrac{f-1}{4}-\dfrac{S(m)}{2}$$ This is probably classical, I did not prove it, and should imply the OP's conjecture.

$\endgroup$
2
  • 1
    $\begingroup$ Thanks for your answer! Could you please explain why this result can imply the conclusion? I only know that $h(-d)>0$, which can resolve the case where $f=1$. For this case, according to the answer in the link provided by David E Speyer in comment, it can be proved that when $f=1$, the sum is equal to $\frac{m^2-1}{12}-\frac{S(m)}{2}$. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ You are right, it only implies your conjecture for $f=1$, I do not see how to generalize. $\endgroup$ Commented 22 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.