The poset
Take a positive integer $n$ and a prime $p$ dividing it. Declare $n - n/p$ to be covered by $n$, and let $K$ be the partial order generated by all such relations. So $12$ covers $12 - 12/3 = 8$ and $12 - 12/2 = 6$, and the first ranks are
$$\{1\},\quad \{2\},\quad \{3,4\},\quad \{5,6,8\},\quad \{7,9,10,12,16\}.$$The poset is graded. The rank $\rho(n)$ is the number of steps from $1$. It is completely additive, and $\rho(p) = 1 + \rho(p-1)$ on primes, which makes it A064097. Kagey posted the poset on Math.SE in April 2020 and lists it as Problem 110.
Is this poset a lattice? If not, is it a join- or meet-semilattice? If so, is it distributive, or modular? It appears that $(n \vee k) \mid \operatorname{lcm}(n,k)$ for small $n$ and $k$; what is $\operatorname{lcm}(n,k)/(n \vee k)$? Is there a good way to construct the least integer of a given rank?
The accepted answer, by Ewan Delanoy, says yes to the first question. Its treatment of the meet is correct. Its claim about the join is false, and the conclusion needs a different argument.
Coordinates
Write $\lambda_p = p/(p-1)$. Every positive integer is a product of these in exactly one way,
$$n = \prod_p \lambda_p^{\,e_p(n)},$$with $e(n) = (e_p(n))_p$ a finitely supported vector of non-negative integers. Existence is an induction, since $n = \lambda_p \cdot (n - n/p)$ whenever $p \mid n$. Uniqueness holds because the $\lambda_p$ are multiplicatively independent: in a relation $\prod_p \lambda_p^{a_p} = 1$ the largest prime with $a_p \ne 0$ survives the $p$-adic valuation and forces $a_p = 0$.
Three facts do all the work in what follows.
- $e$ is additive, $e(mn) = e(m) + e(n)$, and $e(p) = u_p + e(p-1)$ for every prime $p$.
- Subtracting raises one coordinate by one: if $p \mid n$ then $e(n) = e(n - n/p) + u_p$. So $\rho(n) = \sum_p e_p(n)$.
- Valuations are visible in the coordinates. For every prime $q$, $$v_q(n) = e_q(n) - S_q(e(n)), \qquad S_q(e) = \sum_{p > q} e_p \, v_q(p-1).$$
The map $S_q$ is additive and monotone, and it only looks at coordinates above $q$. The last identity holds for any integer vector, not just a non-negative one, which gives a test for when a formal product is an integer.
For $e \in \mathbb{Z}^{(P)}$, the number $\prod_p \lambda_p^{e_p}$ is an integer if and only if $e_q \ge S_q(e)$ for every prime $q$. Such an $e$ is automatically non-negative.
$m \le_K n$ if and only if $e(m) \le e(n)$ componentwise. In particular $d \mid n$ implies $d \le_K n$.
The coordinates are not new. The exponent $e_p(n)$ counts the vertices labelled $p$ in the Pratt forest of $n$, and Leka's manuscripts on Pratt trees study the same system on the positive rationals, including the integrality criterion and the closure of the integers under the minimum.
Meets, joins, and a false step
Let $\Lambda$ be the set of formal products $\prod_p \lambda_p^{x_p}$ with $x \ge 0$, ordered componentwise. This is a copy of the finitely supported sequences in $\mathbb{N}$, a distributive lattice, with componentwise minimum and maximum as its operations. The embedding lemma says $K$ sits inside $\Lambda$ as an ordered subset. The Math.SE answer ends by asserting that the integers are closed under both operations. For the minimum that is true. For the maximum it is false, and the smallest failure needs nothing larger than $5$:
$$3 = \lambda_2\lambda_3, \qquad 5 = \lambda_2^2\lambda_5, \qquad \lambda_2^2\lambda_3\lambda_5 = 4 \cdot \tfrac32 \cdot \tfrac54 = \tfrac{15}{2}.$$So the answer does not establish that joins exist. The claim cannot be patched either, because a sublattice of a distributive lattice is distributive and $K$ is not. Joins do exist, and they are computed from the largest prime downward.
$K$ is a lattice. For $e = e(m)$ and $f = e(n)$, the meet is the componentwise minimum, $e(m \wedge n) = \min(e,f)$. The join is $e(m \vee n) = j$, where $j_q = 0$ for every prime $q$ above all prime factors of $mn$, and for the rest, taken from the largest downward,
$$j_q = \max\bigl(e_q,\; f_q,\; S_q(j)\bigr).$$The join agrees with the maximum in $\Lambda$ exactly when $\max(e,f)$ is integral.
For the meet, monotonicity of $S_q$ gives $S_q(\min(e,f)) \le \min(S_q(e), S_q(f)) \le \min(e_q,f_q)$, so the minimum is integral and the embedding lemma makes it the greatest lower bound. The recursion for the join is well defined because $S_q(j)$ involves only the coordinates already computed. By construction $j \ge e, f$ and $j_q \ge S_q(j)$, so $j$ is the vector of an integer upper bound. If $h$ is the vector of any upper bound then downward induction gives $h_q \ge \max(e_q, f_q, S_q(h)) \ge \max(e_q, f_q, S_q(j)) = j_q$.
On the primes $(2,3,5)$ we have $e(3) = (1,1,0)$ and $e(5) = (2,0,1)$. The recursion gives $j_5 = 1$, $j_3 = 1$, and then $j_2 = \max(1, 2, 3) = 3$, so $3 \vee 5 = \lambda_2^3\lambda_3\lambda_5 = 15$. The same happens one prime along: $5 \vee 7 = 35$ while the maximum in $\Lambda$ is $35/4$, and $5 \wedge 7 = 4$.
So $K$ is a meet-subsemilattice of $\Lambda$ and not a sublattice. The meets are A334230 and the joins are A334231.
Not modular
The gap between the join and the maximum is exactly what breaks the rank identity of a modular lattice.
$\rho(m) + \rho(n) \le \rho(m \wedge n) + \rho(m \vee n)$ for all $m$ and $n$, with equality if and only if $\max(e(m),e(n))$ is integral. $K$ is lower semimodular. It is not upper semimodular.
The inequality is immediate from the theorem above, since $\rho$ is the coordinate sum and $j \ge \max(e,f)$. Lower semimodularity is also short: if $m$ and $n$ are both covered by $J$ then $e(m) = e(J) - u_p$ and $e(n) = e(J) - u_q$ with $p \ne q$, so the meet has vector $e(J) - u_p - u_q$ and sits one step below each. Upper semimodularity fails at the smallest possible place. Both $5$ and $6$ cover $4$, and $5 \vee 6 = 15$, which is two ranks above either.
$K$ is not modular, and hence not distributive. The set $\{2, 5, 10, 3, 15\}$ is a sublattice isomorphic to the pentagon $N_5$.
In coordinates, $e(2) = (1,0,0)$, $e(5) = (2,0,1)$, $e(10) = (3,0,1)$, $e(3) = (1,1,0)$ and $e(15) = (3,1,1)$. So $2 <_K 5 <_K 10 <_K 15$ and $2 <_K 3 <_K 15$, while $3$ is incomparable to $5$ and to $10$. Both meets $3 \wedge 5$ and $3 \wedge 10$ are $2$, and both joins are $15$. The modular law fails at $5 \le_K 10$, since $5 \vee (3 \wedge 10) = 5 \vee 2 = 5$ while $(5 \vee 3) \wedge 10 = 15 \wedge 10 = 10$.
Read row by row through the triangles of meets and joins, $(3,5)$ is the first pair where the rank inequality is strict, and no pentagon has its top element below $15$. Both statements were checked by machine.
Joins against the lcm
Both $m$ and $n$ divide $\operatorname{lcm}(m,n)$, so the lcm is an upper bound in $K$ and $m \vee n \le_K \operatorname{lcm}(m,n)$. That is not divisibility, because $a \le_K b$ does not imply $a \mid b$. A334231 records the divisibility as an observation. It is a theorem, and the quotient can be written down.
Let $J = m \vee n$, and put $x = e(J) - e(m)$, $y = e(J) - e(n)$, $\alpha_q = S_q(x)$, $\beta_q = S_q(y)$. Then for every prime $q$,
$$v_q(m \vee n) = \max\bigl(0,\; v_q(m) - \alpha_q,\; v_q(n) - \beta_q\bigr).$$Hence $(m \vee n) \mid \operatorname{lcm}(m,n)$, and with $M_q = \max(v_q(m), v_q(n))$ the quotient $Q(m,n) = \operatorname{lcm}(m,n)/(m \vee n)$ has
$$v_q(Q) = \min\bigl(M_q,\; M_q - v_q(m) + \alpha_q,\; M_q - v_q(n) + \beta_q\bigr).$$Climbing from $m$ to the join multiplies by factors $\lambda_p = p/(p-1)$, and a factor with $p > q$ strips $v_q(p-1)$ copies of $q$ out of the number. The corrections $\alpha_q$ and $\beta_q$ count exactly that loss, and since they are non-negative the maximum never exceeds $M_q$, which is the divisibility. For $m = 3$ and $n = 4$ the join is $6$, the correction is $\beta_2 = v_2(3-1) = 1$, so $v_2(6) = \max(0, 0, 2-1) = 1$ and $Q = 2$.
| $Q(m,n)$ | $1$ | $2$ | $3$ | $4$ | $5$ | $6$ | $7$ | $8$ |
|---|---|---|---|---|---|---|---|---|
| $1$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| $2$ | 1 | 1 | 2 | 1 | 2 | 1 | 2 | 1 |
| $3$ | 1 | 2 | 1 | 2 | 1 | 1 | 3 | 2 |
| $4$ | 1 | 1 | 2 | 1 | 4 | 2 | 4 | 1 |
| $5$ | 1 | 2 | 1 | 4 | 1 | 2 | 1 | 4 |
| $6$ | 1 | 1 | 1 | 2 | 2 | 1 | 6 | 2 |
| $7$ | 1 | 2 | 3 | 4 | 1 | 6 | 1 | 4 |
| $8$ | 1 | 1 | 2 | 1 | 4 | 2 | 4 | 1 |
The formula is recursive and we have no simpler one. It does say when the quotient is trivial: $Q(m,n) = 1$ exactly when for every prime $q \mid mn$ either $v_q(m) \ge v_q(n)$ and $\alpha_q = 0$, or $v_q(n) \ge v_q(m)$ and $\beta_q = 0$. Four cases close completely.
- If $n \le_K m$ then $m \vee n = m$ and $Q(m,n) = n/\gcd(m,n)$.
- Every positive integer is a value of $Q$. If $p \equiv 1 \pmod t$ is prime then $t \le_K p-1 \lessdot p$, so $Q(p,t) = t$, and Dirichlet supplies the prime.
- $2^a \vee n = n \cdot 2^{\max(0,\,a - e_2(n))}$.
- For primes $p < q$, the join is $q$ if $p$ labels a vertex of the Pratt tree of $q$, and $pq$ otherwise. Equivalently there are primes $p = p_0 < p_1 < \dots < p_t = q$ with $p_i \mid p_{i+1} - 1$. For instance $3 \mid 7-1$ and $7 \mid 29-1$, so $3 \le_K 29$ and $3 \vee 29 = 29$, while $3 \vee 5 = 15$.
Meets scale with the greatest common divisor: $m \wedge n = g \cdot \bigl((m/g) \wedge (n/g)\bigr)$ with $g = \gcd(m,n)$, which is the formula stated without proof in A334230. Coprime integers need not meet at $1$, since $3 \wedge 5 = 2$. Joins do not scale: $10 \vee 14 = 35$, while $2 \cdot (5 \vee 7) = 70$.
The least integer of a rank
Let $L(r)$ be the least integer of rank $r$. It exists because $\rho(2^r) = r$.
$L$ is strictly increasing, so the $L(r)$ are the record positions of $\rho$ and $L(r) = \mathrm{A105017}(r+1)$. It is submultiplicative, $L(r+s) \le L(r)L(s)$. For $r \ge 1$ every $L(r)$ is either a prime $p$ with $\rho(p-1) = r-1$ or a product $L(s)L(r-s)$, every prime factor of $L(r)$ is itself a value of $L$, and
$$L(r) = \min\Bigl(\pi(r),\ \min_{0 < s < r} L(s)L(r-s)\Bigr),$$where $\pi(r)$ is the least prime of rank $r$. Moreover $\log_2 n \le \rho(n) < 2\log_2 n$ for $n > 1$, with equality on the left only at powers of $2$, so $2^{r/2} < L(r) \le 2^r$ for $r \ge 1$.
That is as far as the structure goes. The recursion reduces the problem to finding the least prime of rank $r$, and we do not know how to find that prime without a search. Kagey's last question is answered only in part.
| $r$ | $L(r)$ | $r$ | $L(r)$ | ||
|---|---|---|---|---|---|
| 0 | 1 | 10 | 94 | $2 \cdot 47$ | |
| 1 | 2 | prime | 11 | 139 | prime |
| 2 | 3 | prime | 12 | 235 | $5 \cdot 47$ |
| 3 | 5 | prime | 13 | 283 | prime |
| 4 | 7 | prime | 14 | 517 | $11 \cdot 47$ |
| 5 | 11 | prime | 15 | 659 | prime |
| 6 | 19 | prime | 16 | 1081 | $23 \cdot 47$ |
| 7 | 23 | prime | 17 | 1319 | prime |
| 8 | 43 | prime | 18 | 2209 | $47^2$ |
| 9 | 47 | prime | 19 | 2879 | prime |
The table runs to $r = 47$ in the paper, ending at $L(47) = 389{,}566{,}127 = 47 \cdot 2879^2$. Two primes recur in it, $47$ and $2879$, and both end Cunningham chains $p \mapsto 2p+1$: $2, 5, 11, 23, 47$ and $89, 179, 359, 719, 1439, 2879$. Along such a chain the rank grows by $2$ every time the value doubles, which is the extreme that the bound $\rho(n) < 2\log_2 n$ describes. Improving the constant $2$ needs to know how long these chains can be.
Since $\ln L$ is subadditive, Fekete's lemma gives a limit.
$\beta = \lim_{r \to \infty} L(r)^{1/r}$ exists and equals $\inf_{r \ge 1} L(r)^{1/r}$, and $\sup_{n > 1} \rho(n)/\ln n = 1/\ln\beta$.
The bounds of the structure theorem give $\sqrt2 \le \beta$, and any single value of $L$ gives an upper bound. On the data of the paper the best is $L(19) = 2879$, so $\beta \le 2879^{1/19} = 1.52078\ldots$ Before computing beyond the published range we registered three hypotheses. H1 said the infimum sits at $r = 19$, so that $\beta = 2879^{1/19}$. H2 said the ratio $L(r)/e^{5(r+1)/12}$ stays inside the window $[0.72, 0.99]$ it occupies for $20 \le r \le 43$. H3 said $L(44)$ is composite. The sieve to $4 \times 10^8$ confirmed H1 and H2 at $r = 44, \dots, 47$ and refuted H3: $L(44) = 132{,}756{,}479$ is a new prime record.
H1 is false, and the data that refutes it was already published. The b-file attached to A105017 carries 200 terms, out to rank $199$, and the paper does not use it. At rank $55$ it gives $L(55) = 10{,}017{,}543{,}839$, below $2879^{55/19} = 1.03 \times 10^{10}$. The smallest ratio in the file is at rank $168$, where
$$L(168)^{1/168} = 1.51636\ldots < e^{5/12} = 1.51690\ldots$$We factored all 200 terms and recomputed their ranks, so each is certified to have the rank claimed. That is all an upper bound needs, since any integer $n$ of rank $r$ gives $\beta \le n^{1/r}$ and minimality is not required. The interval is therefore
$$1.41421 \le \beta \le 1.51637, \qquad 2.4020 \le \frac{1}{\ln\beta} \le 2.8854,$$and the value of $\beta$ is open. The comment $a(n) \approx \sqrt{e^{5n/6}}$ in A105017 reads as $\beta = e^{5/12}$, and the file's own terms put $\beta$ below that. A conjecture in A064097 says $\lfloor \log_2 n\rfloor \le \rho(n) < \tfrac52 \ln n$. The left half is proved above. The right half is equivalent to $L(r) > e^{2r/5}$ for every $r \ge 1$. We prove only the constant $2/\ln 2 = 2.8854\ldots$, and the improved lower bound $2.4020$ leaves $\tfrac52$ standing.
What was checked
Nothing above is taken from the formulas alone. The verification script builds the poset on $[1, 20000]$ out of the covering relations, as down-sets held in bitsets, and checks every statement and table against that construction. All 36 checks pass. The table of $L(r)$ comes from a second program that computes $\rho$ on $[1, 4 \times 10^8]$ by two independent sieves, one using complete additivity and one following $n \mapsto n - n/p$ straight from the covering relation, and the two rank arrays agree everywhere.
Everything on this page was then recomputed from scratch for the write-up.
- The rank against all 10,000 terms of the A064097 b-file, the meets against all 10,440 terms of A334230, and the joins against all 10,011 terms of A334231.
- Meets and joins by brute force from the down-sets, with no formula used, for every pair with $\operatorname{lcm}(m,n) \le 6000$, together with the pentagon, the failure of the modular law, lower semimodularity, the first failure of upper semimodularity, the divisibility, the valuation formula and the table of $Q$.
- $L(r)$ for $r \le 47$ by a third sieve to $4 \times 10^8$, and the rank of every term of the A105017 b-file by factoring.
Three questions are left. The value of $\beta$, or any improvement of the constant $2$ in $\rho(n) < 2\log_2 n$. A description of the pairs with $Q(m,n) = 1$ simpler than the criterion above. And one from the Math.SE post, untouched here: whether the intervals $[1,n]$ have the Sperner property. Kagey remarks there that they are not rank unimodal.