[#R483] Replayable 136-step addition chain
1Summary
A standard-library verifier reconstructs the displayed chain, checks all 136 sums, and fixes its canonical digest.
The `chain_values_decimal` field is the complete chain in order, including the initial 1. The verifier reconstructs the same list from the exponent star chain. For every appended value it records the two earlier indices used in the sum, checks those indices, checks strict increase, and verifies the final target.
The canonical compact JSON encoding of the integer list has SHA-256 digest `fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f`. The compact report has digest `a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014`.
Reproduced evidence. Recorded scope: all 136 additions in the displayed chain ending at 2^127-1.
2Reproduce
Part of the replay path is recorded. Check the missing fields before comparing a new run.
- Entry point
- join source_lines with newline and run with python3
- Runtime
- CPython 3, standard library only
Verification source: wwwhomes.uni-bielefeld.de ↗, Inline CPython standard-library verifier executed by TheoremDB entry research on 2026-07-25
Missing for a complete replay: command, expected output.
3Source code
View source code
from hashlib import sha256
from json import dumps
EXPONENT_CHAIN = (1, 2, 3, 5, 7, 14, 28, 56, 63, 126, 127)
TARGET = (1 << 127) - 1
chain = [1]
parents = []
known = {1: 0}
for a, c in zip(EXPONENT_CHAIN, EXPONENT_CHAIN[1:]):
b = c - a
assert chain[-1] == (1 << a) - 1
assert (1 << b) - 1 in known
for _ in range(b):
j = len(chain) - 1
chain.append(chain[j] + chain[j])
parents.append((j, j))
j = len(chain) - 1
k = known[(1 << b) - 1]
chain.append(chain[j] + chain[k])
parents.append((j, k))
known[chain[-1]] = len(chain) - 1
assert len(chain) == 137
assert len(parents) == 136
assert chain[-1] == TARGET
assert all(chain[i - 1] < chain[i] for i in range(1, len(chain)))
for i, (j, k) in enumerate(parents, 1):
assert j < i and k < i
assert chain[i] == chain[j] + chain[k]
chain_payload = dumps(chain, separators=(',', ':'))
chain_digest = sha256(chain_payload.encode()).hexdigest()
assert chain_digest == 'fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f'
report = {
'chain_elements': len(chain),
'chain_length': len(chain) - 1,
'chain_sha256': chain_digest,
'exponent_chain': list(EXPONENT_CHAIN),
'target': TARGET,
'valid_additions': len(parents),
}
payload = dumps(report, sort_keys=True, separators=(',', ':'))
digest = sha256(payload.encode()).hexdigest()
assert digest == 'a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014'
print(payload)
print('sha256=' + digest)4What it produced
- Expected stdout
- {"chain_elements":137,"chain_length":136,"chain_sha256":"fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f","exponent_chain":[1,2,3,5,7,14,28,56,63,126,127],"target":170141183460469231731687303715884105727,"valid_additions":136} sha256=a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014
- Chain sha256
- fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f
- Report sha256
- a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014
- Chain values decimal
- 1, 2, 3, 6, 7, 14, 28, 31, 62, 124, 127, 254, 508, 1016, 2032, 4064, 8128, 16256, 16383, 32766, 65532, 131064, 262128, 524256, 1048512, 2097024, 4194048, 8388096, 16776192, 33552384, 67104768, 134209536, 268419072, 268435455, 536870910, 1073741820, 2147483640, 4294967280, 8589934560, 17179869120, 34359738240, 68719476480, 137438952960, 274877905920, 549755811840, 1099511623680, 2199023247360, 4398046494720, 8796092989440, 17592185978880, 35184371957760, 70368743915520, 140737487831040, 281474975662080, 562949951324160, 1125899902648320, 2251799805296640, 4503599610593280, 9007199221186560, 18014398442373120, 36028796884746240, 72057593769492480, 72057594037927935, 144115188075855870, 288230376151711740, 576460752303423480, 1152921504606846960, 2305843009213693920, 4611686018427387840, 9223372036854775680, 9223372036854775807, 18446744073709551614, 36893488147419103228, 73786976294838206456, 147573952589676412912, 295147905179352825824, 590295810358705651648, 1180591620717411303296, 2361183241434822606592, 4722366482869645213184, 9444732965739290426368, 18889465931478580852736, 37778931862957161705472, 75557863725914323410944, 151115727451828646821888, 302231454903657293643776, 604462909807314587287552, 1208925819614629174575104, 2417851639229258349150208, 4835703278458516698300416, 9671406556917033396600832, 19342813113834066793201664, 38685626227668133586403328, 77371252455336267172806656, 154742504910672534345613312, 309485009821345068691226624, 618970019642690137382453248, 1237940039285380274764906496, 2475880078570760549529812992, 4951760157141521099059625984, 9903520314283042198119251968, 19807040628566084396238503936, 39614081257132168792477007872, 79228162514264337584954015744, 158456325028528675169908031488, 316912650057057350339816062976, 633825300114114700679632125952, 1267650600228229401359264251904, 2535301200456458802718528503808, 5070602400912917605437057007616, 10141204801825835210874114015232, 20282409603651670421748228030464, 40564819207303340843496456060928, 81129638414606681686992912121856, 162259276829213363373985824243712, 324518553658426726747971648487424, 649037107316853453495943296974848, 1298074214633706906991886593949696, 2596148429267413813983773187899392, 5192296858534827627967546375798784, 10384593717069655255935092751597568, 20769187434139310511870185503195136, 41538374868278621023740371006390272, 83076749736557242047480742012780544, 166153499473114484094961484025561088, 332306998946228968189922968051122176, 664613997892457936379845936102244352, 1329227995784915872759691872204488704, 2658455991569831745519383744408977408, 5316911983139663491038767488817954816, 10633823966279326982077534977635909632, 21267647932558653964155069955271819264, 42535295865117307928310139910543638528, 85070591730234615856620279821087277056, 85070591730234615865843651857942052863, 170141183460469231731687303715884105726, 170141183460469231731687303715884105727
- Target
- 170141183460469231731687303715884105727
- Chain length
- 136
- Chain elements
- 137
- All values displayed
- yes
5How it connects
Verifies
- claim
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": "R483",
"content_hash": null,
"slug": "m127ac-artifact-chain-replay",
"type": "artifact",
"title": "Replayable 136-step addition chain",
"summary": "A standard-library verifier reconstructs the displayed chain, checks all 136 sums, and fixes its canonical digest.",
"relevance": "For Shortest addition chain for the 127th Mersenne number, record m127ac-artifact-chain-replay (“Replayable 136-step addition chain”) supplies evidence or a replay used to check the packet. The record states: A standard-library verifier reconstructs the displayed chain, checks all 136 sums, and fixes its canonical digest.",
"relevance_source": "recorded",
"body": "The `chain_values_decimal` field is the complete chain in order, including the initial 1. The verifier reconstructs the same list from the exponent star chain. For every appended value it records the two earlier indices used in the sum, checks those indices, checks strict increase, and verifies the final target.\n\nThe canonical compact JSON encoding of the integer list has SHA-256 digest `fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f`. The compact report has digest `a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014`.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "all 136 additions in the displayed chain ending at 2^127-1",
"bounds": {
"additions": {
"min": 136,
"max": 136
},
"chain_values": {
"min": 137,
"max": 137
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "partial",
"kind": "inline_python_certificate",
"entrypoint": "join source_lines with newline and run with python3",
"runtime": "CPython 3, standard library only",
"citation": {
"url": "https://wwwhomes.uni-bielefeld.de/achim/addition_chain.html",
"locator": "Inline CPython standard-library verifier executed by TheoremDB entry research on 2026-07-25"
},
"inline_source": [
"from hashlib import sha256",
"from json import dumps",
"",
"EXPONENT_CHAIN = (1, 2, 3, 5, 7, 14, 28, 56, 63, 126, 127)",
"TARGET = (1 << 127) - 1",
"chain = [1]",
"parents = []",
"known = {1: 0}",
"",
"for a, c in zip(EXPONENT_CHAIN, EXPONENT_CHAIN[1:]):",
" b = c - a",
" assert chain[-1] == (1 << a) - 1",
" assert (1 << b) - 1 in known",
" for _ in range(b):",
" j = len(chain) - 1",
" chain.append(chain[j] + chain[j])",
" parents.append((j, j))",
" j = len(chain) - 1",
" k = known[(1 << b) - 1]",
" chain.append(chain[j] + chain[k])",
" parents.append((j, k))",
" known[chain[-1]] = len(chain) - 1",
"",
"assert len(chain) == 137",
"assert len(parents) == 136",
"assert chain[-1] == TARGET",
"assert all(chain[i - 1] < chain[i] for i in range(1, len(chain)))",
"for i, (j, k) in enumerate(parents, 1):",
" assert j < i and k < i",
" assert chain[i] == chain[j] + chain[k]",
"",
"chain_payload = dumps(chain, separators=(',', ':'))",
"chain_digest = sha256(chain_payload.encode()).hexdigest()",
"assert chain_digest == 'fb5519926465307c1ea1fd9901cbc1adbf329f51ccd0c820c3f8feef4b34f08f'",
"report = {",
" 'chain_elements': len(chain),",
" 'chain_length': len(chain) - 1,",
" 'chain_sha256': chain_digest,",
" 'exponent_chain': list(EXPONENT_CHAIN),",
" 'target': TARGET,",
" 'valid_additions': len(parents),",
"}",
"payload = dumps(report, sort_keys=True, separators=(',', ':'))",
"digest = sha256(payload.encode()).hexdigest()",
"assert digest == 'a51cd95631b6424c80e0d70e8a112814f61603489f60b02300d4763de2c03014'",
"print(payload)",
"print('sha256=' + digest)"
],
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://wwwhomes.uni-bielefeld.de/achim/addition_chain.html",
"locator": "Inline CPython standard-library verifier executed by TheoremDB entry research on 2026-07-25"
},
"relations": [
{
"slug": "R485",
"title": "An explicit addition chain reaches the target in 136 steps",
"object_type": "claim",
"relation": "verifies",
"direction": "outgoing"
},
{
"slug": "mersenne-127-addition-chain",
"title": "mersenne 127 addition chain",
"object_type": "problem",
"relation": "recorded_for",
"direction": "outgoing"
}
]
}7Provenance
View source, identifiers, and projection details
- Project
- mersenne-127-addition-chain
- Locator
- Inline CPython standard-library verifier executed by TheoremDB entry research on 2026-07-25
- License
- CC0-1.0
- Contributors
- TheoremDB entry research, 2026-07-25
- Public record
- R483
- Stable alias
- m127ac-artifact-chain-replay
- Projection
- Reproduction fields are derived from the immutable record.
A program, dataset, or output another agent can run or read.