# The signed descent count of two-row permutation tables: generating function 1/(1 - (x/sqrt 2) tanh(sqrt 2 x)) (MO 302273)

iis:2612.00601 · by devsingh-lab · https://isitsolved.com/journal/a9aad8accf78

**Abstract.** MathOverflow question 302273 fills a 2 x N table with 1, ..., 2N and counts descents as pairs formed by an entry and a smaller entry in the next column. It asks for D_N, the number of tables with an even number of descents minus the number with an odd number (2, 8, 144, 3200, 152320, 8672256 for N = 1..6), and for its generating function. We prove that the exponential generating function sum D_N x^(2N)/(2N)! equals 1/(1 - (x/sqrt 2) tanh(sqrt 2 x)), and that D_N = 2^N + sum over j = 2..N of binomial(2N, 2j) (j - 1) 2^j D_(N-j), so D_N is positive for every N. The proof represents each column by a random chord of a circle; consecutive columns contribute a minus sign exactly when their chords cross, which gives the kernel K(u, v) = 1 - 2 min(u, v) and an integral equation solved by an ordinary differential equation. Positivity alone already follows from the work of Celano, Sieger and Spiro on digraph Eulerian polynomials at -1 (arXiv:2309.07240); the explicit generating function and recurrence appear to be new. The question's other parts, a pairing of odd tables with even ones and the case of more rows, are not addressed. Written proof, checked by a second reader, with two independent exact computations for N <= 6; not formalised in Lean.

# The parity of descents in a two-row permutation table

**Theorem.** $\sum_{N\ge0}D_N\,x^{2N}/(2N)!=\dfrac{1}{1-(x/\sqrt2)\tanh(\sqrt2\,x)}$ and $D_N=2^N+\sum_{j=2}^N\binom{2N}{2j}(j-1)2^jD_{N-j}$. Written proof with exact computer checks; not machine-checked in Lean.


An answer to the generating-function part of [MathOverflow question 302273](https://mathoverflow.net/questions/302273).

Fill a two-row, $N$-column table with $1,\ldots,2N$, using each label once. A descent is a pair consisting of an entry in column $j$ and a smaller entry in column $j+1$, in any rows. Let $D_N$ count the tables with an even number of descents minus those with an odd number, and let $D_0=1$. The author asked for this difference and its generating function, then asked whether it is always positive. [Original question](https://mathoverflow.net/questions/302273/permutation-statistics-in-multiple-rows) · [Author’s cross-post](https://math.stackexchange.com/questions/2810939/permutation-statistics-in-multiple-rows)

**Result.** The exponential generating function by number of labels is
$$
 \sum_{N\ge0}D_N\frac{x^{2N}}{(2N)!}
 =\frac{1}{1-(x/\sqrt2)\tanh(\sqrt2\,x)} .
$$
The coefficients admit a positive integer recurrence
$$
 D_N=2^N+\sum_{j=2}^N\binom{2N}{2j}(j-1)2^jD_{N-j}\qquad(N\ge1).
$$
In particular even tables strictly outnumber odd tables for every $N$ (this positivity also follows from Celano, Sieger and Spiro; see below). If entries within each column are identified under swapping, divide $D_N$ by $2^N$, since the swap action is free and preserves every intercolumn descent count.

## From columns to chords

Place two independent uniform points of $[0,1)$ in each column and rank all the points. Every labelled table then has probability $1/(2N)!$. Regard $[0,1)$ as a circle with its cut at zero and join the two points of each column by a chord. For two consecutive columns, write their letters as $A,B$ in increasing order of the four points. The intercolumn sign is negative precisely for $ABAB$ and $BABA$: the other four words have an even number of inversions. These two negative cases are exactly the crossing chords. Thus the normalized signed count is the expected product of the signs for consecutive chords.

Encode a chord by the length $s\in[0,1/2]$ of its shorter arc and the clockwise starting point of that arc. The directed spacing between two independent endpoints is uniform on $[0,1)$, so $u=2s$ is uniform on $[0,1]$. Conditional on $s$, rotation invariance makes the starting point uniform on the circle. Different columns are independent.

Fix an arc of length $s$ and a second arc of length $t\le1/2$ with uniformly rotated start. The chords cross if exactly one endpoint of the second arc lies in the first. The two sets of possible starts making either endpoint lie inside have measure $s$ each and overlap of measure $\max(s-t,0)$, since $s+t\le1$. Their symmetric difference therefore has measure $2\min(s,t)$. In variables $u=2s,v=2t$, the conditional mean sign is
$$
 K(u,v)=1-2\min(u,v).
$$
For a chain of several chords, integrate from its last chord toward its first. Conditional on the preceding chord, the integral over the last rotation depends only on their lengths. Iteration gives the product of these kernels integrated over independent uniform lengths. This successive conditioning justifies the calculation even though neighboring comparisons share a chord.

## Solving the integral equation

Use the same letter $K$ for the integral operator on $[0,1]$. For $N\ge1$ the preceding calculation reads
$$
 \frac{D_N}{(2N)!}=\int_0^1 (K^{N-1}1)(u)\,du.
$$
For $|z|<1$, $y=\sum_{j\ge0}z^j K^j1$ converges uniformly since $|K|\le1$; it solves $y=1+zKy$. At $u=0$, $K(0,v)=1$, hence $y(0)=1+\sum_{N\ge1}z^N D_N/(2N)!$.

Differentiating the integral equation gives $y'(u)=-2z\int_u^1y(v)\,dv$ and $y''=2zy$. The two boundary conditions are $y'(1)=0$ and $y'(0)=-2(y(0)-1)$. For small real $z>0$ set $a=\sqrt{2z}$. The first boundary condition gives $y(u)=c\cosh(a(1-u))$. The second gives $c(2\cosh a-a\sinh a)=2$. Thus $y(0)=1/(1-(a/2)\tanh a)$. Analyticity at zero gives equality of Taylor coefficients; substituting $z=x^2$ yields the claimed formula.

Finally multiply the generating function by $\cosh(\sqrt2 x)-(x/\sqrt2)\sinh(\sqrt2 x)$. The result is $\cosh(\sqrt2 x)$. The multiplier has exponential coefficient $(1-j)2^j$ at degree $2j$, including $j=0$. Comparing degree $2N$ gives the recurrence and strict positivity by induction.

## Verification and prior work

An independent subset dynamic program chooses the two labels of each new column and computes its four comparisons directly. It agrees with the recurrence for all six values printed in the question: $2,8,144,3200,152320,8672256$. The next three values **from the proved recurrence** are $785483776,84779761664,12528918134784$. [Exact verifier](https://github.com/DevSingh05/mo-302273-two-row-descents/blob/main/verify-302273.js). A second program written independently by the referee, [brute_force.py](https://github.com/DevSingh05/mo-302273-two-row-descents/blob/main/brute_force.py), enumerates all $(2N)!$ fillings for $N\le5$ and column pairs for $N=6$ and gets the same six numbers.

**Scope.** The question has three parts. (a) The signed count and its generating function: answered here, for every width. (b) General results for more than two rows: not addressed. (c) A pairing of each odd table with a distinct even table: not given; positivity is proved analytically, through the recurrence.

**Prior work.** The graph with four directed edges from each column to the next makes $D_N$ a digraph Eulerian polynomial evaluated at $-1$. Celano, Sieger and Spiro ([arXiv:2309.07240](https://arxiv.org/abs/2309.07240)) show that for bipartite graphs this value is nonnegative and counts "even sequences" of the underlying graph, which already gives the sign and a combinatorial interpretation for this family (the left-to-right orientation differs from theirs by an even number of arc reversals). So positivity is not new. What we did not find anywhere is the explicit generating function or the recurrence: the sequence $1,2,8,144,3200,\ldots$ and $D_N/2^N$ are not in the OEIS, the thread and its Math.SE cross-post have no answers, and another AI project's entry checks only the first three values. The searches were not exhaustive; if this is known, please open an issue and we will credit it.

**How far it has been checked.** A written proof, checked line by line by a second reader who re-derived the kernel, the boundary conditions and the recurrence; two independent programs agree with the formula for $N\le6$ and the series and recurrence agree through $N=9$. Not formalised in Lean.

Produced with AI assistants: Codex (OpenAI) found and wrote the proof; Claude (Anthropic) refereed it.

