Probability for an $n\times n$ matrix to have only real eigenvalues

Let $A$ be an $n\times n$ random matrix where every entry is i.i.d. and uniformly distributed on $[0,1]$. What is the probability that $A$ has only real eigenvalues?
The answer cannot be $0$ or $1$, since the set of matrices with distinct real eigenvalues is open, and also the set with distinct, but not all real, eigenvalues is open (the matrices with repeated eigenvalues have measure zero).
I don't see any easy transformation that links the two sets, and working on the characteristic polynomial seems quite impractical. Also, I have the feeling that $[0,1]^{n^2}$ is not a good space to work in, due to its lack of rotational invariance.

@EXodd Ok. Then we can try this way for $n\geq 4$ case. Let $f(x)=det(xI−A)$ be the characteristic polynomial. Let $a_1 >⋯>a_{n−1}$ be roots of $f′(x)$. Then the roots of f are all real if $f(a_1)<0,f(a_3)<0,…$ and $f(a2)>0,f(a4)>0,…$. For $n=4$, this seem to give the explicit algebraic relation. For $n>4$, I am not sure.

@J1U already for degree 4, "If the coefficients are real numbers and the discriminant is positive, then the roots are either all real or all non-real" so it cannot predict if the roots are all real or not

@Exodd See this: en.m.wikipedia.org/wiki/Discriminant For degree 3 and 4, the discriminant is explicitly computed. For even higher degrees, the discriminant is still expressed as the algebraic relation of the coefficients of the polynomial, although it would be messier.

@J1U for the 2x2 it is easy indeed (actually the proobability is 1) but for larger degrees how do you ensure the polynomial has only real solutions?

Why don’t you just use the characteristic polynomial? All the eigenvalues are real if $det(xI-A)$ only has real solution. For example, for 2-by-2, $(a_{11}-a_{22})^2+4a_{12}a_{21}>0$ if and only if all the eigenvalues are real. Thus the probability is the volume of the set of inequality intersection $[0,1]^4$.

The probability the matrix is symmetric is zero, but maybe one can argue that a certain class of “almost symmetric” matrices (via a perturbation) have real eigenvalues and with positive probability, to get a lower bound on the desired probability in question.

@AdamCataldo yes, if you only consider real matrices then the eigenvalues are very biased towards the real line. Maybe finding a bigger space where to work may not be a bad idea, but the choice of the biger space has to reflect/expand somehow consistently the properties of the spectra of real matrices

I think what I'm stuck on is measure space you're trying to work in, since you're suggesting in the problem it shouldn't be $[0, 1]^{n^2}$ (presumably with Lebesgue measure). It sounds like it's also not the eigenspace (the subset of $\mathbb{C}^n$ that is projected on by the set of matrices in $[0, 1]^{n \times n}$). Or do you think the projection into the eigenspace is such that the eigenvalues on the real line have non-zero measure?

@AdamCataldo if the eigenvalues of the matrices were "continuously" distributed in the unit circle, then you would be correct. But if you take real matrices, the distribution of their eigenvalues is biased on certain areas of the unit circle, and in particular they greatly concentrate on the real line, so much that even if $[-1,1]$ is negligible in the unit circle, the probability of having real eigenvalues is not zero

Not sure I follow this, because what I'm saying is that in the unit circle in the complex plane, the real line, that is the real values between -1 and 1, has measure zero. It does in fact have an empty interior, because if you draw a ball of any radius around any of the points on the real line, the ball will include complex numbers, not just real values.

@AdamCataldo the probability Cannot be zero, since the set of all-real eigenvalues matrices has non-empty interior part. Your reasoning holds if you consider complex-entries matrices, while here we have only real entries

My intuition is that the probability is zero, and that intuition is based on a slightly simpler problem: Consider the set of n x n matrices where all eigenvalues satisfy $|\lambda| < 1$. The subset of these matrices where all eigenvalues is real is a set of subset of measure zero relative to the entire set in eigenspace. I would expect something similar if you change the constraint from the one I suggested to the original problem, but I'm not sure what the mapping from n x n matrices with entries all in [0, 1] "looks like" in eigenspace, so that's where my intuition might fall apart.

Since this question is getting a lot of attention, I ask you to reformulate it. Every square matrix has at least one complex eigenvalue, since every polynomial of degree $\geq 1$ has at least one complex root (note that real numbers are also complex numbers, by definition). What you ask is the probability for all eigenvalues to be real. Right?

just a quick thought. Assume $n=2$. If $A$ eigenvalue $\lambda_2$ is complex, then $A-\lambda_2 I $ cannot be drawn as a parallelogram in, say $XY$ plane i.e. its area (in $XY$ plane) does not exist. Since the number of eigenvalues increases as $n\rightarrow \infty$, it feels for sure that at least for one of them, say $\lambda_n$, the $n$-dimenional area $det(A-\lambda_n I)$ does not exist. Thus the sought probability is $0$.

@leonbloy (cont.) Then again, the "large amount of independence" from originally $n^2$ random values has to be "squeezed" into $(n-1)^2$ random values. So they are certainly independent indeed. Admittedly, this is still in a typical what could possible go wrong? scenario.

@leonbloy That is quite feasible: If we pick one (probably existing) real eigenvector and take it to $e_n$ via an orthonormal base change, the other entries in the resulting matrix are essentially linear combinations of a large number of iid uniform random variables, so by the law of big numbers are gaussian. Well, the independence is a bit hand-wavy as the original eigenvector depends on all entries and vice versa all entries in the new matrix are influenced by the eigenvector. (cont.)

This paper: shub.ccny.cuny.edu/articles/… says:Mehta [24, Conjectures 1.2.1 and 1.2.21 conjectures from extensive numerical experience that the statistical properties of matrices with independent identically distributed entries behave as if they were normally distributed as n -+ rn . Mehta focuses on the symmetric or Hermitian cases, but surely the idea is quite general.

with 10kk the results do not change much...

about one million (trusting Octave's random generator)

@leonbloy how many examples have you generated for the empirical evaluation?

It should be a coincidence, but the desired probability seems to be quite near the probability of an $n-1 \times n-1$ random gaussian matrix having all real eigenvalues $$\begin{array} n & & \\ 2  &1      &   1 \\    3 &0.708  &   0.70711\\ 4 &0.346  &   0.35355\\ 5 &0.117 &    0.125\\ 6 & 0.028   &  0.03132\\ \end{array} $$ Left column: empirical. Right column: from here: core.ac.uk/download/pdf/82140233.pdf

@AdinaGoldberg We are on the set of real matrices, so the eigenvalues are either real or come in couples of conjugated complex numbers. If you have distinct real eigenvalues, then you can always find a small enough neighbourhood where the eigenvalues are not complex due to the continuity of the eigenvalues

I guess to clarify, I certainly agree that within the set of matrices with real eigenvalues, those with distinct eigenvalues is an open set. But that is relatively open, in the sense that $(0,1)$ is open in $\mathbb{R}$ but not in $\mathbb{R}^2$.

@Exodd Yes, indeed! But $\mathbb{R}$ is not open as a subset of $\mathbb{C}$. How can you complete your argument?

@AdinaGoldberg the eigenvalues of a matrix are the roots of the characteristic polynomial, and the roots are continuous functions of the coefficients

I'm curious why the set of matrices with distinct real eigenvalues is open (I'm assuming as a subset of the $n \times n$ real matrices.)

Perhaps you could try to say something about the distribution of the discriminant of the characteristic polynomial

I'm not sure it will work, no. On a second look it seems like a key component of the argument for higher moments is that $\sum_{j=1}^N(A^2)_{jj}=\sum_{j,k=1}^N(A_{jk})^2$ which requires symmetric matrices.

@SamJaques they are dealing with symmetric matrices, and they work for big $n$.. Are you sure?


A question about divisibility of sum of two consecutive primes

I was curious about the sum of two consecutive primes and after proving that the sum for the odd primes always has at least 3 prime divisors, I came up with this question:

Find the least natural number $k$ so that there will be only a finite
number of $2$ consecutive primes whose sum is divisible by $k$.

Although I couldn't go anywhere on finding $k$, I could prove the number isn't $1, 2, 3, 4$ or $6$, just with proving there are infinitely many primes $P_n$ so that $k\mid(P_n+P_{n+1})$ and $k$ is one of $1, 2, 3, 4, 6$:
The cases of $k=1$ and $k=2$ are trivial. The case of $k=3$, I prove as follows:
Suppose there are only a finite number of primes $P_k$ so that $3\mid(P_k+P_{k+1})$. We can conclude there exists the largest prime number $P_m$ so that $3\mid(P_m+P_{m-1})$ and thus, for every prime number $P_n$ where $n>m$, we know that $P_n+P_{n+1}$ is not divisible by $3$. We also know that for every prime number $p$ larger than $3$ we have: $p \equiv 1 \pmod 3$  or $p \equiv 2 \pmod 3$. According to this we can say for every natural number $n>m$, we have either $P_n \equiv P_{n+1} \equiv 1 \pmod 3$ or $P_n \equiv P_{n+1} \equiv 2 \pmod 3$, because otherwise, $3\mid(P_n+P_{n+1})$ which is not true. Now according to Dirichlet's Theorem, we do have infinitely many primes congruent to $2$ or $1$, mod $3$. So our case can't be true because of it.
We can prove the case of $k=4$ and $k=6$ with the exact same method, but I couldn't find any other method for proving the result for other $k$.

This is equivalent to: Find the least natural number $k$ so that there is no pair of $2$ consecutive primes whose sum is divisible by $k$. Let say $k$ is the least natural number such there is only a finite number of pair of $2$ consecutive primes whose sum is divisible by $k$, and that $p+q=kn$ is the largest of those sums. Then no sum of $2$ consecutive primes is divisible by $k\left(n+1\right)$ ...

Easily to check that each of the described sums for $n\in[2,5000]\;$ has one or more dividers among $\pi(k),\; k\in[2, 999].$  That's why the required k should be too big.

OP, your first link goes to some weird Yahoo page.  Please fix.   Ty

@KeithBackman late response, but surely that can't be true:  Schinzel's hypothesis H implies that for all $n$, there are infinitely many pairs of twin primes of the form $kn \pm 1$.  For example, $11$ divides $197+199$, $13$ divides $311+313$, $19$ divides $227+229$, etc.

@CODE: I'm just curious, isn't $k=2$ the answer?, of course this is except for $2 + 3$.

Anecdotally, there are a plethora of numbers that never divide the sum of twin primes, which are consecutive primes: $11,13,19,31,43, \dots$. However, these numbers may well divide the sums of other consecutive primes.

The link to Yahoo Answers shut down today. Can you link elsewhere?

@CODE has this been crossposted to Math Overflow?

The question amounts to : does there exist a k, such that, only finitely many pairs of consecutive primes are additive inverses mod k.

@user254665 my reasoning for k=3 says that if the hypothesis is false, from some point on we would have all prime numbers are either congruent to 2 mod 3 or 1 mod 3, THAT can't be true according to Dirichlet's Theorem.

3+ years and no A. Maybe put it on MathOverflow and see what the pros say.

A particular case of Dirichlet's Theorem is that there are infinitely many primes congruent to 1 mod 3 and  infintely many congruent to 2 mod 3. But Dirichlet's Theoerem does NOT say anything about CONSECUTIVE primes. Your reasoning for k=3 is invalid. ... However it is a good Q, and, I suspect, with no known A.

@ghosts not true, $12$ does not divide $103+107$, for instance.

You can make a kind of a prime counting function that counts the pairs of consecutive primes divisible by $k$ below $n$. Maybe call it $\pi_k(n)$. After doing some computations it seems that $\pi_k(n) \sim c Li(n)$ for some constant $c$ which for a lot of $k$'s looks to be close to $1/\phi(k)$

@CODE: Indeed, Schinzel's Hypothesis H implies it. In fact you don't even need that much: Dickson's conjecture suffices, with some cleverness.

I also doubt that this is going to be answered.why don't you try posting this to mathoverflow.net?

I think Schinzel's Hypothesis says it's true though.

Thanks, I myself think such a $k$ doesn't exist too, but proving it is another matter :P

this is a very nice question and it will seem weird if there exists such a $k$


What is the largest volume of a polyhedron whose skeleton has total length 1? Is it the regular triangular prism?

Say that the perimeter of a polyhedron is the sum of its edge lengths. What is the maximum volume of a polyhedron with a unit perimeter?
A reasonable first guess would be the regular tetrahedron of side length $1/6$, with volume $\left(\frac16\right)^3\cdot\frac1{6\sqrt{2}}=\frac{\sqrt{2}}{2592}\approx 0.0005456$. However, the cube fares slightly better, at $\frac{1}{1728}\approx 0.0005787$.
After some experimentation, it seems that the triangular prism with all edges of length $1/9$ is optimal, at a volume of $\frac{\sqrt{3}}{2916}\approx0.00059398$. I can prove that this is optimal among all prisms (the Cartesian product of any polygon with an interval) and that there is no way to cut off a small corner from the shape and improve it.
Is the triangular prism the largest polyhedron with a fixed perimeter?
I can prove a weak upper bound of $\frac1{12\pi^2\sqrt{2}}\approx 0.00597$ on the volume of such a polyhedron, by combining the isoperimetric inequalities in both $2$ and $3$ dimensions (i.e., the fact that polygons cannot enclose more surface area than a circle and that a polyhedron cannot enclose more volume than a sphere of the same surface area) along with the observation that a single face of a polyhedron cannot take up the majority of its surface area. Note the number of leading zeros - this upper bound is a bit over $10$ times my lower bound!
Edit: A friend of mine has confirmed with Mathematica that no polyhedron with $5$ or fewer vertices, or anything combinatorially equivalent to the triangular prism, improves on this bound. (With some work, this approach might be extended to all polyhedra on at most $k$ vertices, for $k$ on the order of $7$ to $10$.)

The term "skeleton" in the title should be avoided because this term is used in Mathematical Morphology for something else, rather different from the meaning given here.

A good starting point would be to consider Gauss's Shoelace formula for volume en.wikipedia.org/wiki/Shoelace_formula#Generalization . Every polyhedron has a volume formulation which is the sum of tetrahedra radiating from a common centre (after triangulation of surface mesh).

This paper [Donald W. Grace, Search For Largest Polyhedra, MCOM, 1963] talks about the 8-vertex polyhedron formed by points on a unit sphere. From the article: "The dual of Goldberg's conjecture can be loosely stated as follows: In the polyhedron of maximum volume formed by $n$ points on a sphere, the faces are triangular and the number of edges leading to any vertex is as nearly as possible equal to the average of such numbers." I thought this might be relevant.  ams.org/journals/mcom/1963-17-082/S0025-5718-63-99183-X/…

Digging a bit on the Melzak conjecture literature, I found this paper: londmathsoc.onlinelibrary.wiley.com/doi/10.1112/jlms/s2-6.2.382 (unfortunately not freely available), which gives the upper bound $V<\frac{1}{432\pi}\approx 0.00073682$, which is pretty close to $0.00059$

This is essentially Melzak's Conjecture. ijgeometry.com/wp-content/uploads/2021/09/4.-63-73.pdf and scholar.rose-hulman.edu/cgi/…

@RavenclawPrefect Just like with cotangent area formula for regular polygons based on  the amounts of sides, for now ignoring side lengths, there may a formula like this from n “pyramids”.

@TymaGaidash: What do you mean by a "volume formula"? The volume of a polyhedron is not uniquely determined by the multiset of its edge lengths, even given the associated edge graph (consider the family of parallelepipeds with unit edges), so there can be no deterministic mapping from a polyhedron's edge lengths to its volume.

If we could somehow find a volume formula and then optimize it, it should give the answer.

You can get a better upper bound by using the theorem 2 from this paper. From that together with polyhedron cannot enclose more volume than a sphere, you get the upper bound of $\frac{1}{36\sqrt{6}\pi^2}\approx 0.00115$

@StevenStadnicki: Just an update that I did investigate something like this for some small polyhedra and didn't find any improvements (see the edit).

I wonder whether you could approach this by specific combinatorial counting; the number of polyhedra with low edge counts is relatively small. An orange-slice shape suggests that it might be hard to lower-bound the number of 'long' edges, though. This is a great question.


Can Erdős-Turán $\frac{5}{8}$ theorem be generalised that way?

Suppose for an arbitrary group word $w$ ower the alphabet of $n$ symbols $\mathfrak{U_w}$ is a variety of all groups $G$,  that satisfy an identity $\forall a_1, … , a_n \in G$ $w(a_1, … , a_n) = e$. Is it true, that for any group word $w$ there exists a positive real number $\epsilon (w) > 0$, such that any finite group $G$ is in $\mathfrak{U_w}$ iff $$\frac{\lvert\{(a_1, … , a_n) \in G^n : w(a_1, … , a_n) = e\}\rvert}{{|G|}^n} > 1 - \epsilon(w)?$$

How did this question arise? There is a widely known theorem proved by P. Erdős and P. Turán that states:

A finite group $G$ is abelian iff $$\frac{|\{(a, b) \in G^2 : [a, b] = e\}|}{{|G|}^2} > \frac{5}{8}.$$

This theorem can be rephrased using aforementioned terminology as $\epsilon([a, b]) = \frac{3}{8}$.
There also is a generalisation of this theorem, stating that a finite group $G$ is nilpotent of class $n$ iff $$\frac{|\{(a_0, a_1, … , a_n) \in G^{n + 1} : [ … [[a_0, a_1], a_2]… a_n] = e\}|}{{|G|}^{n + 1}} > 1 - \frac{3}{2^{n + 2}},$$ thus making $\epsilon([ … [[a_0, a_1], a_2]… a_n]) = \frac{3}{2^{n + 2}}$.
However, I have never seen similar statements about other one-word varieties being proved or disproved, despite such question seeming quite natural . . .
Actually, I doubt that the conjecture in the main part of question is true. However, I failed to find any counterexamples myself.

Which group words w admit an ε(w) > 0 such that: A finite group G satisfies w = e globally ⟺ P_w(G) > 1 - ε(w)?

@Z. A. K. (Well, technically I proved them during my PhD, but I wrote them up earlier this year)

I proved analogous results about the equations $xy^2=y^2x$, $xy^3=y^3x$ and $xy=yx^{-1}$ (and infinitely many others derived from these by adding further variables) earlier this year: preprint.

@YaniorWeg This conjecture is false for $p=5$; see my answer at mathoverflow.net/a/337483/297 .

For some recent progress, see the paper Delizia et al., Gaps in probabilities of satisfying some commutator-like identities (2019), where the conjecture is proved for the metabelian and $2$-Engel word.

@MeesdeVries, there is also a conjecture, that $\epsilon(x^p) = \frac{p-1}{p^2}$ for prime $p$, however it remains unproven.

@MeesdeVries, for the case $n = 1$ only three results are currently known: $\epsilon(x) = \frac{1}{2}$, $\epsilon(x^2) = \frac{1}{4}$ and $\epsilon(x^3) = \frac{2}{9}$.

Is the $n=1$ case obviously true? Or is even that case difficult?

Not mentioned in a 2015 survey Farrokhi, D. G. (2015). ON THE PROBABILITY THAT A GROUP SATISFIES A LAW: A SURVEY (Research on finite groups and their representations, vertex operator algebras, and algebraic combinatorics), muroran-it.ac.jp/mathsci/danwakai/past/articles/201404-201503/…. Mentioned as open in a note by John D. Dixon, "Probabilistic Group Theory", people.math.carleton.ca/~jdixon/Prgrpth.pdf

I one wrote out an answer which is about generalising the Erdos-Turan result to infinite groups: math.stackexchange.com/a/2809964/10513 You might find it interesting/relevant.


Complete, Finitely Axiomatizable, Theory with 3 Countable Models

Does there exist a complete, finitely axiomatizable, first-order theory $T$ with exactly 3 countable non-isomorphic models?
A few relevant comments:
There is a classical example of a complete theory with exacly $3$ models. This theory is not finitely axiomatizable (For the trivial reason that the language is infinite).
In this post, Javier Moreno explains how to rephrase this example in a finite language. Still, the theory is not finitely axiomatizable.
Some less relevant comments:
I would like to know if finite axiomability has ever be asked in this context.
There have been research in connection with stability. Lachlan has proved that a superstable theory with finitely many countable models is $\omega$-categorical. And it is still open if this can be extended to all stable theories.

and by Scott's theorem a complete $\mathcal{L}_{\omega_1,\omega}$-theory has at most one countable model up to isomorphism (as long as the language is countable, anyways); actually, Scott showed that for every countable structure $\mathcal{A}$ (in a countable language), there is a single $\mathcal{L}_{\omega_1,\omega}$-sentence $\varphi$ such that for all countable $\mathcal{B}$ we have $\mathcal{B}\models\varphi\iff\mathcal{B}\cong\mathcal{A}$ (google "Scott sentence"). So none of this is relevant.

@mohottnad It is not true that if $T$ is a conservative extension (even in the "strong" sense) of $S$ then $T$ has the same number of countable models (up to isomorphism) as $S$; the "additional structure" of $T$ may introduce additional models. All we can say is that there will be the same number of reducts to the language of $S$ of countable models of $T$, up to isomorphism, as there are countable models of $S$ up to isomorphism. But that's much weaker. As to changing to $\mathcal{L}_{\omega_1,\omega}$, note that changing the logic also changes the meaning of "complete," (cont'd)

@NoahSchweber thanks for your critique and I agree my above sentence is not well formed. However, similarly here's some post suggests "every recursively axiomatizable theory in first-order logic with identity that has only infinite models, has a finitely axiomatized conservative extension... simply endow the given theory with a new sort.." which seems applicable here for above theory with 3 countable models. Another way for a single sentence using $L_{w1,w}$ logic?

@mohottnad That doesn't help at all. "$\forall k.c_k<c_{k+1}$" is not a first-order sentence: first-order logic doesn't let you quantify over symbol indices like that. And re: "If you want it to be finitely axiomatized," finite axiomatizability is the whole point of the question (see e.g. the passage "There is a classical example of a complete theory with exacly 3 3 models. This theory is not finitely axiomatizable (For the trivial reason that the language is infinite).")

Let ∆ be the theory of dense linear orders without endpoints (finitely axiomatizable), then the classic Ehrenfeucht example theory T is axiomatized by $∆∪\{c_k<c_{k+1} | k ∈ ω\}$ which has 3 countable models up to isomorphism. If you want it to be finitely axiomatized, we can simply syntactically change above set of countably infinite number of axioms to a single $\Pi_1$ sentence: $\forall k. c_k<c_{k+1}$ where $k$ ranges over another sort of natural number type. This theory's alphabet is infinite, but it by no means we cannot have a finitely axiomatized theory using this language.

@DanielV There are 3 models up to isomorphism. "Up to isomorphism" is usually left implicit. If you do not count "up to isomorphism" there is always a proper class of models.

Do you mean that there are $n\ge 3$ models, but only $3$ isomorphically distinct models, or that there are $3$ models, and they are not isomorphic?

This post might give you a lead, but I don't have David Marker's model theory book -- mathoverflow.net/questions/143394/…

Note though that the usual Ehrenfeucht example of a 3-model theory is unstable.

Wilfred Hodges' Model Theory theorem 12.2.18 states that a totally categorical theory $T$ (a) is not finitely axiomatisable and (b) is quasi-finitely axiomatisable; where the latter property means that it is definitionally equivalent to a single sentence together with all the sentences "there are at least $n$ elements" for each $n$. And further that an $\omega$-stable and $\omega$-categorical $T$ is not finitely axiomatisable either. (So your second question--has anybody thought about these questions before?--has answer "yes". Hodges says the theorem answers a conjecture of Vaught.)

Thanks for the comments, which make the question much more accessible to someone who hasn't thought about such things before.

@James pointed out my misreading of the Question that these 3 countable nonisomorphic models are the only models, interpreting instead that among its countable models, there are exactly three isomorphism classes.


Regular way to fill a $1\times1$ square with $\frac{1}{n}\times\frac{1}{n+1}$ rectangles?

The series $$\sum_{n=1}^{\infty}\frac{1}{n(n+1)}=1$$ suggests it might be possible to tile a $1\times1$ square with nonrepeated rectangles of the form $\frac{1}{n}\times\frac{1}{n+1}$. Is there a known regular way to do this? Just playing and not having any specific algorithm, I got as far as the picture below, which serves more to get a feel for what I am looking for.

I think some theory about Egyptian fractions would help. It's nice for instance in the center where $\frac13+\frac14+\frac16+\frac14=1$. And on the right edge where $\frac12+\frac13+\frac16=1$.

Side note: The series is $\left(\frac11-\frac12\right)+\left(\frac12-\frac13\right)+\left(\frac13-\frac14\right)+\cdots$. The similar looking $\left(\frac11-\frac12\right)+\left(\frac13-\frac14\right)+\left(\frac15-\frac16\right)+\cdots$ sums to $\ln(2)$, and there is a nice picture for that, if you interpret $\ln(2)$ as an area under $y=
\frac{1}{x}$:

This question is basically identical to one posted on MathOverflow.  I am leaving the question here as a reference for interested readers in the future.

Nice problem. But there seems to be no method of arrangeing it analytically.

@VividD He means that the rectangles from the $\ln(2)$ example are not literally $\frac{1}{2n-1}\times\frac{1}{2n}$. They have that same total area, but different dimensions.

@GregMartin What is "not with given dimensions"?

@alex.jordan : Thanks for the explanation; it's a cool fact. I note that the $\ln2$ example tiles the curved area with rectangles of given area, but not with given dimensions in any reasonable way. The analogous problem would be to tile the unit square with rectangles of area $1/n(n+1)$ but not with given dimensions; and that's trivial. So I think we're still looking for an example of a natural known tiling with a sequence of rectangles of given dimensions.

@martycohen : look at either of the links in the above comments. Paulhus has fit them into a square of side length something like $1+10^{-9}$.

Since no one seems to know how to fit the rectangles into a square of area equal to the sum of their areas, how about this question: What is the smallest square that contains all the $\frac1{n}\times \frac1{n+1}$ rectangles with no overlaps?

@GregMartin I can't take credit for that; I saw it somewhere at some point. After the big rectangle for $1-\frac12$, the real pattern sets in. First, using $x=1+\frac12$, we get the rectangle representing $\frac13-\frac14$. Then at $x=1+\frac14$ and $x=1+\frac34$, you get the rectangles for $\frac15-\frac16$ and $\frac17-\frac18$. Then at $x=1+\frac18$, $x=1+\frac38$, $x=1+\frac58$, and  $x=1+\frac78$, you get rectangles for $\frac19-\frac1{10}$, $\frac1{11}-\frac1{12}$, $\frac1{13}-\frac1{14}$, and $\frac1{15}-\frac1{16}$. Do you see the pattern? Look for powers of $2$ in denominators.

What is your algorithm for placing the rectangle in the picture where the area sums to $\ln 2$?

@GregMartin: Do you happen to know of a non-trivial tiling (not geometric like golden ratio or similar), with no two equal tiles, which does have some kind of enumeration for each different tiling?

@alex.jordan Generally, a question should not be deleted unless it is unsalvageably awful (e.g. do my homework for me), inappropriate, or spam. As it stands your question is none of these and does not deserve deletion at all.

What's protocol for when a question turns out to be research level? Should I delete the question?

I wrote a paper related to this (math.ubc.ca/~gerg/index.shtml?abstract=CTGP). Therein you can find a reference to this problem statement, as well as my reason for believing that such a packing is possible.

This was asked at MO: mathoverflow.net/questions/34145/… and it appears to still be an open problem.

This is a research level problem in "Concrete Mathematics" (2nd edition) by Grapham, Knuth, Patashnik (ISBN-10: 0201558025): see page 66, exercise 37. In the section with hints you will find that every one of the authors has a different opinion.

Wow! This is the most interesting question I've seen on this site in a while :)


Does the $32$-inator exist?

Background
It is common popular-math knowledge that as we extend the real numbers to complex numbers, quaternions, octonions, sedenions, $32$-nions, etc. using the Cayley-Dickson construction, we lose algebraic properties at each step such as commutativity, associativity, alternativity, etc.
We can express this phenomenon in a more illustrative way. Consider the following multilinear maps $F_k$ of degree $k$:

Number two: $F_0: [\:] = 1 - (-1) = 2$.
Imaginary part: $F_1: [x] = x - x^*$.
Commutator: $F_2: [x, y] = xy - yx$.
Associator: $F_3: [x, y, z] = (xy)z - x(yz)$.
$16$-inator: $F_4: [x, y, z, w] = (x(yz))w+(w(yz))x-(xy)(zw)-(wy)(zx)$.

They measure the failure of the algebra to be of characteristic two, Hermitian, commutative, associative and Moufang, respectively. All of them are well-known except for the last one, which I adapted from the quadrilinear map described in section 5 of this paper and essentially comes from a linearized Moufang identity. (Note that depending on the convention, imaginary part, commutator and associator are often defined with an extra factor of $1/2$, and in the context of complex numbers, imaginary part almost always refers to $F_1$ divided by $2i$).
Since the maps are multilinear, they are determined by their values at the basis elements $1=e_0, e_1, e_2, e_3, \ldots, e_{2^n-1}$ (under the standard labeling) in the $n$th Cayley-Dickson algebra over the reals. All the maps above with degree $k \le n$ can then be checked to satisfy the following properties:

(A1) $[e_a, e_b, e_c, \ldots] = m e_i$ for some $i$, where $m\in\{-2,0,2\}$.
(A2) $[e_a, e_b, e_c, \ldots] = 0$ whenever $a, b, c, \ldots <2^{k-1}$.
(A3) $[e_1, e_2, e_4, \ldots, e_{2^{k-1}}] = 2 e_{2^{k}-1}$.
(A4) If $[x, y, \ldots] = z$, then $[\sigma(x), \sigma(y), \ldots] = \sigma(z)$ for any algebra automorphism $\sigma$.

Properties (A2) and (A3) together imply (rather trivially) that given a Cayley-Dickson algebra $\mathbb{A}$, $F_k$ vanishes in the next algebra $CD(\mathbb{A})$ if and only if both $F_k$ and $F_{k-1}$ vanish in $\mathbb{A}$; for $k < 4$ this fact holds in more generality for any $*$-algebra (see e.g. here) and provides a more uniform way to explain why commutativity, associativity, etc. break in sequence as we iterate the Cayley-Dickson process.
But rather than talk about algebraic properties, for the purposes of this question I would like to treat the maps themselves as the objects of interest. So let these properties (and multilinearity) be the axioms that define a $2^n$-inator in a real Cayley-Dickson algebra.
The first four maps $F_0, \ldots, F_3$ are in fact uniquely determined by these axioms when $k=n$. For example, (A3) implies $[\:]=2e_0=2$; (A2) and (A3) together with linearity imply $[a e_0+b e_1] = a[e_0]+b[e_1] = a\cdot 0 + b\cdot 2e_1 = 2b e_1$; the map $F_2$ in the quaternions is completely fixed by (A2), (A3) and (A4) applied twice, with an automorphism that cyclically permutes the imaginary basis elements and with the involution $e_1 \mapsto e_2, e_2 \mapsto e_1, e_3 \mapsto -e_3$; and similarly for $F_3$ in the octonions. I haven't checked whether the $16$-inator in the sedenions is uniquely recovered from the axioms, but I suspect it's probably nonunique, since the automorphism groups of the sedenions and above are "small" relative to the size of the algebras (the groups are all isomorphic to the $14$-dimensional octonionic automorphism group ($G_2$) times a finite group, while the algebras themselves double their dimension at each step). Nevertheless, it is natural to ask if one can continue the sequence by finding nontrivial examples of $F_k$ for $k>4$; my main question deals with the smallest case $k=n=5$.
This paper implies that if a $F_5$ exists, it is necessarily not expressible in terms of multiplication and real constants alone, unlike $F_0, F_2, F_3$ and $F_4$. There could still be a closed-form expression if we allow the use of conjugation as with $F_1$, but it looks unlikely to me. The possibility of using non-real constants seems more promising, because the automorphism groups of sedenions and above do not act transitively on imaginary elements of norm $1$, so some basis elements are "more special" than others. In fact, one can define new "conjugations" $x^{(8)} = e_{8} x e_{8}$, $x^{(16)} = e_{16} x e_{16}$, etc. which can be shown to be invariant under all automorphisms of the algebra; this follows from Lemma 2.1 here. An obvious followup to my main question would be whether the $2^n$-inators can be expressed in terms of multiplication, real constants, and the conjugations $x^*, x^{(8)}, x^{(16)}, x^{(32)}, \ldots, x^{(2^n)}$. But in principle it's not guaranteed that $F_n$ will be algebraically expressible at all, if it exists.

Question
My question is:
Is there a $32$-inator in the $32$-nions, i.e. a multilinear map $F_5: [x,y,z,w,v]$ satisfying axioms (A1)-(A4)? Followup: can it be expressed in terms of multiplication, real constants and conjugations?
Such a map would necessarily be nontrivial by (A3), and would be identically zero in any sedenion subalgebra by (A2) and (A4). Some remarks:

In page 12 of the paper I linked above, it is suggested that the possible existence of higher-order maps might be related to projective geometry over the field $\mathbb{F}_2$.

The first problem looks simple enough that it could be solved with a computer search, but the search space seems to be quite large at first glance. The obvious upper bound on possible cases to check, taking into account only multilinearity and (A1), would be $(2\cdot 32 + 1)^{32^5} = 65^{2^{25}} \lesssim 2^{2^{28}}$. Perhaps some clever argument could reduce this bound to a more manageable number.

In regards to conjugation. One way to view it is as an invertible operator on a vector of reals, that can only change the signs and the order of elements but not the magnitudes of the elements themselves. For an $n$ vector there are $2^n n!$ such conjugation operators. That gives a lot of options to work with.

I see how $[w,x,y,z]$ is a polarization of the Moufang identity $x(yz)x=(xy)(zx)$, but I don't see how it's related to the other two Moufang identities. Are the three identities equivalent in any alternative algebra?


Is there a "ping-pong lemma proof" that $\langle x \mapsto x+1,x \mapsto x^3 \rangle$ is a free group of rank 2?

Let $f,g\colon \mathbb R \to \mathbb R$ be the permutations defined by $f\colon x \mapsto x+1$ and $g\colon x \mapsto x^3$, or maybe even have $g\colon x \mapsto x^p$, $p$ an odd prime.
In the book, by Pierre de la Harpe, Topics in Geometric Group Theory section $\textrm{II.B.40}$, as a research problem, it asks to find an appropriate "ping-pong" action to show that the group, under function composition, $G=\langle f,g \rangle$  is a free group of rank two.
Is there such a proof? That is, is there a proof where the key insight is having that group act in such a way to apply the ping-pong lemma(table-tennis lemma)? I have not been able to find such a proof either by working on it, or in the literature.
Maybe we don't have such a proof but do we have a proof that $G$ contains a free subgroup of rank two, akin to proofs for torsion-free hyperbolic group, or the Tits alternative. I am not sure how obvious it is that $G$ is hyperbolic, or linear. I am guessing it is not obvious that it is linear since I would suspect a ping-pong proof would come out of that pretty quickly.
Note that there are proofs of this theorem, but as far as I know, they do not use the ping-pong lemma.
The only proofs of the result(and more general things) I know of are in :

Free groups from fields by Stephen D. Cohen and A.M.W. Glass
The group generated by $x \mapsto x+1$ and $x \mapsto x^p$ is free. by Samuel White
Arithmetic permutations by S.A. Adeleke and A.M.W. Glass

I don't expect that linearity would be easier than free. For instance, the subgroup $H$ generated by $f,g$ and in addition $h:x\mapsto 2x$ is not linear because of the relations $hfh^{-1}=f^2$, $ghg^{-1}=h^3$. Indeed the last implies that $g^nhg^{-n}f^{\pm 1}g^nh^{-1}g^{-n}=f^{\pm 2^{(3^n)}}$. If these are complex matrices, the norm of the left hand is bounded exponentially, and hence the norm of $f^m$ partially growth logarithmically  (both for $m\ge 0$ and $m\le 0$). This is possible only if $f$ has finite order, so every representation of $H$ maps $f$ to an element of finite order.

"I am guessing it is not obvious that it is linear since I would suspect a ping-pong proof would come out of that pretty quickly": this is not quite true. To find free groups in linear groups is now easy, but to show that two given elements generate a free group is usually delicate. For instance I think the following is open (or known but hard): let $G$ be a Zariski-dense subgroup of $SL(n,\mathbf{C})$ be non-virtually-solvable, and let $x\in G$ be of infinite order: does there exist $y\in G$ such that $\langle x,y\rangle$ is free? Typically if $x$ is unipotent, it's hard.

Given that I found the idea of such a proof quite compelling, I figured others had the same though, and maybe someone had found one since the book was written.

@MartinBrandenburg I agree, the Andrews-Curtis conjecture, 3d Poincare conjecture, "is every hyperbolic group residually finite?", are only some of the research problems he has in the book. It has been 15 years or so since the book was published, so I am wondering is such a proof has been done, and I don't think at the time of the book being published there was such a proof. It is also really difficult to find papers on this, the only reason I found the ones sited above was because he sited them! (It is sometimes a little ambiguous as to "how solved" the research problems are)

The book contains quite a lot of these "research problems". Could it be that the author hasn't worked them out and instead offers them as, say, research proposals for bachelor or master theses? Perhaps they are open problems, including this one here? Notice that the existing proofs are quite complicated.


Dedekind Sum Congruences

For $a,b,c \in \mathbb{N}$, let $a^{\prime} = \gcd(b,c)$, $b^{\prime} = \gcd(a,c)$, $c^{\prime} = \gcd(a,b)$ and $d = a^{\prime} b^{\prime} c^{\prime}$. Define $\mathfrak{S}(a,b,c) =  a^{\prime} \mathfrak{s}( \tfrac{bc}{d}, \tfrac{a}{b^{\prime} c^{\prime}}) +   b^{\prime} \mathfrak{s}( \tfrac{ac}{d}, \tfrac{b}{a^{\prime} c^{\prime}}) + c^{\prime} \mathfrak{s}( \tfrac{ab}{d}, \tfrac{c }{a^{\prime} b^{\prime}} )$, where $\mathfrak{s}$ is the Dedekind sum. I can prove the following: For $a, b, c \in \mathbb{N}$ with $\gcd(a,b,c) = 1$,
\begin{align}
12 a b c \ \mathfrak{S}(a,b,c) \equiv (ab)^{2} + (bc)^{2} + (ca)^{2} + d^{2}  \ \pmod{a b c}.
\end{align}
Is this congruence in the literature? I'm aware of the 3-term generalization of Rademacher and Pommersheim and of the work of Beck on the Carlitz-Dedekind Sums, but these don't seem to include this particular congruence as a special case.
I generalize. For $a_{1}, \dots, a_{n} \in \mathbb{N}$ such that $\gcd(a_1, \dots, a_{n}) = 1$, let $a_{i}^{\prime} = \gcd(a_{1}, \dots, \hat{a}_{i}, \dots, a_{n})$. Define the symmetric summation
$$
\mathfrak{S}(a_{1},\dots, a_{n}) = \sum_{i = 1}^{n} a_{i}^{\prime} \, \mathfrak{s}\left( \tfrac{a_{1} \cdots \hat{a}_{i} \cdots a_{n}}{a_{n+1}},  \tfrac{a_{i}}{a_{1}^{\prime} \cdots \hat{a}_{i}^{\prime} \cdots a_{n}^{\prime}} \right).
$$
where $\hat{}$ denotes omission. For pairwise coprime $a_{1}, \dots, a_{n} \in \mathbb{N}$ (all primed variables equal $1$), I conjecture the following congruence holds for $n = 4$ (and I have a hunch that it continues to hold for $n > 4$):
$$
12 a_{1} \cdots a_{n} \, \mathfrak{S}(a_{1}, \dots, a_{n}) \equiv \left( \sum_{i = 1}^{n} (a_{1} \cdots \hat{a}_{i} \cdots a_{n})^{2} \right) + 1 \ \pmod{a_{1} \cdots a_{n}}.
$$
Is this more general congruence known?


Determinant of a matrix that contains the first $n^2$ primes.

Let $n$ be an integer and $p_1,\ldots,p_{n^2}$ be the first prime numbers. Writing them down in a matrix
$$
\left(\begin{matrix}
p_1 & p_2 & \cdots & p_n \\
p_{n+1} & p_{n+2} & \cdots & p_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
\cdots & \cdots & \cdots & p_{n^2}
\end{matrix}
\right)
$$
we can take the determinant. How to prove that determinant is not zero for every $n$?

Is it possible to prove this by showing that inverse of given matrix always exists as there always exists trivial solutions to Ax = 0 equation?. Trivial solutions are only possible as the rows of the matrix will always be independent, as each element of matix is a distinct prime number.

Has anyone thought of posting this on math overflow?

@Gerald Did you misread "not zero" as "nonnegative"?

@Boris: Although the absolute value increases most of the time, there are exceptions. For example with $n=57,58$ the determinants are about $2.14 \times 10^{89}$ and $1.25 \times 10^{89}$, respectively. There are more exceptions later.

@Elborito This is because the Perron-Frobenius Eigenvalue grows faster than linearly and is much larger than the other eigenvalues (which are rarely smaller than one). Here is a list of the eigenvalues for $n=14$: $7843.09, -168.956, -11.4222 + 2.69341 i, -11.4222 - 2.69341 i, -5.68197 + 5.79415 i, -5.68197 - 5.79415 i, 0.121105 + 6.20539 i, 0.121105 - 6.20539 i, 4.28891 + 4.0145 i, 4.28891 - 4.0145 i, 11.132, 7.30824, -4.67599, -1.51002$. I've also made a plot of the lowest singular value for $n=10,\ldots,100$. But I can't see any pattern. E.g. , at $n=28$ the lowest sing. value is $0.006$.

The absolute value of the determinant of the matrix is strictly crescent. maybe by recursivity

But I want to tell those interested that the bound that arrives is $n=845$ with $714025$ primes in the maximum matrix.

No answer: You might look at "Integral Matrices" by Morris Newman.  In particular the "Smith Normal Form".  It discusses divisibility and such.  As I recall some of the results were surprising.   The class is just a distance memory (but I have the book) so it might lead nowhere.

@RoflUkulus We can also to check whether starting series from $1$ gives similar results. So far it was checked up to $n=200$.

From my point of there are two things to study: 1.) Are there any permutations $\sigma \in S_{n^2}$ that permutate the entries such that the determinant goes to zero? If so, what do they look like? 2.) What are the least gaps (least is not really defined properly), that primes can have, to produce determinant zero, like the matrices Robert posted, for example maybe is there any $k$ such that  $p_1,p_{1+k},p_{2+k},\ldots$ determinant gets zero.

@RobertIsrael The number  of digits for determinant seems to increase (or at least not to decrease - almost linear function) . Could it be possible to compute with your software also series with this number of digits?

@RobertIsrael Very inspiring, I hope some day a limit $n= 1000$ will be achieved.

At $n= 460$ the determinant has $1001$ digits.  I was making a b-file for sequence A067276, and the OEIS doesn't like numbers with more than $999$ digits.  I could go further, but computations start to slow down...

@RobertIsrael so now 460 is the limit. I wonder why exactly 460 in this case?

@Robert Israel thank you for these examples. Indeed, this makes it harder to prove and there might be some evil matrix around which determinant goes to zero :-) I looked up the prime factors of the determinants but did not find any pattern. There are large powers of 2 appearing in the factorization, but there not even increasing monotonely.

I think this is going to be an intractable problem.  Note that there are square matrices with determinant $0$ made up of distinct primes, e.g. $$\pmatrix{2 & 3 & 5\cr 7 & 11 & 13\cr 19 & 23 & 97\cr}$$  Thus you somehow have to depend on the fact that you're using the consecutive primes.  And those just don't have enough regularity.

@RoflUkulus I think that Peter is the best expert on prime numbers ( much better than me) , ask him when he will be available. BTW he has asked many other interesting questions about primes..

@Widawensen Oh, you already asked the questions. Did you try the flintc library for checking n > 201. Not sure if it can handle those big matrices. I strongly believe that the proof will be difficult, too. Maybe it would be interesting to study the prime factorization of those determinants.

Read comments from math.stackexchange.com/questions/2047879/…, especially Peter's comments are valuable.

The sequence of determinants is OEIS sequence A067276. Not that this helps...


Does the average primeness of natural numbers tend to zero?

Note 1: This questions requires some new definitions, namely "continuous primeness" which I have made. Everyone is welcome to improve the definition  without altering the spirit of the question. Click here for a somewhat related question.

A number is either prime or composite, hence primality is a binary concept. Instead I wanted to put a value of primality to every number using some function $f$ such that $f(n) = 1$ iff $n$ is a prime otherwise, $0 < f(n) < 1$ and as the number divisors of $n$ increases, $f(n)$ decreases on average. Thus $f(n)$ is a measure of the degree of primeness of $n$ where 1 is a perfect prime and 0 is a hypothetical perfect composite. Hence $\frac{1}{N}\sum_{r \le N} f(r)$ can be interpreted as a measure of average primeness of the first $N$ integers.
After trying several definitions and going through the ones in literature, I came up with:

Define $f(n) = \dfrac{2s_n}{n-1}$ for $n \ge 2$, where $s_n$ is the
  standard deviation of the divisors of $n$.

One advantage of using standard deviation is that even if two numbers have the same number of divisor their value of $f$ appears to be different hence their measure of primeness will be different.
Question 1:  Does the average primeness tend to zero? i.e. does the following hold?
$$
\lim_{N \to \infty} \frac{1}{N}\sum_{r = 2}^N f(r) = 0
$$
Question 2: Is $f(n)$ injective over composites? i.e., do there exist composites $3 < m < n$ such that $f(m) = f(n)$?

My progress

$f(4.35\times 10^8) \approx 0.5919$ and decreasing so the limit if it exists must be between 0 and 0.5919.
For $2 \le i \le n$, the minimum value of $f(i)$ occurs at the largest highly composite number $\le n$.

Note 2: Here standard deviation of $x_1, x_2, \ldots , x_n$ is defined as $\sqrt \frac{\sum_{i=1}^{n} (x-x_i)^2}{n}$. Also notice that even if we define standard deviation as $\sqrt \frac{\sum_{i=1}^{n} (x-x_i)^2}{n-1}$ our questions remain unaffected because in this case in the definition of $f$, we will be multiplying with $\sqrt 2$ instead of $2$ to normalize $f$ in the interval $(0,1)$.
Note 3: Posted this question in MO and got answer for question 1. Indeed the limit tends to zero. Question 2 is still open.

If $f(n)=1$ iff $n$ is a prime then I would have thought $f(n)$ cannot uniquely identify $n$ (i.e. $f(n)$ is not $1-1$ injective), since it cannot when $n$ is a prime.

@daniel One of the reasons why I invented this definition was because even if two numbers have the same number of divisors or the same number distinct prime divisors, their value of $f(n)$ was found to be unique. In that way, $f(n)$ can uniquely identify $n$ but $\omega(n)$ or $d(n)$ cannot uniquely identify $n$.

@daniel After I posted in MO, it was answered. But I am not sure if a similar question was asked in MSE and answered

@daniel I do not see how Erod Kac theorem directly implies that the avove limit tends to zero?

$0.59$ is the average of all the values for $n \le 4.35 \times 10^8$

Yes, that is what I got.  I was confused when you reported getting 0.59 above.

@Scott You must have done an error. Try this Sagemath code (N(variance(divisors(320700000), bias = True), digits = 10))^0.5 / (320700000-1) you will get 0.1009653420

@Scott E.g. For $n = 19$, the divisors are $1,19$ and the variance of these two divisors is $82$. Similarly for $n = 20$, the divisors are $1,2,4,5,10,20$ and their variance is $42$

I can't seem to recreate your test cases.  Do you mean proper divisors, etc?  Could you post a couple of low-valued test cases for this so that we can make sure we're evaluating the same thing?

@NilotpalKantiSinha I'm not sure I follow why Question 2 is a question. Isn't $f(p) = f(q) = 1$ for any primes $p,q$ by construction?

@JavaMan Yes, standard deviation gives more information than just the number of divisors. But to be honest, I don't exactly know how to interpret standard deviation completely in the context of primeness. One of the reason for using standard deviation was because some progress was already made on the standard deviation of the divisors of the first $n$ natural numbers. Check this post. math.stackexchange.com/questions/2773289/…

Why do you care about the standard deviation? I understand that $s_n$ may be different even for a number with the same amount of divisors, but if all you want is to measure “primeness,” then why complicate this with standard deviation? It seems like this question now accounts for more than just primeness. It now considers smoothness of an integer (or something like it).

@TheSimpliFire My graph is identical to yours but instead of converging to about $0.4$ as in your case, it is converging to about $0.4 \times \sqrt 2 \approx 0.59$. This is because of bais = True or False in your formula for calculating standard deviation. You have used bias = False and got the limit 0.4. I have used bias = True and got $f(320700000) = 0.594127573872085$

I meant your second sentence below the Note at the start of your post. Here is a plot of the limit for $N\le 10000$.

@TheSimpliFire The difference is because of the the parameter 'bias = ' in the formula for calculating standard deviation in Sagemath. Check my source code above. For a prime $p$   we have 2*std(divisors(p), bias = True).n()/(p-1) = 1 and 2*std(divisors(p), bias = True).n()/(p-1) = $\sqrt 2$. I have used bias = True because the range $(0,1)$ looks more elegant than $(0, \sqrt 2)$. Also $r = 2$ is correct. However, regardless of bias = True or False, the the question remain unchanged as $f$ is only gets multiplied by a scaling factor so we are good.

I don't get why you say that $f(n)=1$ if $n$ is prime. For a prime $p$, $$f(p)=\frac{2\sqrt{\frac{\left(\frac{p-1}2\right)^2+\left(\frac{1-p}2\right)^2}{2-1}}}{p-1}=\sqrt2$$ so shouldn't it be $f(n)=\frac{\sqrt2 s_n}{n-1}$? Furthermore the sum should be from $r=2$ to $N$ as $1/(r-1)$ is undefined when $r=1$.

You might want to rephrase "is $f(n)$ unique" to "is $f(n)$ injective". At first glance I thought you didn't know whether $f(n)$ was well-defined.

@TheSimpliFire I have added my Sagemath code above

I have written some code for this in R: stanfun <- function(n){sd(divisors(n))/(n-1)};funstan <- function(m){sum(sapply(2:m, function(i){stanfun(i)}))/m}, so $\frac1{10000}\sum\limits_{r=1}^{10000}f(r)$ is given by funstan(10000) which outputs $0.404801$.

@GerryMyerson: Here is a more technical answer why standard deviation. If two numbers have the same number of divisors then the value $2/d(n)$ is same for both but the values of $f(n)$ is different. So under my definition, I will consider the number with smaller value of $f(n)$ to have a greater primness because we are not just measuring how many divisors a number has but also how scattered these divisors are. At the moment, I don't know if $f(n)$ is unique. I will add this to the question.

Why involve the standard deviation? Why not something simpler, like $2/d(n)$, where $d(n)$ is the number of divisors of $n$?

Is your second statement about the minimum of $f$ obvious? I'm unable to come up with an argument.


On the equivalence relation $(a,b) \sim (c,d)\iff a+b=c+d$

Setup
Let $A=\{a_1<a_2<\cdots<a_p\}$ and $B=\{b_1<b_2<\cdots<b_q\}$ be two finite sets of real numbers. Define an equivalence relation $\sim_{A,B}$ on $R_{p,q}=\{1,\dots,p\}\times\{1,\dots,q\}$ by setting $$(i,j)\sim_{A,B}(k,l)\iff a_i+b_j=a_k+b_l$$ and further define a total order on the set of equivalence classes $R_{p,q}/\sim_{A,B}$ by setting, for any equivalence classes $c,d$ and representatives $(i,j)\in c$ and $(k,l)\in d$ $$c<_{A,B}d\iff a_i+b_j<a_k+b_l$$ This question is about characterizing such equivalence relations $\sim_{A,B}$ and total orders $<_{A,B}$. An equivalence relation $\sim$ on $R_{p,q}$ for which there exist $A,B$ with $\sim\;=\;\sim_{A,B}$ is called realizable. If $\sim$ is realizable, a total order $<$ on $R_{p,q}/\sim$ is called realizable if we can find $A,B$ with $\sim\;=\;\sim_{A,B}$ and $<\;=\;<_{A,B}$. In both cases we say that the pair $(A,B)$ realizes $\sim$ (resp. $(\sim,<)$.)

Problem 1. Characterize realizable equivalence relations on $R_{p,q}$.
Problem 2. Suppose $\sim$ is realizable, can one find $\mathcal{A},\mathcal{B}\subset\Bbb{N}$ with $\sim\;=\;\sim_{\mathcal{A}, \mathcal{B}}$?
Problem 3. Characterize realizable orders on $R_{p,q}/\sim$ (where $\sim$ is realizable.)

Have these questions been considered / solved somewhere?
Motivation
As suggested in the comments I should give some context. The question arose while solving Problem 3.5 in David Eisenbud's Commutative Algebra with a View Toward Algebraic Geometry. In this problem one considers a graded ring $R=\bigoplus_{\gamma\in\Gamma} R_\gamma$ and a graded module $M=\bigoplus_{\lambda\in\Lambda}M_\lambda$ where $(\Gamma,+,0,<)$ is a totally ordered abelian monoid acting freely and compatibly on the totally ordered set $(\Lambda,<)$. When working out the solution to this exercise I found myself drawing rectangles $R_{p,q}=\{1,\dots,p\}\times\{1,\dots,q\}$ and writing $\gamma_i+\lambda_j$ at position $(i,j)$, where I had picked some subsets $\{\gamma_1<\gamma_2<\cdots<\gamma_p\}\subset\Gamma$ and $\{\lambda_1<\lambda_2<\cdots<\lambda_q\}\subset\Lambda$. I was trying to figure out when $R_{\gamma_i}\cdot M_{\lambda_j}$ and $R_{\gamma_k}\cdot M_{\lambda_l}$ lie in the same $M_{\lambda}$ i.e. what and one say about the equivalence relation on $R_{p,q}$ defined by $(i,j)\sim(k,l)\iff\gamma_i+\lambda_j=\gamma_k+\lambda_l$? For concreteness I considered $\Gamma=\Lambda=\Bbb{N}$ or $\Gamma=\Lambda=\Bbb{R}_+$ but the problem makes sense in the broader context described by Eisenbud. I realized that there were some nice pictures to be drawn and that there was a not so obvious combinatorial problem of independent interest which is Problem 1. Problem 2 arose when comparing the cases $\Bbb{N}$ and $\Bbb{R}_+$: do we recover the same equivalence relations? Or would some not be realizable using integers? Problem 3 arose when drawing not only the blobs representing equivalence classes but the total order between them. What constraints must such orders satisfy?
Necessary conditions and proposed characterizations
While thinking about these problems I made some progress and was able to identify some necessary conditions for realizability of $\sim$ and $<$. I wouldn't call any of these "conjectures" per se ... Is there an acceptable phrase for "half-assed guesses"? Using terminology introduced below I wonder

Observation and Guess 1. Any realizable equivalence relation $\sim$ on $R_{p,q}$ satisfies Inclination, Non Crossing and both Antidiagonal Propagation conditions. Conversely, are these conditions enough to characterize realizability of $\sim$ ?

I'm not sure these conditions alone will do the job ... but they may. It seems in that for $p=2$ these conditions are sufficient (with an algorithm for finding explicit sets $A,B$ of rational numbers realizing $\sim$.)
Using terminology introduced below, there are some simple necessary Visibility conditions satisfies by realizable orders. There are also some less obvious but still simple Horizontal and Vertical Coherence conditions that such orders must satisfy.

Observation and Guess 2. Any realizable order satisfies Visibility and both Horizontal and Vertical Coherence conditions. Conversely, are these enough to characterize realizability of $<$ ?

Examples
Here are some simple examples representing equivalence classes of $\sim_{A,B}$ and the order relation $<_{A,B}$. In the pictures below we represent equivalence classes as "blobs" and signify $c<_{A,B}d$ by drawing an arrow from one equivalence class to another.
Example 1. Let $A=\{0<1<2<\cdots<p-1\}$ and $B=\{0<p<2p<\cdots<(q-1)p\}$. The equivalence classes of $\sim_{A,B}$ are singletons (this is uniqueness of euclidean division).

Example 2. Let $A=\{0<1<2<\cdots<p-1\}$ and $B=\{0<1<2<\cdots<q-1\}$. The equivalence classes of $\sim_{A,B}$ are antidiagonals.

The answer to Problem 2 may be positive. Something along the lines of "the condition is open and as long as one moves in tandem the things that are correlated (i.e. related by $\sim_{A,B}$) one can change coordinates to rational ones" ought to "prove" the assertion. Maybe results from real algebraic geometry and semi-rational sets of degree 1 could also answer the question, but I know nothing about this material. Once one has rational $A$ and $B$ one can multiply everything by some integer and get the desired integer $\mathcal{A}$ and $\mathcal{B}$.
There may be a connection with configuration spaces. There certainly is a connection with geometry (existence of rational points on a rational algebraic set) and hyperplane arrangements but there, too, I'm not quite sure how to make it precise.

Notation
Given an equivalence class $c$ for $\sim_{A,B}$ we define its sum to be $a_i+b_j$ for any $(i,j)\in c$. Given $(i,j)\in R_{p,q}$ we define the vertical set $V_i=\{(i,a)\mid a=1,\dots,q\}$ and the horizontal set $H_j=\{(a,j)\mid a=1,\dots,p\}$. Given an equivalence class $c$ we define two subsets of the rectangle: $c^+$ (the green shaded region in  the picture below) is the set of all $(i,j)$ such that there exists some $(a,b)\in c$ with $(a,b)\neq(i,j)$ and $a\leq i$ and $b\leq j$ and $c^-$ (the orange shaded region in  the picture below) is the set of all $(i,j)$ such that there exists some $(a,b)\in c$ with $(a,b)\neq(i,j)$ and $a\geq i$ and $b\geq j$.
In the picture below the blue dots represent an equivalence class, the green region is $c^+$ and the orange region is $c^-$.

Inclination and Non Crossing (necessary conditions for realizability of $\sim$)
The following are simple necessary conditions on an equivalence relation $\sim$ on $R_{p,q}$ for it to be of the form $\sim_{A,B}$:

Inclination. Two equivalent elements may not have the same first or second coordinate, i.e. any intersection $c\cap V_i$ and $c\cap H_j$ contains at most one element.
Non Crossing. Given distinct equivalence classes $c,c'$, the equivalence class $c'$ may not intersect both $c^+$ and $c^-$.

The necessity of both conditions is clear (the sum of an equivalence class meeting $c^+$ (resp. $c^-$) is greater (resp. smaller) than that of $c$). Actually the first condition is redundant since it is contained in the second. These conditions alone, however, don't characterize equivalence classes of the form $\sim_{A,B}$, see the counter example below.
Constraints and counter example
Some configurations of equivalence classes have a constraining effect on the rest of the equivalence classes. Consider for example the case where we have an antidiagonal and subantidiagonal equivalence class (say with $p=q=n+1\geq 3$) i.e. $(1,n)\sim_{A,B}(2,n-1)\sim_{A,B}\cdots\sim_{A,B}(n,1)$ and $(1,n-1)\sim_{A,B}(2,n-2)\sim_{A,B}\cdots\sim_{A,B}(n-1,1)$. Then $(i,j)\sim_{A,B}(k,l)\iff i+j=k+l$.

This implies that some equivalence relations are not of the form $\sim_{A,B}$ even though they satisfy the Inclination and Non Crossing conditions. For example the one depicted below:

These can't represent the equivalence classes of a relation $\sim_{A,B}$: the presence of the $3$ element equivalence classes would impose the relations $(1,3)\sim_{A,B}(2,2)$ and $(2,7)\sim_{A,B}(3,6)$ (both represented in blue on the right).
We thus get a third necessary condition:
Suppose $A'=\{a_1',\dots,a_r'\}\subset A$ and $B'=\{b_1',\dots,b_r'\}\subset B$ for $r\geq 3$ satisfy either that $(1,r-1)\sim_{A',B'}(2,r-2)\sim_{A',B'}\cdots\sim_{A',B'}(r-1,1)$ and $(1,r-2)\sim_{A',B'}(2,r-3)\sim_{A',B'}\cdots\sim_{A',B'}(r-2,1)$ or the analoguous condition with the antidiagonal above the principal antidiaongal. Then for all $1\leq i,j,k,l\leq r$, $(i,j)\sim_{A',B'}(k,l)\iff i+j=k+l$.
It turns out we can improve on this condition.
Antidiagonal Propagation (necessary condition for realizability of $\sim$)
There are two versions of antidiagonal propagation: the one described below where we consider a main antidiagonal and one below it, but one should add the other possibility too, where the smaller antidiagonal is above the larger one.

Antidiagonal Propagation. Suppose $A=\{a_1<a_2<\cdots<a_n\}$, $B=\{b_1<b_2<\cdots<b_n\}$ with $n=mT+r$ with $m+1\geq 3$, $T\geq 1$, $\newcommand{\T}{[\![1,T]\!]}r\in\T$. Suppose
$$\newcommand{\n}{[\![1,n]\!]}
\forall i,j\in\n,
\quad
\begin{cases}
i+j=n+1:& a_i+b_j=C\\
i+j=n+1-T:& a_i+b_j=D
\end{cases}$$
Then
$$\newcommand{\n}{[\![1,n]\!]}
\forall i,j,k,l\in\n,
\quad
\left\{
\begin{array}{l}
i\equiv k\mod T,\\
j\equiv l\,\mod T,\\
\text{and }i+j=k+l
\end{array}
\right\}
\implies (i,j)\sim_{A,B}(k,l)$$

In other words if $(i,j)$ and $(k,l)$ lie on the same antidiagonal and are a multiple of $T$ positions apart then they are $\sim_{A,B}$-equivalent.
Proof. The condition implies that, setting $\Delta=C-D$,
$$
\left\{
\begin{array}{lll}
a_{1+kT}=a_1+k\Delta, & b_{1+kT}=b_1+k\Delta & ~\text{for }k=0,1,\dots,m-1,m\\
a_{2+kT}=a_2+k\Delta, & b_{2+kT}=b_2+k\Delta & ~\text{for }k=0,1,\dots,m-1,m\\
\qquad\vdots&\qquad\vdots&\qquad\vdots\\
a_{r+kT}=a_r+k\Delta, & b_{r+kT}=b_r+k\Delta & ~\text{for }k=0,1,\dots,m-1,m\\[2mm]\hline
a_{r+1+kT}=a_{r+1}+k\Delta, & b_{r+1+kT}=b_{r+1}+k\Delta & ~\text{for }k=0,1,\dots,m-1\\
\qquad\vdots&\qquad\vdots&\qquad\vdots\\
a_{T+kT}=a_T+k\Delta, & b_{T+kT}=b_T+k\Delta & ~\text{for }k=0,1,\dots,m-1
\end{array}
\right.
$$
and thus if $i\equiv k\mod T$, say $i=IT+\tau$, $k=KT+\tau$, $j\equiv l\mod T$, say $j=JT+\sigma$, $l=LT+\sigma$, and $i+j=k+l$ i.e. $I+J=K+L$, then
$$
a_i+b_j
=
a_\tau+b_\sigma+(I+J)\Delta
=
a_\tau+b_\sigma+(K+L)\Delta
=
a_k+b_l
$$
Here is an illustration. You have two large equivalence classes:

You focus on the lines and columns that contain these equivalence classes and chuck the others out for now. Then there are some automatic equivalences depicted below. Equivalence classes are always subsets of antidiagonals, i.e. sets of the form $\{(i,j)\mid i+j=\mathrm{cst}\}$ and are color coded there. For extra clarity I've also added some markings to some of the equivalence classes. Funnily these look like designs straight out of the 1960ies and 1970ies.

Visibility (necessary condition for realizability of $<$)
There is an obvious necessary condition for a total order on $R_{p,q}/\sim$, where $\sim$ is realizable, to be realizable. Suppose $c,d$ are equivalence classes. We say that $d$ is visibly greater than $c$ if there exists some $i$ with $V_i$ intersecting both $c$ and $d$ and such that if $(i,a)\in c$ and $(i,b)\in d$ then $a<b$, or if there is some $j$ with $H_j$ intersecting both $c$ and $d$ and if $(a,j)\in c$ and $(b,j)\in d$ then $a<b$. We allow ourselves to say that $c$ is visibly greater than $d$ if there is a chain $c=c_0,c_1,\dots,c_n=d$ with $c_i$ visibly greater than $c_{i-1}$ (i.e. we consider the transitive closure of the previously defined relation).

Visibility. If $c$ is visibly greater than $d$ then $c<d$.

Visibility is a necessary property satisfied by realizable $<$ but it is not enough.
Counter Example for realizability of $<$
There's more to this, yet. Consider the following discrete equivalence relation (i.e. equivalence classes are singletons) and total order $<$. This total order satisfies all previously proposed conditions but can't arise as a $\sim_{A,B}$ and $<_{A,B}$.

Here's a simpler counter example showing that the individual $3\times 3$ orders are realized.

Horizontal and Vertical Coherence (necessary conditions for realizability of $<$)
The previous example shows that Visibility is not enough to characterize realizable orders. A problem arose where traversing too many horizontal gaps when following $<$ along equivalence classes led to inconsistencies in the values of those gaps. There are some horizontal and vertical consistency conditions that a realizable $<$ must satisfy. Let's start with Horizontal Consistency conditions. Take $(i,j)$ with $1<i$. The sum of the classes containing $(i-1,j)$ and $(i,j)$ differ by $(\Delta a)_i=a_i-a_{i-1}$. If we follow the $<$-path from the $\sim$-class containing $(i-1,j)$ to that containing $(i,j)$ we get
$$(\Delta a)_i=\text{sum of positive terms, some $(\Delta a)_{k}$, some $(\Delta b)_l$}$$
from which we extract a condition
$$H_{ij}:(\Delta a)_i>\text{sum of some $(\Delta a)_k$ and some $(\Delta b)_l$}$$
where the $(\Delta a)_k$ and $(\Delta b)_l$ to take into account are found using visibility relations. Similarly there are Vertical Consistency conditions of the same ilk
$$V_{ij}:(\Delta b)_j>\text{sum of some $(\Delta a)_k$ and some $(\Delta b)_l$}$$
where again, the $(\Delta a)_k$ and $(\Delta b)_l$ that appear on the right hand side are deduced from visibility relations along the $<$-path of equivalence classes linking the $\sim$ equivalence class containing $(i,j-1)$ to the $\sim$ equivalence class containing $(i,j)$

Beginnings of a positive solution for $p=2$
I believe the answer is positive to both questions at least when $p=2$. WLOG we can take $a_1=0$, $a_2=1$ and $b_0=0$. There seems to exist an explicit algorithm to find a rational solution to the problem. I've illustrated it below. The necessary and sufficient condition on $\sim$ in the case $p=2$ seems to be that the lines associated to $2$-element equivalence classes don't intersect. The algorithm is simple but I haven't conceptualized it really:

You start with $b_1=0$, the sum in the the lower left corner $(1,1)$ is thus $0$ since $a_1=0$
You put $1$ in the lower right corner $(2,1)$, the sum is $1$ since $a_2=1$
If the lower right corner is part of a $2$ element equivalence class you put are forced to attribute $1$ to the other member $(1,r)$.

if $r>2$ you set $b_r=1$. This is the case in the example below so you set $b_3=1$. Then you are forced to put a $2$ in position $(2,r)$ since $a_2=1$. You keep on going until you don't fall into a 2 element equivalence class.

Then you have to insert values for $b_2,\dots,b_{r-1}$. You pick them uniformly apart between $b_1=0$ and $b_r=1$, that is $b_k=\frac{k-1}r$.
Then you are forced to inscribe $b_k+1$ on the right hand side. If the right hand side is part of a $2$ element equivalence class you are forced to set the same value for some new $b_s$ etc ...

I hope the picture below (and the color coded rounds) are more explicit than the half-baked algorithm above.
I don't know if this will work for $p\geq 3$.

A connection with topology
$\newcommand{\O}{\mathcal{O}}\newcommand{\R}{\Bbb{R}}$
Fix $\sim$ an equivalence relation on $R_{p,q}$ and $<$ a total order on $R_{p,q}/\sim$. Define
$$\O_{p,q}[\sim,<]=\{(A,B)\in\O_p\times\O_q\text{ inducing $\sim$ and }<\}$$
where $\O_n=\{(x_1,\dots,x_n)\in\R^n\mid x_1<x_2<\cdots<x_n\}$. Then $\O_{p,q}[\sim,<]$ is nonempty iff $(\sim,<)$ is realizable. When it is nonempty it is a convex cell. The $\O_{p,q}[\sim,<]$ partition $\O_p\times\O_q\simeq \R^{p+q}$. It would be interesting to understand the poset structure associated to containment of closures of these. It seems natural to expect:

the poset structure is closely related to refinements of $(\sim,<)$;
maximal elements correspond to the discrete equivalence relation with the compatible total orders;
$(\sim_{A,B},<_{A,B})$ for $A=\{1<2<\cdots<p\}$ and $B=\{1<2<\cdots<q\}$ is minimal but there may be other minimal elements.

Let us put $\newcommand{\real}{\mathfrak{R}}\real_{p,q}$ the set of realizable pairs $(\sim,<)$. We define an order relation on $\real_{p,q}$ by setting
$$(\sim,<)\prec(\sim',<')\iff\text{there is an onto map of posets }
(R_{p,q}/\sim',<')\to(R_{p,q}/\sim,<)$$

Lemma. Let $(\sim,<),(\sim',<')\in\real_{p,q}$ be realizable. The following are equivalent:

$\overline{\O_{p,q}[\sim,<]}\subset\overline{\O_{p,q}[\sim',<']}$

$\O_{p,q}[\sim,<]\subset\overline{\O_{p,q}[\sim',<']}$

$\O_{p,q}[\sim,<]\cap\overline{\O_{p,q}[\sim',<']}\neq\emptyset$

$(\sim,<)\prec(\sim',<')$

Sketch of Proof. $1$ and $2$ are always equivalent and clearly imply $3$. If we let $(A_n',B_n')\in\O_{p,q}[\sim',<']$ tend to $(A,B)\in\O_{p,q}[\sim,<]$ then what can happen is fusion of $<'$-intervals of $\sim'$-equivalence relations and $<$ and $<'$ have to be compatible which amounts to the existence of an onto homomorphism. This will prove $3\implies 4$. To finish the proof we show that $4\implies 2$. It is enough to notice that if $(\sim,<)\prec(\sim',<')$ and $(A,B)\in\O_{p,q}[\sim,<]$ and $(A',B')\in\O_{p,q}[\sim',<']$ then for all $t\in[0,1)$, $$\qquad\qquad\qquad(tA+(1-t)A', tB+(1-t)B')\in\O_{p,q}[\sim',<'].\qquad\qquad\qquad\square$$
This has desirable homotopical consequences: one can use these cells to compute homotopy colimits of subcategories of the poset $(\real_{p,q,\prec})$ if one ever wanted to do so.

Sets where you have at most one pair from each equivalence class are called Sidon sets and there's huge theory behind them. Might be worth a shot to look into that

@SamuelMuldoon Thanks! I'm using Goodnotes on ipad

@OlivierBégassat The diagrams having a graph-paper/grid background are very pretty. What computer program did you use to draw those diagrams? I like how nice and straight the colored arrows are.

By the way, the slope condition is indeed sufficient in the p=2 case. I didn't write it into the question yet, but there is indeed an explicit algorithm in this case.

On the topic of negative slopes, I was thinking along similar lines but maybe not taking it as far as you suggest: I wanted to rename the Inclination property to Negative slope property which is the fact that the previously named sets are disjoint. I'll have to draw the map $F$ tomorrow to get a clearer picture of what you're suggesting.

@BenBlum-Smith I just saw your comments and only started reading them. On the unnaturality of horizontal / vertical sets: I agree, there is a better characterization purely in terms of $c^+$, $c$ and $c^-$ which is that these sets be disjoint. Let me read the rest of your comments : )

constraint on the slopes? Actually, I do believe so, i.e., any choice of a negative slope for each $s_{i,j}$ satisfying this set of "cross-product" constraints is realizable by a choice of $a_i$'s and $b_j$'s. So this constraint must give rise to the "antidiagonal propagation" property you picked up. Anyway, I'm optimistic that thinking this way can yield a cleaner characterization of permissible level curves, and these then characterize both the possible partitions and the orders they induce.

crosses these curves. The level curves are determined completely by the slope in each square $s_{i,j} := [i,i+1]\times [j,j+1]$. Besides always being negative, the slopes of the curves in the different squares are constrained by the fact that... ok for notational convenience define $d_i = a_{i+1}-a_i$, $\delta_j = b_{j+1}-b_j$, so the slope in $s_{i,j}$ is $-d_i/\delta_j$. Then because $(d_i/\delta_j)(d_k/\delta_\ell) = (d_i/\delta_\ell)(d_k/\delta_j)$, the slopes in $s_{i,j}$ and $s_{k,\ell}$ have to have the same product as the slopes in $s_{i,\ell}$ and $s_{k,j}$. Perhaps this is the only

rectangle $[1,p]\times [1,q]$, you can see their shape: they're all defined by piecewise-linear functions with each linear segment having negative slope: a level set's intersection with the square $[i,i+1]\times[j,j+1]$ will have slope $-(a_{i+1}-a_i)/(b_{j+1}-b_j)$ if I'm thinking about this right. Level sets can change slope only when they cross from one of these squares to another. A partition is realizable iff it can be obtained by drawing the appropriate kinds of level curves across the diagram. The order such a partition realizes is the order in which any path from $(1,1)$ to $(p,q)$

be the PL function that linearly interpolates $j\mapsto b_j$. Then the mapping $F$ defined by $(x,y)\mapsto (f(x),g(y))$ is a PL function from the rectangle $[1,p]\times[1,q]$ to the rectangle $[a_1,a_p]\times [b_1,b_q]$. The set $R_{p,q}$ is the set of integer lattice points in the domain of $F$. Let $S:\mathbb{R}^2\rightarrow\mathbb{R}$ be the linear function $(x,y)\mapsto x+y$. Then the equivalence classes of $R_{p,q}$ given by these choices of $a_i$ and $b_j$ are the level sets of $S\circ F$ restricted to $R_{p,q}$. If you don't restrict to $R_{p,q}$ but consider level sets on the whole

@OlivierBégassat - Okay, I just spent far longer thinking about this than I probably should've lol. I don't have a complete answer but my guess is that if your conditions aren't sufficient, they're pretty close; however, I think your focus on the horizontal and vertical sets is unnatural, and there will be a cleaner (complete) characterization that doesn't look at them. I think the following way of thinking is useful, though I haven't played it all the way out: Let $f:[1,p]\rightarrow[a_1,a_p]$ be the PL function that linearly interpolates $i\mapsto a_i$, and let $g:[1,q]\rightarrow[b_1,b_q]$

I haven't given this more than cursory thought, but I think the answer to (2) has to be affirmative. A given realizable equivalence relation is defined by a finite system of linear equalities and inequalities with integer coefficients. If there is any solution, there is a rational solution; then multiply through by a common denominator to get integers, and add a big integer to everything to get nonnegative integers.

@OlivierBégassat Which program did you use to draw the diagrams?

To give even further context, the question arose when thinking about Exercise 3.5 in Eisenbud's Commutative Algebra with a View Toward Algebraic Geometry ... I have been learning commutative algebra and algebraic geometry in my free time in the hopes of understanding elliptic curves. This is an idle question that came up in that effort which really caught my attention for the last 2-3 days.

@Christoph I debated including my motivation for the question but decided against it. It seemed like a problem of independent interest more related to the topology of the real line than to graded modules and rings. I can always include my motivation into the post if you see value in it.

@Christoph It came up when thinking about graded modules $M=\bigoplus_{\lambda\in\Lambda} M_\lambda$ over a graded ring $R=\bigoplus_{\gamma\in\Gamma}$ and thinking about the possible ways in which $R_\gamma \cdot M_\lambda \subset M_{\mu}$ can happen. I drew pictures and was led to drawing blob diagrams of the sort pictured above. I realized that there was a combinatorial question of interest and tried answering that. This led to the question.

This question is certainly elaborated and it took time and work to write it out, which is why I'm hesitant to vote to close it. Yet, I agree with @Nij that it is not the type of question suited for MSE. It looks more like a full (small) research project. Indeed, despite being extraordinarily long it misses important context: where did you come across this problem and why is it relevant to you?

@Nij There are really three questions: (1) characterize realizable $\sim$ (2) decide if realizable $\sim$ can be realized with sets of integers and (3) characterize realizable $<$. These questions don't require a build up beyond the definitions given in the first paragraph and are related enough that batching them up in a single post makes sense IMO.  The other points are proposals for a characterization and these do require definitions, which is what I provide along with some illustrations. Everything beyond the three questions above represents my work and partial progress.

How is this remotely a question for Maths SE? There are at least four separate questions, each of which has more buildup than is expected of a single whole question here. At the very least break it up into the four parts. No question short of a thesis would sufficiently answer all four, and no answer that fully addresses just one could be compared to that which answers one other.

I guess what I'm getting at is that there is a stratification on the set $\mathcal{O}^2$ where $\mathcal{O}=\{(x_1<\cdots<x_n)\in\Bbb{R}^n\}$ where strata are defined by the requirement that $(a,b)\in\mathcal{O}^2$ define the same equivalence relation. And then there should be some relation between closures of strata and refinement of the associated equivalence relations.

@ErickWong Additive combinatorics makes sense. The connection with configuration spaces is indeed debatable. I included it because (a) it somehow reminded me of Fox Neuwirth cells and (b) I imagine that if one were to consider refinement of these equivalence relations then refinement would be related to closure of sets of pairs of n-tuples defining the same equivalence relation.

I tagged additive-combinatorics since this seems closely related to additive energy.  I’m afraid I don’t see the connection to configuration spaces.


Does there exist a polynomial $P(x,y)$ which detects all non-squares?

Problem. Does there exist a two-variable polynomial $P(x, y)$ with integer coefficients such that a positive integer $n$ is not a perfect square if and only if there is a pair $(x, y)$ of positive integers such that $P(x, y)=n$?
Context. The answer is positive for polynomials in 3 variables! This appeared as a problem in USA Team Selection Test in 2013. It turns out that the polynomial $P(x, y, z)=z^2\cdot (x^2-zy^2-1)^2+z$  enjoys the following property: a positive integer $n$ is a not a perfect square if and only if $P(x, y, z)=n$ has a solution in positive integers $(x, y, z)\in \mathbb{N}^{3}$. This construction works nicely due to Pell's equation. If $n$ is not a perfect square, then Pell's equation $x^2-ny^2=1$ has a solution in positive integers $(x_0, y_0)$, and so we get $P(x_0, y_0, n) = n$. Conversely, if $P(x, y, z)=n$, then one can show that $n$ cannot be a perfect square because $n=z^2(x^2-zy^2-1)^2+z$ can be squeezed between two consecutive perfect squares:
$$
 (z(x^2-zy^2-1))^2 < n < (z(|x^2-zy^2-1|+1)^2
$$
Remark. It is clear that there is no single-variable polynomial $P(x)$ which could achieve the desired property. Indeed, there are arbitrary number of consecutive non-squares, and a polynomial $P(x)$ of degree $n>1$ cannot output a consecutive list of $n+1$ numbers. This last claim itself is a nice problem; for a solution, see Example 2.24 in page 11 of Number Theory: Concepts and Problems by Andreescu, Dospinescu and Mushkarov.

@Sil Great suggestion! Just posted the problem on MathOverFlow at this link.

Interesting problem, you might want to consider asking on MathOverflow as it was not resolved here even after bounty.

I cannot answer the above question but I can say that every odd square can be represented by $P(x,y)=(x+y)^2=x^2 + 2xy +y^2$ with $xy=2T_n$ with $T_n$ twice a triangular number and also $y=x+1$. Ex: $81=9^2=(4+5)^2=4^2 + 2*4*5 + 5^2$. Example of P(x,y) for a non-square: $73=(72/2 + 74/2)=1+2*18+6^2$. Note that $18$ is not twice a triangular number. This means than non-squares can be represented by $P(x,y)$ but $x$ and $y$ will necessarily differ by more than $1$. If $(N-1)/2$ is odd, the number can never be a square. Ex $71$ with $(71-1)/2=35$ or $91$ with $(91-1)/2=45$.

A possibly helpful note: This can be done with two very similar polynomials $P_1(x,y)=(x+y-1)^2+y$ and $P_2(x,y)=(x+y-1)^2+(x+y-1)+y$. These two polynomials have disjoint images, with $\operatorname{Im}(P_1)\cup \operatorname{Im}(P_2)$ representing all non-squares: the image of $P_1$ is the union of the intervals $[n^2+1,n^2+n]$ for each $n\geq 1$, while the image of $P_2$ is the union of the intervals $[n^2+n+1,n^2+2n]$ for each $n\geq 1$. (This can be used to construct a $3$-variable polynomial $$P(x,y,z)=\big(1-(z-1)(z-2)\big)\big((x+y-1)^2+(z-1)(x+y-1)+y\big)$$ with the desired property.


The sequence $\,a_n=\lfloor \mathrm{e}^n\rfloor$ contains infinitely many odd and infinitely many even terms

PROBLEM. Show that the sequence $\,a_n=\lfloor \mathrm{e}^n\rfloor$ contains infinitely many odd and infinitely many even terms.
It suffices to show that the terms of the sequence
$$\,b_n=\mathrm{e}^n\,\mathrm{mod}\, 2,\,\,\,n\in\mathbb N,$$
are dense in $[0,2]$.
Unfortunately, Weyl's Theorem does not look helpful in this case.
EDIT. As Chris Culter said, the claim that the terms of the sequence
$$\,b_n=\mathrm{e}^n\,\mathrm{mod}\, 2,\,\,\,n\in\mathbb N,$$
are dense in $[0,2]$ is (or might be) an open problem. Nevertheless, this does not imply that the claim that the sequence $\,a_n=\lfloor \mathrm{e}^n\rfloor$ contains infinitely many odd and infinitely many even terms is necessarily an open problem as well. It is also noteworthy that it is relatively easy to construct an irrational $\alpha$ with the property that the sequence $\,\alpha^n\,\mathrm{mod}\, 2,\,\,n\in\mathbb N,$ is NOT dense in $[0,2]$.

For any $a\in\mathbb N$, $\lfloor a^n\rfloor$ will have the same parity as $a$. For $0 < a < 1$ we always have $\lfloor a^n\rfloor = 0$. But for any other values of $a$ I don't see obvious way to prove or disprove the property from the problem. Maybe it has nothing to do specifically with $e$ and a proof would cover a class of reals (potentially all non-integers $>1$ ?).

Exercises for university students? Seems hard. The sequence is tabulated at oeis.org/A000149 but I don't think anything at that page helps to resolve the question.

I had found it in a Greek site with Mathematical problems for university students.

What's the source of this question, please?

@MathematicsStudent1122 Does "look" helpful, but not really helpful.

If $e^n$ is dense modulo $2$, then it is also dense modulo $1$, yet the latter is an open problem, at least circa 2003 per this paper.


Is every finite list of integers coprime to $n$ congruent $\pmod n$ to a list of consecutive primes?

For example the list $(2, 1, 2, 1)$ is congruent $\pmod 3$ to the consecutive primes $(5, 7, 11, 13)$. But how about the list $(1,1,1,1,1,1,1,1,2,3,4,3,2,3,1) \mod 5$?
More generally, we are given some integer $n \geq 2$ and a finite list of integers that are coprime to and less than $n$. Is it always possible to produce the same list by consecutive primes $\pmod n$?
Formally: given $n \geq 2$ and $(a_0,a_1,\cdots \,a_k)$ such that for all $i$, $GCD(a_i, n) = 1$, is there a list of consecutive primes such that each $p_i \equiv a_i \pmod  n$?

For those seeking Shiu's paper, here is the citation: Shiu, D.K.L. (2000), Strings of Congruent Primes. Journal of the London Mathematical Society, 61: 359-373. doi.org/10.1112/S0024610799007863

Very interesting question. Just as an observation, if we took $n$ to be a prime and a finite list of values less than $n$ as stated in the problem and if the list of values is congruent to successive primes mod $n$, then we could encode that entire list using just the initial prime's index and deterministically recover the elements of the list with no additional information (except the size of the list). Perhaps, this is intricately linked to Shannon Entropy.

@RushabhMehta How is that Greenwood-Tao result an advance on Dirichlet's theorem that every AP of integers $a, a+d,\dots$ with $d>0$ coprime to $a$ contains arbitrarily many primes?

I Think the question is more interesting if we consider the case where $n$ is a prime itself.

What about using a generalized Dirichlet series but with multiple entries, i.e. characters $\chi: (\mathbb{Z}/n\mathbb{Z} )^* \times \ldots \times (\mathbb{Z}/n\mathbb{Z} )^* \to \mathbb{C}^*$ ? I just don't know how to implement the "consecutive primes" constraint..

Well lets first note, that even residues modulo odd $n$ aren't possible to be prime unless the multiplier on $n$ is odd. Likewise, odd residues aren't representing primes unless the multiplier on $n$ is even in this case. This at least forces gap size constraints (1,4,2,3) mod 5 won't happen below gap sizes 8,8,6 with gaps 3 mod 5, 3 mod 5, and 1 mod 5 Your long one needs gaps of 10,10,10,10,10,10,10,6,6,6,4,4,6,8

@cr001 Can't find a wiki link. TLDR, it was proven by Daniel Shiu in the 90s, and the statement is as follows: for any coprime $a,b\in\mathbb N$, there exists arbitrarily long sequences of consecutive primes, all congruent to $a\bmod b$. Similar but different than Greenwood-Tao, which doesn't require consecutiveness of the primes.

Is there a Wikipedia link to the Shiu Theorem? I wan't able to find any statement of the Theorem via google search.

For the record, you can find $\{1,1,1,1,1,1,1,1,2,3,4\} \pmod {5}$ starting at $1313286451$, which looks about in line with what I'd expect from the random model. So yeah, it certainly seems likely to me that arbitrarily long sequences of this sort exist.

This is an open problem except in the case where all $a_i$ are equal, which is a famous theorem of Shiu.  There are a few other cases that are consequently true for simple combinatorial reasons, such as $(1,1,1,1,1,1,1,1,2)$ mod $3$, but essentially Shiu's theorem is the best we have, AFAIK.

Very interesting question. Altough I would be surprised if this wasn't true, I would be even more surprised if there was an easy proof.

No, for example $(2, 2) \pmod 4$ would require two even primes. The question might be more interesting if you require that entries in the list are coprime with $n$ (a generalization of disallowing 0).


Are these generalizations known in the literature?

By using
$$\int_0^\infty\frac{\ln^{2n}(x)}{1+x^2}dx=|E_{2n}|\left(\frac{\pi}{2}\right)^{2n+1}\tag{a}$$
and
$$\text{Li}_{a}(-z)+(-1)^a\text{Li}_{a}(-1/z)=-2\sum_{k=0}^{\lfloor{a/2}\rfloor }\frac{\eta(2k)}{(a-2k)!}\ln^{a-2k}(z)\tag{b}$$
I managed to find:
$$\int_0^\infty\frac{\ln^{2n}(x)}{1+yx^2}dx=\frac{\left(\frac{\pi}{2}\right)^{2n+1}}{\sqrt{y}}\sum_{k=0}^n\binom{2n}{2k}|E_{2n-2k}|\pi^{-2k}\ln^{2k}(y)\tag{c}$$

$$\int_0^\infty\frac{\ln^{2n-1}(x)}{1+yx^2}dx=\frac{-\left(\frac{\pi}{2}\right)^{2n-1}}{2\sqrt{y}}\sum_{k=0}^{n-1}\binom{2n-1}{2k+1}|E_{2n-2k-2}|\pi^{-2k}\ln^{2k+1}(y)\tag{d}$$

$$\int_0^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx=|E_{2n}|\left(\frac{\pi}{2}\right)^{2n+1}\zeta(2a+1)$$
$$-\frac{\left(\frac{\pi}{2}\right)^{2n+1}}{(2a)!}\sum_{k=0}^n \binom{2n}{2k}|E_{2n-2k}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)\tag{e}$$

$$\int_0^\infty\frac{\ln^{2n-1}(x)\text{Li}_{2a}(-x^2)}{1+x^2}dx=\frac{-\left(\frac{\pi}{2}\right)^{2n-1}}{2(2a-1)!}*$$
$$\sum_{k=0}^{n-1} \binom{2n-1}{2k+1}|E_{2n-2k-2}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)\tag{f}$$

$$\int_0^1\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx=\frac12|E_{2n}|\left(\frac{\pi}{2}\right)^{2n+1}\zeta(2a+1)$$
$$-\frac{\left(\frac{\pi}{2}\right)^{2n+1}}{2(2a)!}\sum_{k=0}^n \binom{2n}{2k}|E_{2n-2k}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)$$
$$+2\sum_{k=0}^a\frac{(2k+2n+1)!}{(2k+1)!}4^k \eta(2a-2k)\beta(2k+2n+2)\tag{g}$$

$$\int_0^1\frac{\ln^{2n-1}(x)\text{Li}_{2a}(-x^2)}{1+x^2}dx=$$
$$\frac{-\left(\frac{\pi}{2}\right)^{2n-1}}{4(2a-1)!}\sum_{k=0}^{n-1} \binom{2n-1}{2k+1}|E_{2n-2k-2}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)$$
$$+\sum_{k=0}^a\frac{(2k+2n-1)!}{(2k)!}4^k \eta(2a-2k)\beta(2k+2n)\tag{h}$$

$$\sum_{k=1}^\infty\frac{(-1)^k H^{(2a+1)}_k}{(2k+1)^{2n+1}}=\frac1{2(2n)!}|E_{2n}|\left(\frac{\pi}{2}\right)^{2n+1}\zeta(2a+1)$$
$$-\frac{\left(\frac{\pi}{2}\right)^{2n+1}}{2(2n)!(2a)!}\sum_{k=0}^n \binom{2n}{2k}|E_{2n-2k}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)$$
$$+\frac{2}{(2n)!}\sum_{k=0}^a\frac{(2k+2n+1)!}{(2k+1)!}4^k \eta(2a-2k)\beta(2k+2n+2)\tag{i}$$

$$\sum_{k=1}^\infty\frac{(-1)^k H^{(2a)}_k}{(2k+1)^{2n}}=\frac{\left(\frac{\pi}{2}\right)^{2n-1}}{4(2n-1)!(2a-1)!}*$$
$$\sum_{k=0}^{n-1} \binom{2n-1}{2k+1}|E_{2n-2k-2}|\pi^{-2k}(2a+2k)!(2^{2k+2a+1}-1)\zeta(2k+2a+1)$$
$$-\frac{1}{(2n-1)!}\sum_{k=0}^a\frac{(2k+2n-1)!}{(2k)!}4^k \eta(2a-2k)\beta(2k+2n)\tag{j}$$

Question: Are the results of $(c)$ to $(j)$ known in the literature?
If the reader is curious about the correctness of the results above and wants to verify them on Mathematica, the Mathematica command of $|E_r|$ is Abs[EulerE[r]]
Thanks,

Proof of (a): By using Euler's reflection formula
$$\Gamma(m)\Gamma(1-m)=\pi \csc(m\pi),\quad m\notin\mathbb{Z}$$
and beta function
$$\operatorname{B}(a,b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}=\int_0^\infty \frac{x^{a-1}}{(1+x)^{a+b}}dx$$
with $a=m$ and $b=1-m$, we have
$$\pi\csc(m\pi)=\int_0^\infty\frac{x^{m-1}}{1+x}dx$$
differentiate both sides $2n$ times with respect to $m$ then let $m$ approach $1/2$
$$\int_0^\infty\frac{\ln^{2n}(x)}{1+x^2}dx=\frac{\pi}{2^{2n+1}}\lim_{m\to \frac12}\frac{d^{2n}}{dm^{2n}}\csc(m\pi)$$
the proof completes on using
$$\lim_{m\to \frac12}\frac{d^{2n}}{dm^{2n}}\csc(m\pi)=|E_{2n}|\pi^{2n}$$
which is explained here.

Proof of (b): Divide both sides of the common dilogarithm identity
$$\text{Li}_2(-z)+\text{Li}_2(-1/z)=-\frac{\ln^2(z)}{2}-2\eta(2)$$
by $z$ then integrate repeatedly.

Proof of (c): Let $yx^2=t^2$,
$$\int_0^\infty\frac{\ln^{2n}(x)}{1+yx^2}dx=\frac{1}{\sqrt{y}}\int_0^\infty\left(\ln(\sqrt{y})-\ln(t)\right)^{2n}\frac{dt}{1+t^2}$$
$$=\frac{1}{\sqrt{y}}\int_0^\infty\left(\sum_{k=0}^{2n} \binom{2n}{k}(-\ln(t))^{2n-k}\ln^k(\sqrt{y})\right)\frac{dt}{1+t^2}$$
$$=\frac1{\sqrt{y}}\sum_{k=0}^{2n}\binom{2n}{k}\ln^k(\sqrt{y})\int_0^\infty\frac{(-\ln(t))^{2n-k}}{1+t^2}dt$$
Since we care for only the even powers of $\ln(t)$ as the odd powers make the integral zero, we have
$$\sum_{k=0}^{2n}f(k)=\sum_{k=0}^n f(2k)$$
and so
$$\int_0^\infty\frac{\ln^{2n}(x)}{1+yx^2}dx=\frac1{\sqrt{y}}\sum_{k=0}^{n}\binom{2n}{2k}\ln^{2k}(\sqrt{y})\int_0^\infty\frac{\ln^{2n-2k}(t)}{1+t^2}dt$$
The proof completes on using the result in $(a)$.

Proof of (d): We follow the same steps in proof $(c)$:
$$\int_0^\infty\frac{\ln^{2n-1}(x)}{1+yx^2}dx=\frac{-1}{\sqrt{y}}\int_0^\infty\left(\ln(\sqrt{y})-\ln(t)\right)^{2n-1}\frac{dt}{1+t^2}$$
$$=\frac{-1}{\sqrt{y}}\int_0^\infty\left(\sum_{k=0}^{2n-1} \binom{2n-1}{k}(-\ln(t))^{2n-k-1}\ln^k(\sqrt{y})\right)\frac{dt}{1+t^2}$$
$$=\frac{-1}{\sqrt{y}}\sum_{k=0}^{2n-1}\binom{2n-1}{k}\ln^k(\sqrt{y})\int_0^\infty\frac{(-\ln(t))^{2n-k-1}}{1+t^2}dt$$
Since we care for only the even powers of $\ln(t)$, we have
$$\sum_{k=0}^{2n-1}f(k)=\sum_{k=0}^{n-1} f(2k+1)$$
and so
$$\int_0^\infty\frac{\ln^{2n-1}(x)}{1+yx^2}dx=\frac{-1}{\sqrt{y}}\sum_{k=0}^{n-1}\binom{2n-1}{2k+1}\ln^{2k+1}(\sqrt{y})\int_0^\infty\frac{\ln^{2n-2k-2}(t)}{1+t^2}dt$$
The proof completes on using the result in $(c)$.

Proof of (e): Using the integral representation of the polylogarithm function:
$$\text{Li}_{a}(z)=\frac{(-1)^{a-1}}{(a-1)!}\int_0^1\frac{z\ln^{a-1}(t)}{1-zt}dt$$
We have
$$\int_0^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx=\int_0^\infty\frac{\ln^{2n}(x)}{1+x^2}\left(\frac{1}{(2a)!}\int_0^1\frac{-x^2\ln^{2a}(y)}{1+yx^2}dy\right)dx$$
$$=\frac{1}{(2a)!}\int_0^1\ln^{2a}(y)\left(\int_0^\infty\frac{-x^2\ln^{2n}(x)}{(1+x^2)(1+yx^2)}dx\right)dy$$
$$=\frac{1}{(2a)!}\int_0^1\frac{\ln^{2a}(y)}{1-y}\left(\int_0^\infty\frac{\ln^{2n}(x)}{1+x^2}dx-\int_0^\infty\frac{\ln^{2n}(x)}{1+yx^2}dx\right)dy$$
use $(a)$ and $(c)$ for the inner integrals
$$=\frac{\left(\frac{\pi}{2}\right)^{2n+1}}{(2a)!}\left(|E_{2n}|\int_0^1\frac{\ln^{2a}(y)}{1-y}dy-\sum_{k=0}^n\binom{2n}{2k}|E_{2n-2k}|\pi^{-2k}\int_0^1\frac{\ln^{2k+2a}(y)}{\sqrt{y}(1-y)}dy\right)$$
The proof completes on using:
$$\int_0^1\frac{\ln^a(x)}{1-x}dx=(-1)^aa!\zeta(a+1)$$
$$\int_0^1\frac{\ln^a(x)}{\sqrt{x}(1-x)}dx=(-1)^aa!(2^{a+1}-1)\zeta(a+1)$$

Proof of (f): Following the same steps in proof $(e)$:
$$\int_0^\infty\frac{\ln^{2n-1}(x)\text{Li}_{2a}(-x^2)}{1+x^2}dx=\int_0^\infty\frac{\ln^{2n-1}(x)}{1+x^2}\left(\frac{1}{(2a-1)!}\int_0^1\frac{x^2\ln^{2a-1}(y)}{1+yx^2}dy\right)dx$$
$$=\frac{1}{(2a-1)!}\int_0^1\ln^{2a-1}(y)\left(\int_0^\infty\frac{x^2\ln^{2n-1}(x)}{(1+x^2)(1+yx^2)}dx\right)dy$$
$$=\frac{1}{(2a-1)!}\int_0^1\frac{\ln^{2a-1}(y)}{1-y}\left(\int_0^\infty\frac{\ln^{2n-1}(x)}{1+yx^2}dx-\int_0^\infty\frac{\ln^{2n-1}(x)}{1+x^2}dx\right)dy$$
substitute $(d)$ and notice that the second inner integral is zero
$$=\frac{-\left(\frac{\pi}{2}\right)^{2n-1}}{2(2a-1)!}\sum_{k=0}^{n-1}\binom{2n-1}{2k+1}|E_{2n-2k-2}|\pi^{-2k}\int_0^1\frac{\ln^{2k+2a}(y)}{\sqrt{y}(1-y)}dy$$
The proof completes on using
$$\int_0^1\frac{\ln^a(x)}{\sqrt{x}(1-x)}dx=(-1)^aa!(2^{a+1}-1)\zeta(a+1)$$

Proof of (g):
$$\int_0^1\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx=\int_0^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx-\underbrace{\int_1^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx}_{x\to1/x}$$
$$=\int_0^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx-\int_0^1\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-1/x^2)}{1+x^2}dx$$
add the integral to both sides
$$2\int_0^1\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx=\int_0^\infty\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx$$
$$+\int_0^1\frac{\ln^{2n}(x)[\text{Li}_{2a+1}(-x^2)-\text{Li}_{2a+1}(-1/x^2)]}{1+x^2}dx$$
the first integral is given in $(e)$. For the second integral, replace $a$ by $2a+1$ in $(b)$ then use $\sum_{k=m}^na_k=\sum_{k=m}^{n}a_{n-k+m}$
$$\text{Li}_{2a+1}(-z)-\text{Li}_{2a+1}(-1/z)=-2\sum_{k=0}^a \frac{\eta(2a-2k)}{(2k+1)!}\ln^{2k+1}(z)$$
and so
$$\int_0^1\frac{\ln^{2n}(x)[\text{Li}_{2a+1}(-x^2)-\text{Li}_{2a+1}(-1/x^2)]}{1+x^2}dx=-4\sum_{k=0}^a\frac{\eta(2a-2k)}{(2k+1)!}4^k\int_0^1\frac{\ln^{2k+2n+1}(x)}{1+x^2}dx$$
and the proof completes on using
$$\int_0^1\frac{\ln^a(x)}{1+x^2}dx=(-1)^a a! \beta(a+1)$$

Proof of (h): We follow exactly the same steps in proof $(g)$ but here we use
$$\text{Li}_{2a}(-z)+\text{Li}_{2a}(-1/z)=-2\sum_{k=0}^a \frac{\eta(2a-2k)}{(2k)!}\ln^{2k}(z)$$

Proof of (i) and (j): Using the generating function
$$\sum_{k=1}^\infty H_k^{(a)} x^k=\frac{\text{Li}_a(x)}{1-x}$$
and the fact that
$$\int_0^1 x^{k}\ln^n(x)dx=\frac{(-1)^nn!}{(k+1)^{n+1}}$$
we have:
$$\sum_{k=1}^\infty\frac{(-1)^k H^{(2a+1)}_k}{(2k+1)^{2n+1}}=\frac1{(2n)!}\int_0^1\frac{\ln^{2n}(x)\text{Li}_{2a+1}(-x^2)}{1+x^2}dx$$
$$\sum_{k=1}^\infty\frac{(-1)^k H^{(2a)}_k}{(2k+1)^{2n}}=\frac{-1}{(2n-1)!}\int_0^1\frac{\ln^{2n-1}(x)\text{Li}_{2a}(-x^2)}{1+x^2}dx$$
These two integrals are given in $(g)$ and $(h)$.

Edit 3/26/2024
More generalized polylogarithmic integrals can be found in this preprint.

Thanks for great effort in exploring to such an amazing depth!

@AliShadhar Thank you so much for your comment. I meant significance in a broad sense... Have similar identities been applied in other areas of math (to give better approximation or better bounds, etc)?

I'm sorry for my limited understanding, but can somebody elaborate on the significance of these identities (besides their novelty)?

It might be interesting to know that these results have been submitted virtually literally by a group of authors to a scientific journal 25 days after the publication here and have been published without mentioning the source. I wrote an e-mail to the responsible author pointing out this violation of the scientific code of conduct. He replied finally, quote, "I have e-mailed the editor in chief of the journal asking him to retract the paper."

Oh yes, now these generalizations are known in the (online) literature  !!

(+1) Great work. Nice proofs, and nicely laid out, as you always do. I'll put a printout into my copy of your book.

Nice results . We can find a recursive relationship using complex analysis

(+1) Great pack of results to have in hand and refer to! :-)