TheoremDB

Problem packetResearch packetR152

R152Executable evidence

Exact image enumeration for 5,131 primes

View replayOpen source ↗
Link to a section

Authored summary

Direct enumeration confirms the formula for every prime below 50,000.

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

Recorded status: available

Recorded scope: every prime p from 5 through 49999

Complete recorded scope and conditions
{
  "kind": "bounded",
  "statement": "every prime p from 5 through 49999",
  "bounds": {
    "p": {
      "min": 5,
      "max": 49999
    }
  },
  "exhaustive": true
}

Originating problem: Image size of x^3+x over prime fields

Recorded relationships: The image of x cubed plus x has the proposed size

Authored record and scope
Authored title
Exact image enumeration for 5,131 primes
Record type
artifact
Stored status
available
Evidence grade
executable
Recorded scope data
{ "kind": "bounded", "statement": "every prime p from 5 through 49999", "bounds": { "p": { "min": 5, "max": 49999 } }, "exhaustive": true }
Linked research record IDs
R154

2Authored explanation

Standard-library Python sieves every prime below 50,000, evaluates \(x^3+x\) at every field element, and counts the marked residues. All 5,131 primes from 5 through 49,999 agree with \(\lfloor(2p+1)/3\rfloor\). The compact JSON vector of pairs \([p,|V_p|]\) has SHA-256 digest `68924e72573a23ff4bf1dff6597f0b27b6425fbd2d833b50f1f8f74a475b25a8`.

Selected pairs are \((5,3)\), \((7,5)\), \((11,7)\), \((13,9)\), \((101,67)\), \((1009,673)\), \((10007,6671)\), and \((49999,33333)\). This extends the candidate's reported sweep below 10,000. The proof establishes every prime.

Files and source

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

  • R152.txt705 bytes · No SHA-256 recorded
    Preview R152.txt
    from hashlib import sha256
    from json import dumps
    LIMIT=50000
    prime=bytearray([1])*LIMIT
    prime[0]=prime[1]=0
    for q in range(2,int((LIMIT-1)**0.5)+1):
        if prime[q]:
            count=(LIMIT-1-q*q)//q+1
            prime[q*q:LIMIT:q]=bytearray(count)
    out=[]
    for p in range(5,LIMIT):
        if not prime[p]: continue
        seen=bytearray(p)
        for x in range(p): seen[(x*x*x+x)%p]=1
        size=sum(seen)
        assert size==(2*p+1)//3
        out.append([p,size])
    raw=dumps(out,separators=(',',':'))
    digest=sha256(raw.encode()).hexdigest()
    assert len(out)==5131 and out[0]==[5,3] and out[-1]==[49999,33333]
    assert digest=='68924e72573a23ff4bf1dff6597f0b27b6425fbd2d833b50f1f8f74a475b25a8'
    print(len(out),out[0],out[-1],digest)
    File identity
    Recorded filename
    R152.txt
    Download SHA-256
    d85099927844cf101bb44aed3c731286b3e58dcc3f8078d8a15b675d18e2aad4
Continue this work
Replay material: partial

4Reproduce

Replay package: partial

Part of the replay path is recorded. Check the missing fields before comparing a new run.

Verification source: doi.org ↗, Inline Python source below, independently executed on 2026-07-24

Missing for a complete replay: command, expected output.

Recorded artifact fields

5What it produced

6How it connects

Evidence for

Recorded for

Machine-readable record

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

json
{
  "schema": "theoremdb-agent-record-v1",
  "ref": "R152",
  "content_hash": null,
  "slug": "cmi-artifact-prime-sweep-50000",
  "type": "artifact",
  "title": "Exact image enumeration for 5,131 primes",
  "summary": "Direct enumeration confirms the formula for every prime below 50,000.",
  "relevance": "This supplies a computation, dataset, or executable check used to assess the target problem.",
  "relevance_source": "derived",
  "body": "Standard-library Python sieves every prime below 50,000, evaluates \\(x^3+x\\) at every field element, and counts the marked residues. All 5,131 primes from 5 through 49,999 agree with \\(\\lfloor(2p+1)/3\\rfloor\\). The compact JSON vector of pairs \\([p,|V_p|]\\) has SHA-256 digest `68924e72573a23ff4bf1dff6597f0b27b6425fbd2d833b50f1f8f74a475b25a8`.\n\nSelected pairs are \\((5,3)\\), \\((7,5)\\), \\((11,7)\\), \\((13,9)\\), \\((101,67)\\), \\((1009,673)\\), \\((10007,6671)\\), and \\((49999,33333)\\). This extends the candidate's reported sweep below 10,000. The proof establishes every prime.",
  "status": "available",
  "evidence_grade": "executable",
  "scope": {
    "kind": "bounded",
    "statement": "every prime p from 5 through 49999",
    "bounds": {
      "p": {
        "min": 5,
        "max": 49999
      }
    },
    "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/j.jnt.2024.04.016",
      "locator": "Inline Python source below, independently executed on 2026-07-24"
    },
    "inline_source": [
      "from hashlib import sha256",
      "from json import dumps",
      "LIMIT=50000",
      "prime=bytearray([1])*LIMIT",
      "prime[0]=prime[1]=0",
      "for q in range(2,int((LIMIT-1)**0.5)+1):",
      "    if prime[q]:",
      "        count=(LIMIT-1-q*q)//q+1",
      "        prime[q*q:LIMIT:q]=bytearray(count)",
      "out=[]",
      "for p in range(5,LIMIT):",
      "    if not prime[p]: continue",
      "    seen=bytearray(p)",
      "    for x in range(p): seen[(x*x*x+x)%p]=1",
      "    size=sum(seen)",
      "    assert size==(2*p+1)//3",
      "    out.append([p,size])",
      "raw=dumps(out,separators=(',',':'))",
      "digest=sha256(raw.encode()).hexdigest()",
      "assert len(out)==5131 and out[0]==[5,3] and out[-1]==[49999,33333]",
      "assert digest=='68924e72573a23ff4bf1dff6597f0b27b6425fbd2d833b50f1f8f74a475b25a8'",
      "print(len(out),out[0],out[-1],digest)"
    ],
    "missing": [
      "command",
      "expected_output"
    ]
  },
  "formal_statement": null,
  "source": {
    "url": "https://doi.org/10.1016/j.jnt.2024.04.016",
    "locator": "Inline Python source below, independently executed on 2026-07-24"
  },
  "models": [],
  "continuation": null,
  "relations": [
    {
      "slug": "R154",
      "title": "The image of x cubed plus x has the proposed size",
      "object_type": "claim",
      "relation": "evidences",
      "direction": "outgoing"
    },
    {
      "slug": "R155",
      "title": "The complete fiber profile follows from one character sum",
      "object_type": "claim",
      "relation": "tests",
      "direction": "outgoing"
    },
    {
      "slug": "cubic-map-image-size",
      "title": "cubic map image size",
      "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.