# Identities for Sieve of Eratosthenes collisions.

Edited to define the last two tables
Three Questions:
1) Is all notation correct?
2) Is there a symbol for flatten?
3) How would we prove the identities: the sum of the divisors in the symmetric segments $=$ the count of collisions?

This question is intended to be in the spirit of this earlier question.

Define the mapping function: $$\beta(n,k):= \text{ is n's greatest divisor which is \leq k}.$$ Map the two symmetric seqments: $$\beta(n,k)\mapsto \forall n \in \mathbb{N}^{+}_{k!},$$ $$\beta(n,k)\mapsto \forall n \in \mathbb{N}^{+}_{\text{exp}(\psi(k))},$$ where $\psi(\cdot)$ is the second Chebyshev function.

The identities involve the sums of the greatest divisors for each symmetric segment: $$\sum_{n=1}^{k!} \beta(n,k)=\text{A126959}(k)=\#\left(\bigcup \text{flatten}\left\{i*j:(i,j,k)\in \mathbb{N}^{+} , 0<i\leq k, 0<j\leq k!\right\}\right),$$ $$\sum_{n=1}^{\text{exp}(\psi(k))} \beta(n,k)=\text{A101459}(k)=\#\left(\bigcup \text{flatten}\left\{i*j:(i,j,k)\in \mathbb{N}^{+} , 0<i\leq k, 0<j\leq \text{exp}(\psi(k))\right\}\right),$$ where $\psi(\cdot)$ is the second Chebyshev function and $\#\left(\cdot\right)$ is the number of elements in the set.

Mathematica code:
(* Second Chebyshev function*)
\[Psi][k_] := Sum[MangoldtLambda[n], {n, 1, k}]
(* mapping greatest divisor of n, leq k*)
\[Beta][n_, k_] := Module[{i = k + 1}, While[0 != Mod[n, --i]]; i]

Sum[\[Beta][n, k], {n, 1, Exp[\[Psi][k]]}]
Sum[\[Beta][n, k], {n, 1, k!}]

(* From OEIS A101459**)
Length[Union[Flatten[Table[i j, {j, 1, Exp[\[Psi][k]]}, {i, 1, k}]]]];
(* From OEIS A126959*)
Length[Union[Flatten[Table[i j, {j, 1, k!}, {i, 1, k}]]]];

Edit---Why does the sum of the greatest divisors in the symmetric segment $=$ the inclusion/exclusion count of unique products?

-