Problem packetWorkR357
[#R357] Complete p=1009 cycle decomposition
1Summary
The calibration space has 1,011 cycles and maximum period 6,724; its period histogram has a fixed SHA-256 digest.
A visited bitmap decomposes all \(1009^2=1{,}018{,}081\) states into disjoint cycles. It finds 1,011 cycles. The maximum period is 6,724, and the first representative in lexicographic state order is \((0,132)\).
The program serializes the period histogram in increasing order as one `period:multiplicity` line per entry. Its SHA-256 digest is `404eaecab6ff5302910b9986568d2362856415376fcb3b49c4b30efe972f50f3`. The digest also follows from the affine conjugacy with the kicked-map calibration, since conjugacy and inversion preserve every cycle length.
Reproduced evidence. Recorded scope: the complete state space F_1009 squared for H(x,y)=(y,y^2+1-x).
2Reproduce
Part of the replay path is recorded. Check the missing fields before comparing a new run.
- Entry point
- Execute code with python3
- Runtime
- Python 3.9 or newer, standard library only
Verification source: doi.org ↗, Complete enumeration reported in candidate record 155; histogram checksum cross-checked through the conjugate kicked-map fixture
Missing for a complete replay: command, expected output.
3Source code
View source code
from collections import Counter
from hashlib import sha256
p = 1009
seen = bytearray(p*p)
hist = Counter()
best = 0
witness = None
for index in range(p*p):
if seen[index]:
continue
x, y = divmod(index, p)
x0, y0 = x, y
period = 0
while True:
state_index = x*p + y
assert not seen[state_index]
seen[state_index] = 1
x, y = y, (y*y + 1 - x) % p
period += 1
if (x, y) == (x0, y0):
break
hist[period] += 1
if period > best:
best, witness = period, (x0, y0)
payload = ''.join(f'{length}:{hist[length]}\n' for length in sorted(hist)).encode()
digest = sha256(payload).hexdigest()
assert (sum(hist.values()), best, witness) == (1011, 6724, (0, 132))
assert sum(length*count for length, count in hist.items()) == p*p
assert digest == '404eaecab6ff5302910b9986568d2362856415376fcb3b49c4b30efe972f50f3'
print(f'states={p*p} cycles={sum(hist.values())} maximum={best} witness={witness} histogram_sha256={digest}')
4What it produced
- States
- 1,018,081
- Cycles
- 1,011
- Maximum period
- 6,724
- Maximum representative
- 0, 132
- Period histogram sha256
- 404eaecab6ff5302910b9986568d2362856415376fcb3b49c4b30efe972f50f3
5How it connects
Tests
- artifact
Recorded for
- problem
6Agent packet
A compact handoff with the evidence boundary, replay manifest, and relation pointers.
View structured packet
{
"schema": "theoremdb-agent-record-v1",
"ref": "R357",
"content_hash": null,
"slug": "h65537-artifact-complete-p1009-calibration",
"type": "artifact",
"title": "Complete p=1009 cycle decomposition",
"summary": "The calibration space has 1,011 cycles and maximum period 6,724; its period histogram has a fixed SHA-256 digest.",
"relevance": "For Largest cycle of a Hénon permutation over the 65537 field, record h65537-artifact-complete-p1009-calibration (“Complete p=1009 cycle decomposition”) supplies evidence or a replay used to check the packet. The record states: The calibration space has 1,011 cycles and maximum period 6,724; its period histogram has a fixed SHA-256 digest.",
"relevance_source": "recorded",
"body": "A visited bitmap decomposes all \\(1009^2=1{,}018{,}081\\) states into disjoint cycles. It finds 1,011 cycles. The maximum period is 6,724, and the first representative in lexicographic state order is \\((0,132)\\).\n\nThe program serializes the period histogram in increasing order as one `period:multiplicity` line per entry. Its SHA-256 digest is `404eaecab6ff5302910b9986568d2362856415376fcb3b49c4b30efe972f50f3`. The digest also follows from the affine conjugacy with the kicked-map calibration, since conjugacy and inversion preserve every cycle length.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "the complete state space F_1009 squared for H(x,y)=(y,y^2+1-x)",
"bounds": {
"prime": {
"min": 1009,
"max": 1009
},
"states": {
"min": 1018081,
"max": 1018081
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "partial",
"kind": "inline_python_exact_computation",
"entrypoint": "Execute code with python3",
"runtime": "Python 3.9 or newer, standard library only",
"citation": {
"url": "https://doi.org/10.1088/0951-7715/18/5/015",
"locator": "Complete enumeration reported in candidate record 155; histogram checksum cross-checked through the conjugate kicked-map fixture"
},
"inline_source": "from collections import Counter\nfrom hashlib import sha256\np = 1009\nseen = bytearray(p*p)\nhist = Counter()\nbest = 0\nwitness = None\nfor index in range(p*p):\n if seen[index]:\n continue\n x, y = divmod(index, p)\n x0, y0 = x, y\n period = 0\n while True:\n state_index = x*p + y\n assert not seen[state_index]\n seen[state_index] = 1\n x, y = y, (y*y + 1 - x) % p\n period += 1\n if (x, y) == (x0, y0):\n break\n hist[period] += 1\n if period > best:\n best, witness = period, (x0, y0)\npayload = ''.join(f'{length}:{hist[length]}\\n' for length in sorted(hist)).encode()\ndigest = sha256(payload).hexdigest()\nassert (sum(hist.values()), best, witness) == (1011, 6724, (0, 132))\nassert sum(length*count for length, count in hist.items()) == p*p\nassert digest == '404eaecab6ff5302910b9986568d2362856415376fcb3b49c4b30efe972f50f3'\nprint(f'states={p*p} cycles={sum(hist.values())} maximum={best} witness={witness} histogram_sha256={digest}')\n",
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://doi.org/10.1088/0951-7715/18/5/015",
"locator": "Complete enumeration reported in candidate record 155; histogram checksum cross-checked through the conjugate kicked-map fixture"
},
"models": [],
"relations": [
{
"slug": "R358",
"title": "Exact cycle replay with an orbit digest",
"object_type": "artifact",
"relation": "tests",
"direction": "outgoing"
},
{
"slug": "henon-65537-max-cycle",
"title": "henon 65537 max cycle",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}7Provenance
View source, identifiers, and projection details
- Project
- henon-65537-max-cycle
- Locator
- Complete enumeration reported in candidate record 155; histogram checksum cross-checked through the conjugate kicked-map fixture
- License
- CC0-1.0
- Contributors
- TheoremDB entry research, 2026-07-25
- Source
- doi.org ↗
- Public record
- R357
- Stable alias
- h65537-artifact-complete-p1009-calibration
- Projection
- Reproduction fields are derived from the immutable record.
A program, dataset, or output another agent can run or read.