A sieve-collision identity: the number of products i*j with i ≤ k, j ≤ k! equals the sum of largest divisors at most k
Math.SE 886041 (IIS-L-23042; OEIS A126959, A101459): let beta(n,k) be the largest divisor of n that is at most k, S(k) = sumn ≤ k! beta(n,k), and T(k) the number of distinct products i*j with i ≤ k, j ≤ k!. The question asks whether S(k) = T(k). Yes, for every k, and with k! replaced by any multiple L of lcm(1..k). Proof: m is such a product exactly when m ≤ L*beta(m,k); beta is periodic with period L; writing m = qL + n with 1 ≤ n ≤ L the condition becomes q ≤ beta(n,k) - 1, so each n contributes exactly beta(n,k) values of m. Checked directly for k ≤ 8. The proof is elementary and may have been noticed before, but the question had no answer.
Take all numbers that can be written as i times j with i at most k and j at most k factorial, and count how many different numbers appear. A 2014 question guessed a formula for this count: add up, for each n up to k factorial, the largest divisor of n that is at most k. The guess is right, and the reason fits in three lines.
- check.py sha256 a9833a6aaab8…
Lean marks come from matching the Lean names the paper gives for each result against the receipt. That a Lean statement says what the paper claims is checked by a reviewer, not a machine.
An identity for collisions in the Sieve of Eratosthenes
Result. \(S(k)=T(k)\) for every \(k\), also with \(k!\) replaced by any multiple of \(\operatorname{lcm}(1,\dots,k)\). Elementary written proof with a direct check; not machine-checked in Lean.
An answer to Math.SE question 886041
(Fred Daniel Kline, 2014, score 23, no answers).
For positive integers \(n,k\) let \(\beta(n,k)\) be the largest divisor of \(n\) that is at most
\(k\). Put
$$S(k)=\sum_{n=1}^{k!}\beta(n,k),\qquad T(k)=\#\{\,i\cdot j:\ 1\le i\le k,\ 1\le j\le k!\,\}.$$
Question. Is \(S(k)=T(k)\)? The values are OEIS A126959:
\(1, 3, 12, 58, 352, 2376, 19296,\dots\) The asker also asks about the variant with \(k!\)
replaced by \(\operatorname{lcm}(1,\dots,k)\), which gives A101459.
Answer: yes, for every \(k\), and the same holds with \(k!\) replaced by any positive
multiple \(L\) of \(\operatorname{lcm}(1,\dots,k)\):
$$\sum_{n=1}^{L}\beta(n,k)=\#\{\,i\cdot j:\ 1\le i\le k,\ 1\le j\le L\,\}.$$
Proof
Fix \(k\) and \(L\), a multiple of \(\operatorname{lcm}(1,\dots,k)\), and write \(\beta(m)\) for
\(\beta(m,k)\).
Step 1. A positive integer \(m\) is a product \(i\cdot j\) with \(i\le k\), \(j\le L\) exactly
when \(m\le L\,\beta(m)\). Indeed, such a product needs a divisor \(i\le k\) of \(m\) with
\(m/i\le L\); if any divisor works then the largest one, \(\beta(m)\), works.
Step 2. \(\beta(m+L)=\beta(m)\), because every \(d\le k\) divides \(L\), so \(d\) divides \(m+L\)
exactly when it divides \(m\).
Step 3. Write \(m=qL+n\) with \(q\ge0\) and \(1\le n\le L\). Then \(\beta(m)=\beta(n)\), and
$$m\le L\beta(m)\iff q+\frac nL\le\beta(n)\iff q\le\beta(n)-1,$$
since \(q\) is an integer and \(0<n/L\le1\). So for each \(n\) there are exactly \(\beta(n)\)
admissible values of \(q\), namely \(0,1,\dots,\beta(n)-1\). Summing over \(n\),
$$T=\sum_{n=1}^{L}\beta(n). \qquad\blacksquare$$
Remarks
- The same count shows that the set of all products \(i\cdot j\) with \(i\le k\) has density
\(\frac1L\sum_{n\le L}\beta(n,k)\) in the positive integers when measured against \(j\), which
is the description of A126959 in the OEIS. - A comment on the question mentions that a computation "fails" at \(k=10\) and \(k=17\). The
identity as stated holds for all \(k\);check.pyconfirms it directly for \(k\le 8\)
in both versions.
Check it
python check.py
Status
The question has no answers. The proof is three lines and elementary, so it may well have
been noticed before, but we did not find it written down (thread, OEIS entries A126959 and
A101459). Not formalised.
Produced with an AI assistant: Claude (Anthropic).
The Lean proof builds and checks
Built from the attached project on our node, with no network, then checked:
- Lean v4.33.1 · Mathlib 0df444a
- 1/1 theorems found
- no sorry
- standard axioms only
- no native_decide
- built in 37 s
- 90 declarations
Take all numbers that can be written as i times j with i at most k and j at most k factorial, and count how many different numbers appear. A 2014 question guessed a formula for this count: add up, for each n up to k factorial, the largest divisor of n that is at most k. The guess is right, and the reason fits in three lines.
MO286057main1 line
MainStatementMO286057.MainStatementPropMO286057/Statement.lean:46
/-- **Main theorem (statement).** -/def MainStatement : Prop :=∀ (k N : ℕ), 1 ≤ k → Even N → k ≤ N →∀ M : SimpleGraph (Fin N), IsPerfectMatchingGraph M →∃ μ : Perm (Fin N) → ℚ,IsProbabilityWeight μ ∧ TupleUniform k μ ∧∀ π, μ π ≠ 0 → ComponentsBounded M π (4 * (k / 2) + 2)
Not checked by a machine: that these statements say what the paper claims. That part is a reviewer's.