10

What is the largest possible numerator when put in reduced form over all sums of the form $$\sum_{k=1}^n\frac{c(k)}{k}$$ where $c(k)\in\{-1, 0, 1\}$? An easy bound is to consider what happens when we don't reduce the fraction. Then we have that if $L$ is the $\text{lcm}$ over all $k$ such that $c(k)\neq 0$, then $$\Big|\text{num}\left(\sum_{k=1}^n\frac{c(k)}{k}\right)\Big|\le \Big|L\sum_{k=1}^n\frac{c(k)}{k}\Big|\le L\sum_{k=1}^{n}\frac{|c(k)|}{k}\le H_n\text{lcm}(1,\dots,n)$$ where $H_n$ is the $n$-th harmonic number. For some $n$, this bound is the best achievable, which can be seen when the denominator of $H_n$ truly is $\text{lcm}(1,\dots, n)$. Can any improvements be made or can this be shown to be the best bound for certain subsets of numbers? Another useful result would be the asymptotics of this, even if for only certain subsets.
This problem came from considering this problem involving egyptian fractions.

Will Fisher
  • 5,162
  • FWIW I wrote a program and found the first 25 values of this sequence 1, 3, 11, 25, 137, 137, 1019, 2143, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 2436559, 42142223, 42142223, 812954477, 812954477, 824039837, 834621317, 19429082851, 19652175721, 100670281601. See here https://github.com/FastAsChuff/Egyptian-Fraction-Series-Max-Numerator/blob/main/largestnumerator.txt – Simon Goater Oct 12 '24 at 18:27

1 Answers1

2

EDIT October 2024: my answer from 5 years ago was not very well written, so I have finally decided to rewrite the entire proof. Even though the actual result is still the exact same, the exposition should be a lot clearer now.

In what follows, $L_n$ is defined as the least common multiple of $1, 2, \ldots, n$, and $p$ and $q$ will always denote distinct primes, both smaller than or equal to $n$.

Theorem. It is possible to choose $c(i) \in \{0,1\}$ (for $1 \le i \le n$) such that the numerator of $\displaystyle \sum_{i=1}^n \frac{c(i)}{i}$ is larger than $L_n \left(H_n - \frac{1+o(1))}{\log^2(n)}\right)$.

Proof. The idea is that we initially choose $c(i) = 1$ for all $i \le n$, but change some of them if it turns out that the sum $X_n := L_n \displaystyle \sum_{i=1}^n \frac{c(i)}{i}$ is divisible by primes $p \le n$. The goal is to make sure that $X_n$ does not have any prime divisors $p \le n$, so that $\gcd(X_n, L_n) = 1$ and $X_n$ is actually the numerator of the sum.

For a prime $p \le n$, define $k_p$ as the largest positive integer with $p^{k_p} \le n$, define $l_p$ as the largest positive integer with $l_pp^{k_p} \le n$ and let $n_p$ be equal to $l_pp^{k_p}$.

Lemma 1. For all primes $p \le n$ we have $l_p < p$.

Proof. If $l_p \ge p$, then $p^{k_p + 1} \le l_pp^{k_p} \le n$, contradicting the definition of $k_p$.

Lemma 2. The quantity $n_p$ is not divisible by $q^{k_q}$ for any prime $q \le n$ different from $p$.

Proof. Assume by contradiction that $n_p = l_pp^{k_p} = lq^{k_q}$ for some $l$. Note that $l \le l_q$, as we would otherwise get $n \ge n_p = lq^{k_q} \ge (l_q + 1)q^{k_q}$, contradicting the definition of $l_q$. Moreover, by unique factorization and the equality $l_pp^{k_p} = lq^{k_q}$, we get that $p^{k_p}$ divides $l$ and $q^{k_q}$ divides $l_p$. But we then get the string of inequalities $l_p < p^{k_p} \le l \le l_q < q^{k_q} \le l_p$; contradiction.

Lemma 3. Fix a prime $p \le n$. Let $c_0(i)$ and $c_1(i)$ be any two sequences with $c_0(i) = c_1(i) \in \{0, 1\}$ for all $i \neq n_p$, but $c_0(n_p) = 0$ and $c_1(n_p) = 1$. For $j = 0, 1$, define $X_{n,j} = L_n \displaystyle \sum_{i=1}^n \frac{c_j(i)}{i}$. Then $X_{n,0} \not \equiv X_{n,1} \pmod{p}$, but $X_{n,0} \equiv X_{n,1} \pmod{q}$ for all primes $q \le n$ different from $p$.

Proof. Since $L_n$ is divisible by $p^{k_p}$, we note that $\frac{L_n c_j(i)}{i} \equiv 0 \pmod{p}$ unless $p^{k_p}$ divides $i$. We therefore get:

\begin{align*} X_{n,0} &= L_n \sum_{i=1}^n \frac{c_0(i)}{i} &\\ &= \sum_{i=1}^n \frac{L_n c_0(i)}{i} & \\ &\equiv \sum_{i=1}^{l_p} \frac{L_nc_0(ip^{k_p})}{ip^{k_p}} &\pmod{p} \\ &\not \equiv \frac{L_n}{l_pp^{k_p}} + \sum_{i=1}^{l_p} \frac{L_nc_0(ip^{k_p})}{ip^{k_p}} &\pmod{p} \\ &\equiv \sum_{i=1}^{l_p} \frac{L_nc_1(ip^{k_p})}{ip^{k_p}} &\pmod{p} \\ &\equiv X_{n,1}&\pmod{p} \end{align*}

On the other hand, when we look at the analogous sum modulo $q$, then we note that $c_0(iq^{k_q}) = c_1(iq^{k_q})$ holds for all $i$ with $1 \le i \le l_q$, as $c_0$ and $c_1$ only differ at the point $n_p$ and $n_p$ is not divisible by $q^{k_q}$ by Lemma $2$.

Remark. From Lemma $3$ it follows that at least one of $X_{n,0}$ and $X_{n,1}$ is not divisible by $p$. So by possibly changing $c(n_p) = 1$ to $c(n_p) = 0$ for all primes $p \le n$, we can already guarantee $\gcd(X_n, L_n) = 1$. As we will see in the next lemma however, this is not even necessary for the majority of primes $p$.

Lemma 4. If $p > \dfrac{(1 + o(1))n}{\log(n)}$ and $c(n_p) = 1$, then $L_n \displaystyle \sum_{i=1}^n \frac{c(i)}{i}$ is not divisible by $p$.

Proof. We have $L_n \displaystyle \sum_{i=1}^n \frac{c(i)}{i} \equiv L_n \sum_{i=1}^{l_p} \frac{c(ip)}{ip} \equiv \frac{L_n}{p} \sum_{i=1}^{l_p} \frac{c(ip)}{i} \pmod{p}$ for some $l_p < (1 + o(1))\log(n)$. Now, the sum $\displaystyle \sum_{i=1}^{l_p} \frac{c(ip)}{i}$ is only divisible by $p$ if its numerator is divisible by $p$. But this numerator is at most $L_{l_p}H_{l_p} < e^{(1 + o(1))l_p} < p$ (where the second to last inequality uses the prime number theorem), and in particular not divisible by $p$.

We can therefore freely choose $c(n_p) = 1$ for all $p > \frac{(1 + o(1))n}{\log(n)}$ and we only have to possibly change $c(n_p) = 1$ to $c(n_p) = 0$ for those primes $p < \frac{(1 + o(1))n}{\log(n)}$. Lucikly, as the next lemma will tell us, those $n_p$ are all rather large, so they do not influence the final value too much.

Lemma 5. For all primes $p \le n$ we have $n_p > \frac{n}{2}$. Moreover, if $p > \sqrt{n}$, then $n_p > n - p$.

Proof. If $n_p \le \frac{n}{2}$, then $2n_p = 2l_pp^{k_p} \le n$ is still divisible by $p^{k_p}$, which contradicts the definition of $l_p$. And if $n_p \le n - p$ for $p > \sqrt{n}$, then $(l_p + 1)p = n_p + p \le n$ also contradicts the definition of $l_p$.

Now we can finally finish the proof of our Theorem. We initially choose $c(i) = 1$ for all $i$, but change $c(n_p)$ to $0$ for those primes $p < \frac{(1 + o(1))n}{\log(n)}$ for which $X_n$ would otherwise be divisible by $p$. As we saw in Lemma $3$, changing $c(n_p)$ does not alter the residue class $X_n \pmod{q}$ for any prime $q \neq p$. Changing $c(n_p)$ from $1$ to $0$ decreases $\frac{X_n}{L_n}$ by $\frac{1}{n_p}$. This is, by Lemma $5$, less than $\frac{2}{n}$ for all primes $p \le \sqrt{n}$ and less than $\frac{1}{n - \frac{(1 + o(1))n}{\log(n)}} = \frac{1}{(1 + o(1))n}$ for all primes $p$ with $\sqrt{n} < p < \frac{(1 + o(1))n}{\log(n)}$. The total therefore decreases by at most $\frac{2\pi(\sqrt{n})}{n} + \frac{\pi\left(\frac{(1 + o(1))n}{\log(n)}\right)}{(1 + o(1))n} = \frac{1 + o(1)}{\log^2(n)}$, finishing the proof.

If one is more interested in explicit bounds, one can without too much trouble use explicit estimates on prime counting functions to prove, for example, $X_n > L_n \left(H_n - \frac{4}{\log^2(n)} \right)$ for all $n \ge 2$.

In the other direction, looking at $X_n \pmod{3}$, for $n = 3^{k+1}-1$ one needs $c(3^{k})$ or $c(2\cdot3^{k})$ to be $0$ (or $-1$), or else have $X_n \le \frac{1}{3}L_nH_n$. So $X_n \le L_n \left(H_n - \frac{3}{2(n+1)} \right)$ infinitely often. With a bit of work one can show a very modest improvement to $X_n < L_n \left(H_n - \frac{2}{n}\right)$ infinitely often, by finding infinitely many $n$ such that there exist $k_1, k_2 \in \mathbb{N}$, for which simultaneously $2\cdot3^{k_1} \le n < 3^{k_1+1}$ and $4\cdot5^{k_2} \le n < 5^{k_2+1}$. No doubt for every $c > 0$ there are infinitely many $n$ such that $X_n < L_n \left(H_n - \frac{c}{n}\right)$ holds (which can be shown if one is willing to assume, for example, Schanuel's conjecture), but I don't know how to prove it unconditionally.

Woett
  • 1,067
  • I think there might be some problems in the logic of adjusting some $c(k)$'s to zero, as changing one value to zero influences which new primes divide it. I'd have to think more, but one objection is that given two primes $p_1$ and $p_2$, say $p_1\mid X_n$ and $p_2\nmid X_n$. Thus we set $c(l_1p_1)=0$, but then say doing this causes $p_2\mid X_n$ so we go to set $c(l_2p_2)=0$. What happens if $l_1p_1=l_2p_2$ and thus we already have $c(l_2p_2)=0$ meaning we must adjust a lower value? – Will Fisher Aug 20 '19 at 18:24
  • My instinctual objection is that we can't just go through each prime and adjust each $c(k)$ to zero, because each adjustment changes what new primes now divide it, so there's no guarantee of termination that's simpler than the original problem. – Will Fisher Aug 20 '19 at 18:28
  • Great question! I should have addressed this. Note that we only ever possibly change $c(k)$ to $0$ if $k = lp^m$ with $1 < l < p$ and such that $p^{m+1} > n$. I claim that changing this $c(k)$ does not change the value of $X_n \pmod{q}$ for any other prime $q \le n$. Analogous to what saw before, looking at $X_n = \sum_{k=1}^n \frac{L_nc(k)}{k} \pmod{q}$, the only terms in the sum which are non-zero mod $q$ are where $k$ can be written as $l'q^{m'}$ with $1 \le l' < q$ and where $q^{m'}$ is such that $q^m \le n < q^{m+1}$. (cont) – Woett Aug 20 '19 at 18:39
  • But $k$ can never both be equal to $lp^m$ and $l'q^{m'}$ as otherwise $q^{m'} | l$ and $p^m | l'$ by unique factorization and we would get the contradictory string of inequalities $l \ge q^{m'} > l' \ge p^m > l$. So for every prime $p$ we change at most one value $c(k)$ to $0$, and this change does not affect $X_n \pmod{q}$ for any prime $q \le n$ different from $p$. – Woett Aug 20 '19 at 18:42
  • Also if $k=lp^m$ don't we only have $k>n-\left(\frac{(1+o(1))n}{\log(n)}\right)^m$? – Will Fisher Aug 21 '19 at 02:35
  • Yes, but I use the assumption that $p > \sqrt{n}$, in which case $m = 1$. – Woett Aug 21 '19 at 08:01