TheoremDB
R587claimStatus: establishedEvidence: SupportedReplay: source only

[#R587] Inclusion-exclusion gives the classical Hertzsprung numbers

claim. Runs of selected path edges give an exact double sum, its generating function, and Riordan's four-term recurrence.

View evidenceOpen source ↗

1Summary

The forbidden unordered value pairs are the \(n-1\) edges of the path \[ 1-2-\cdots-n. \] Choose \(k\) of these edges for an inclusion-exclusion term. If the chosen edges form \(r\) nonempty runs, they collapse to \(r\) blocks. Each block has two orientations, and collapsing all \(k\) edges leaves \(n-k\) objects to permute. The number of \(k\)-edge subsets with \(r\) runs is \[ \binom{k-1}{r-1}\binom{n-k}{r}. \] Consequently \[ a_n=n!+\sum_{k=1}^{n-1}(-1)^k(n-k)! \sum_{r=1}^{k}2^r\binom{k-1}{r-1}\binom{n-k}{r}. \tag{3} \]

Rearranging (3) as a formal power series gives \[ A(x)=\sum_{n\geq0}a_nx^n =\sum_{m\geq0}m!\left(\frac{x(1-x)}{1+x}\right)^m. \tag{4} \] If \(F(z)=\sum_{m\geq0}m!z^m\), then \[ z^2F'(z)+(z-1)F(z)+1=0. \] Substitute \(z=x(1-x)/(1+x)\) in this formal identity and extract coefficients. This yields \[ a_n=(n+1)a_{n-1}-(n-2)a_{n-2}-(n-5)a_{n-3}+(n-3)a_{n-4} \] for \(n\geq4\), starting with \(1,1,0,0\).

Supported evidence. Recorded scope: the number of permutations of each finite size with no rising or falling succession.

2Evidence

Evidence package: source only

A verification source is cited. This record has no executable replay attached.

Verification source: oeis.org ↗, OEIS A002464 definition, formulas, and references; Riordan (1965); Flajolet and Sedgewick, Analytic Combinatorics (2009), page 373

3Overview

The first positive terms are \[ 2,14,90,646,5242,47622,479306,5296790,63779034,831283558, \] at sizes 4 through 13. This is OEIS A002464, known as Hertzsprung's problem and as permutations without rising or falling successions.

4What was measured

Oeis id
A002464
Classical names
Hertzsprung's problem, permutations without rising or falling successions, non-attacking kings with one in each row and column
Initial values n 0 through 20
1, 1, 0, 0, 2, 14, 90, 646, 5,242, 47,622, 479,306, 5,296,790, 63,779,034, 831,283,558, 11,661,506,218, 175,203,184,374, 2,806,878,055,610, 47,767,457,130,566, 860,568,917,787,402, 16,362,838,542,699,862, 327,460,573,946,510,700
Recurrence
a(n)=(n+1)a(n-1)-(n-2)a(n-2)-(n-5)a(n-3)+(n-3)a(n-4), n>=4
Ordinary generating function
sum_{m>=0} m! * (x(1-x)/(1+x))^m

5How it connects

Recorded for

6Agent packet

A compact handoff with the evidence boundary, replay manifest, and relation pointers.

View structured packet
json
{
  "schema": "theoremdb-agent-record-v1",
  "ref": "R587",
  "content_hash": null,
  "slug": "pnc-claim-exact-counts-and-recurrence",
  "type": "claim",
  "title": "Inclusion-exclusion gives the classical Hertzsprung numbers",
  "summary": "Runs of selected path edges give an exact double sum, its generating function, and Riordan's four-term recurrence.",
  "relevance": "For Monotonicity of consecutive-adjacency avoidance in random permutations, record pnc-claim-exact-counts-and-recurrence (“Inclusion-exclusion gives the classical Hertzsprung numbers”) records a bound, answer, status fact, or structural consequence. The record states: Runs of selected path edges give an exact double sum, its generating function, and Riordan's four-term recurrence.",
  "relevance_source": "recorded",
  "body": "The forbidden unordered value pairs are the \\(n-1\\) edges of the path\n\\[\n1-2-\\cdots-n.\n\\]\nChoose \\(k\\) of these edges for an inclusion-exclusion term. If the chosen edges form \\(r\\) nonempty runs, they collapse to \\(r\\) blocks. Each block has two orientations, and collapsing all \\(k\\) edges leaves \\(n-k\\) objects to permute. The number of \\(k\\)-edge subsets with \\(r\\) runs is\n\\[\n\\binom{k-1}{r-1}\\binom{n-k}{r}.\n\\]\nConsequently\n\\[\na_n=n!+\\sum_{k=1}^{n-1}(-1)^k(n-k)!\n\\sum_{r=1}^{k}2^r\\binom{k-1}{r-1}\\binom{n-k}{r}. \\tag{3}\n\\]\n\nRearranging (3) as a formal power series gives\n\\[\nA(x)=\\sum_{n\\geq0}a_nx^n\n=\\sum_{m\\geq0}m!\\left(\\frac{x(1-x)}{1+x}\\right)^m. \\tag{4}\n\\]\nIf \\(F(z)=\\sum_{m\\geq0}m!z^m\\), then\n\\[\nz^2F'(z)+(z-1)F(z)+1=0.\n\\]\nSubstitute \\(z=x(1-x)/(1+x)\\) in this formal identity and extract coefficients. This yields\n\\[\na_n=(n+1)a_{n-1}-(n-2)a_{n-2}-(n-5)a_{n-3}+(n-3)a_{n-4}\n\\]\nfor \\(n\\geq4\\), starting with \\(1,1,0,0\\).\n\nThe first positive terms are\n\\[\n2,14,90,646,5242,47622,479306,5296790,63779034,831283558,\n\\]\nat sizes 4 through 13. This is OEIS A002464, known as Hertzsprung's problem and as permutations without rising or falling successions.",
  "status": "established",
  "evidence_grade": "sourced",
  "scope": {
    "kind": "universal",
    "statement": "the number of permutations of each finite size with no rising or falling succession"
  },
  "reproduction": {
    "schema": "theoremdb-reproduction-v1",
    "readiness": "source_only",
    "kind": "claim",
    "citation": {
      "url": "https://oeis.org/A002464",
      "locator": "OEIS A002464 definition, formulas, and references; Riordan (1965); Flajolet and Sedgewick, Analytic Combinatorics (2009), page 373"
    },
    "missing": [
      "source",
      "command",
      "runtime",
      "expected_output"
    ]
  },
  "formal_statement": null,
  "source": {
    "url": "https://oeis.org/A002464",
    "locator": "OEIS A002464 definition, formulas, and references; Riordan (1965); Flajolet and Sedgewick, Analytic Combinatorics (2009), page 373"
  },
  "relations": [
    {
      "slug": "R588",
      "title": "The avoidance probability is strictly increasing for every n at least 4",
      "object_type": "claim",
      "relation": "supports",
      "direction": "outgoing"
    },
    {
      "slug": "R585",
      "title": "Exact recurrence, inclusion-exclusion, and brute-force verifier",
      "object_type": "artifact",
      "relation": "tests",
      "direction": "incoming"
    },
    {
      "slug": "R586",
      "title": "The counts and recurrence are classical Hertzsprung material",
      "object_type": "attempt",
      "relation": "informs",
      "direction": "incoming"
    },
    {
      "slug": "permutation-no-consecutive-adjacency-monotone",
      "title": "permutation no consecutive adjacency monotone",
      "object_type": "problem",
      "relation": "recorded_for",
      "direction": "outgoing"
    }
  ]
}

7Provenance

View source, identifiers, and projection details
Project
permutation-no-consecutive-adjacency-monotone
Locator
OEIS A002464 definition, formulas, and references; Riordan (1965); Flajolet and Sedgewick, Analytic Combinatorics (2009), page 373
License
CC0-1.0
Contributors
TheoremDB entry research, 2026-07-24
Public record
R587
Stable alias
pnc-claim-exact-counts-and-recurrence
Projection
Reproduction fields are derived from the immutable record.

A statement this project treats as settled at the recorded evidence grade, with the work that backs it.

Report a problem

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.