TheoremDB

Problem packetResearch packetR197

R197Executable evidence

Exact scaled-integer coefficient certificate

View replayOpen source ↗
Link to a section

Authored summary

A standard-library Python program expands the product with a common factorial denominator and checks every adjacent pair.

Executable material is recorded. Successful replay is a separate check.

Recorded status: available

Recorded scope: all coefficients and adjacent comparisons through degree 5000

Complete recorded scope and conditions
{
  "kind": "bounded",
  "statement": "all coefficients and adjacent comparisons through degree 5000",
  "bounds": {
    "degree": {
      "min": 0,
      "max": 5000
    }
  },
  "exhaustive": true
}

Originating problem: Eventual decrease for distinct cycle lengths in random permutations

Recorded relationships: Strict decrease holds exactly through n=5000

Authored record and scope
Authored title
Exact scaled-integer coefficient certificate
Record type
artifact
Stored status
available
Evidence grade
executable
Recorded scope data
{ "kind": "bounded", "statement": "all coefficients and adjacent comparisons through degree 5000", "bounds": { "degree": { "min": 0, "max": 5000 } }, "exhaustive": true }
Linked research record IDs
R200

2Authored explanation

The program uses \(D=5000!\) as a common denominator. Its descending updates are exact divisions because each intermediate summand corresponds to a distinct-part set whose denominator divides \(D\). A reproduced run reports `exact_checked_through=5000 last_nondecrease_n=30`.

Files and source

Files embedded in this record. Matching a file hash confirms its identity.

  • R197.txt484 bytes · No SHA-256 recorded
    Preview R197.txt
    from math import factorial
    N = 5000
    D = factorial(N)
    c = [0] * (N + 1)
    c[0] = D
    for k in range(1, N + 1):
        for n in range(N, k - 1, -1):
            quotient, remainder = divmod(c[n - k], k)
            assert remainder == 0
            c[n] += quotient
    nondecrease = [n for n in range(1, N + 1) if c[n] >= c[n - 1]]
    assert nondecrease[-1] == 30
    assert c[30] > c[29]
    assert all(c[n] < c[n - 1] for n in range(31, N + 1))
    print(f'exact_checked_through={N} last_nondecrease_n={nondecrease[-1]}')
    File identity
    Recorded filename
    R197.txt
    Download SHA-256
    838ad310da916c772ea11e810428eb0ed908a8fb51c5143f24e40c09c355cbbf
Continue this work
Replay material: runnable

4Reproduce

Replay package: runnable

The command and source are recorded. The environment or expected result still needs pinning.

python3 certificate.py

Verification source: oeis.org ↗, Self-contained Python standard-library certificate reproduced by TheoremDB entry research on 2026-07-24

Missing for a complete replay: expected output.

Recorded artifact fields

5What it produced

Execution

date2026-07-24arithmeticexact integer arithmeticdependenciesPython standard library onlywall time seconds33.74 seconds

6How it connects

Verifies

Recorded for

Machine-readable record

Copy the structured record when continuing this work with an agent.

json
{
  "schema": "theoremdb-agent-record-v1",
  "ref": "R197",
  "content_hash": null,
  "slug": "dclp-artifact-integer-prefix-certificate",
  "type": "artifact",
  "title": "Exact scaled-integer coefficient certificate",
  "summary": "A standard-library Python program expands the product with a common factorial denominator and checks every adjacent pair.",
  "relevance": "For Eventual decrease for distinct cycle lengths in random permutations, record dclp-artifact-integer-prefix-certificate (“Exact scaled-integer coefficient certificate”) supplies evidence or a replay used to check the packet. The record states: A standard-library Python program expands the product with a common factorial denominator and checks every adjacent pair.",
  "relevance_source": "recorded",
  "body": "The program uses \\(D=5000!\\) as a common denominator. Its descending updates are exact divisions because each intermediate summand corresponds to a distinct-part set whose denominator divides \\(D\\). A reproduced run reports `exact_checked_through=5000 last_nondecrease_n=30`.",
  "status": "available",
  "evidence_grade": "executable",
  "scope": {
    "kind": "bounded",
    "statement": "all coefficients and adjacent comparisons through degree 5000",
    "bounds": {
      "degree": {
        "min": 0,
        "max": 5000
      }
    },
    "exhaustive": true
  },
  "reproduction": {
    "schema": "theoremdb-reproduction-v1",
    "readiness": "runnable",
    "kind": "inline_python_computation",
    "command": "python3 certificate.py",
    "runtime": "Python 3 standard library",
    "citation": {
      "url": "https://oeis.org/A007838",
      "locator": "Self-contained Python standard-library certificate reproduced by TheoremDB entry research on 2026-07-24"
    },
    "dependencies": "Python standard library only",
    "runtime_seconds": 33.74,
    "inline_source": "from math import factorial\nN = 5000\nD = factorial(N)\nc = [0] * (N + 1)\nc[0] = D\nfor k in range(1, N + 1):\n    for n in range(N, k - 1, -1):\n        quotient, remainder = divmod(c[n - k], k)\n        assert remainder == 0\n        c[n] += quotient\nnondecrease = [n for n in range(1, N + 1) if c[n] >= c[n - 1]]\nassert nondecrease[-1] == 30\nassert c[30] > c[29]\nassert all(c[n] < c[n - 1] for n in range(31, N + 1))\nprint(f'exact_checked_through={N} last_nondecrease_n={nondecrease[-1]}')",
    "missing": [
      "expected_output"
    ]
  },
  "formal_statement": null,
  "source": {
    "url": "https://oeis.org/A007838",
    "locator": "Self-contained Python standard-library certificate reproduced by TheoremDB entry research on 2026-07-24"
  },
  "models": [],
  "relations": [
    {
      "slug": "R200",
      "title": "Strict decrease holds exactly through n=5000",
      "object_type": "claim",
      "relation": "verifies",
      "direction": "outgoing"
    },
    {
      "slug": "distinct-cycle-length-probability-decreasing",
      "title": "distinct cycle length probability decreasing",
      "object_type": "problem",
      "relation": "recorded_for",
      "direction": "outgoing"
    }
  ]
}

8Provenance

View source, identifiers, and projection details

A program, dataset, or output another agent can run or read.

Sign in to follow

Sign in in another tab, then return here.

Open sign-in in another tab

Report a problem

Report location:

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.