Problem packetResearch packetR807
Exact coefficient sweep through n = 300
Link to a section
Executable material is recorded. Successful replay is a separate check.
Recorded status: available
Recorded scope: every polynomial order from 1 through 300
Complete recorded scope and conditions
{
"kind": "bounded",
"statement": "every polynomial order from 1 through 300",
"bounds": {
"n": {
"min": 1,
"max": 300
}
},
"exhaustive": true
}Originating problem: Eventual unimodality of ternary subset-sum polynomials
Recorded relationships: The complete failure set is 2, 4, 6, 8, 9, and 10
Authored record and scope
- Authored title
- Exact coefficient sweep through n = 300
- Record type
- artifact
- Stored status
- available
- Evidence grade
- executable
- Recorded scope data
- { "kind": "bounded", "statement": "every polynomial order from 1 through 300", "bounds": { "n": { "min": 1, "max": 300 } }, "exhaustive": true }
- Linked research record IDs
- R809
2Authored explanation
The program starts with the coefficient vector `[1]` and applies the exact recurrence \[ a_n(j)=a_{n-1}(j)+a_{n-1}(j-n)+a_{n-1}(j-2n), \] with out-of-range terms set to zero. At every order it checks reciprocity, verifies that the coefficient sum is \(3^n\), and scans every adjacent pair through the center.
The failure set through 300 is exactly \(\{2,4,6,8,9,10\}\). At every order from 11 through 300 the only equal adjacent pairs before the center occur at exponents 0 and 2. The complete coefficient vectors at \(n=11,100,300\), serialized as compact JSON, have SHA-256 digests `4e87e46d97a8dba7cb176b5437b873de075b81464036efa1e846ed25c99fd74f`, `9c1d89fd72812e83cbacbfe57bfb9ffe9ea618e52b6e0cca079ea16025d6ec0c`, and `6a588b1ee8f54446ea03a2abe977271047d2c84c30c956bf28f5ed20d50f4177`.
Files and source
Files embedded in this record. Matching a file hash confirms its identity.
- R807.txt1,760 bytes · No SHA-256 recorded
Preview R807.txt
from hashlib import sha256 from json import dumps N=300 coeff=[1] failures=[] checkpoints={} expected_hashes={ 11:'4e87e46d97a8dba7cb176b5437b873de075b81464036efa1e846ed25c99fd74f', 100:'9c1d89fd72812e83cbacbfe57bfb9ffe9ea618e52b6e0cca079ea16025d6ec0c', 300:'6a588b1ee8f54446ea03a2abe977271047d2c84c30c956bf28f5ed20d50f4177', } for n in range(1,N+1): nxt=[0]*(len(coeff)+2*n) for j,value in enumerate(coeff): nxt[j]+=value nxt[j+n]+=value nxt[j+2*n]+=value coeff=nxt assert coeff==coeff[::-1] assert sum(coeff)==3**n middle=n*(n+1)//2 descents=[j for j in range(middle) if coeff[j]>coeff[j+1]] zero_differences=[j for j in range(middle) if coeff[j]==coeff[j+1]] if descents: failures.append(n) if n>=11: assert zero_differences==[0,2] if n in (10,11,100,300): checkpoints[n]={ 'degree':len(coeff)-1, 'center':coeff[middle], 'center_minus_previous':coeff[middle]-coeff[middle-1], 'window':coeff[middle-5:middle+6], 'zero_differences':zero_differences, 'descents':descents, 'sha256':sha256(dumps(coeff,separators=(',',':')).encode()).hexdigest(), } assert failures==[2,4,6,8,9,10] assert checkpoints[10]['window']==[1367,1379,1404,1408,1423,1417,1423,1408,1404,1379,1367] assert checkpoints[11]['window']==[3608,3657,3684,3715,3723,3735,3723,3715,3684,3657,3608] for n,digest in expected_hashes.items(): assert checkpoints[n]['sha256']==digest print('orders 1..300') print('failures',','.join(map(str,failures))) for n in (10,11,100,300): c=checkpoints[n] print(n,c['degree'],c['center'],c['center_minus_previous'],c['zero_differences'],c['descents'],c['sha256'])File identity
- Recorded filename
- R807.txt
- Download SHA-256
- 4f44f8046b0257fce2937caca36a41fb0477d70e470404733e8ca5b032d23e59
Continue this work
Replay material: partial
4Reproduce
Part of the replay path is recorded. Check the missing fields before comparing a new run.
Verification source: doi.org ↗, Inline CPython 3 source below, executed on 2026-07-24
Missing for a complete replay: command, expected output.
Recorded artifact fields
5What it produced
6How it connects
Evidence for
- claim
Tests
- claim
Recorded for
- problem
Cite this record
Cite the original sources separately.
Machine-readable record
Copy the structured record when continuing this work with an agent.
{
"schema": "theoremdb-agent-record-v1",
"ref": "R807",
"content_hash": null,
"slug": "tspu-artifact-sweep-300",
"type": "artifact",
"title": "Exact coefficient sweep through n = 300",
"summary": "Standard-library Python checks symmetry, total mass, and every adjacent coefficient through order 300.",
"relevance": "For Eventual unimodality of ternary subset-sum polynomials, record tspu-artifact-sweep-300 (“Exact coefficient sweep through n = 300”) supplies evidence or a replay used to check the packet. The record states: Standard-library Python checks symmetry, total mass, and every adjacent coefficient through order 300.",
"relevance_source": "recorded",
"body": "The program starts with the coefficient vector `[1]` and applies the exact recurrence\n\\[\na_n(j)=a_{n-1}(j)+a_{n-1}(j-n)+a_{n-1}(j-2n),\n\\]\nwith out-of-range terms set to zero. At every order it checks reciprocity, verifies that the coefficient sum is \\(3^n\\), and scans every adjacent pair through the center.\n\nThe failure set through 300 is exactly \\(\\{2,4,6,8,9,10\\}\\). At every order from 11 through 300 the only equal adjacent pairs before the center occur at exponents 0 and 2. The complete coefficient vectors at \\(n=11,100,300\\), serialized as compact JSON, have SHA-256 digests `4e87e46d97a8dba7cb176b5437b873de075b81464036efa1e846ed25c99fd74f`, `9c1d89fd72812e83cbacbfe57bfb9ffe9ea618e52b6e0cca079ea16025d6ec0c`, and `6a588b1ee8f54446ea03a2abe977271047d2c84c30c956bf28f5ed20d50f4177`.",
"status": "available",
"evidence_grade": "executable",
"scope": {
"kind": "bounded",
"statement": "every polynomial order from 1 through 300",
"bounds": {
"n": {
"min": 1,
"max": 300
}
},
"exhaustive": true
},
"reproduction": {
"schema": "theoremdb-reproduction-v1",
"readiness": "partial",
"kind": "inline_python_computation",
"entrypoint": "join source_lines with newline and run with python3",
"runtime": "CPython 3, standard library only",
"citation": {
"url": "https://doi.org/10.1016/0022-314X(89)90096-6",
"locator": "Inline CPython 3 source below, executed on 2026-07-24"
},
"inline_source": [
"from hashlib import sha256",
"from json import dumps",
"N=300",
"coeff=[1]",
"failures=[]",
"checkpoints={}",
"expected_hashes={",
" 11:'4e87e46d97a8dba7cb176b5437b873de075b81464036efa1e846ed25c99fd74f',",
" 100:'9c1d89fd72812e83cbacbfe57bfb9ffe9ea618e52b6e0cca079ea16025d6ec0c',",
" 300:'6a588b1ee8f54446ea03a2abe977271047d2c84c30c956bf28f5ed20d50f4177',",
"}",
"for n in range(1,N+1):",
" nxt=[0]*(len(coeff)+2*n)",
" for j,value in enumerate(coeff):",
" nxt[j]+=value",
" nxt[j+n]+=value",
" nxt[j+2*n]+=value",
" coeff=nxt",
" assert coeff==coeff[::-1]",
" assert sum(coeff)==3**n",
" middle=n*(n+1)//2",
" descents=[j for j in range(middle) if coeff[j]>coeff[j+1]]",
" zero_differences=[j for j in range(middle) if coeff[j]==coeff[j+1]]",
" if descents:",
" failures.append(n)",
" if n>=11:",
" assert zero_differences==[0,2]",
" if n in (10,11,100,300):",
" checkpoints[n]={",
" 'degree':len(coeff)-1,",
" 'center':coeff[middle],",
" 'center_minus_previous':coeff[middle]-coeff[middle-1],",
" 'window':coeff[middle-5:middle+6],",
" 'zero_differences':zero_differences,",
" 'descents':descents,",
" 'sha256':sha256(dumps(coeff,separators=(',',':')).encode()).hexdigest(),",
" }",
"assert failures==[2,4,6,8,9,10]",
"assert checkpoints[10]['window']==[1367,1379,1404,1408,1423,1417,1423,1408,1404,1379,1367]",
"assert checkpoints[11]['window']==[3608,3657,3684,3715,3723,3735,3723,3715,3684,3657,3608]",
"for n,digest in expected_hashes.items():",
" assert checkpoints[n]['sha256']==digest",
"print('orders 1..300')",
"print('failures',','.join(map(str,failures)))",
"for n in (10,11,100,300):",
" c=checkpoints[n]",
" print(n,c['degree'],c['center'],c['center_minus_previous'],c['zero_differences'],c['descents'],c['sha256'])"
],
"missing": [
"command",
"expected_output"
]
},
"formal_statement": null,
"source": {
"url": "https://doi.org/10.1016/0022-314X(89)90096-6",
"locator": "Inline CPython 3 source below, executed on 2026-07-24"
},
"models": [],
"relations": [
{
"slug": "R809",
"title": "The complete failure set is 2, 4, 6, 8, 9, and 10",
"object_type": "claim",
"relation": "evidences",
"direction": "outgoing"
},
{
"slug": "R808",
"title": "Almkvist's theorem settles every n at least 11",
"object_type": "claim",
"relation": "tests",
"direction": "outgoing"
},
{
"slug": "ternary-subset-polynomial-unimodality",
"title": "ternary subset polynomial unimodality",
"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.