An integer object, 1976

The Only Way Out Is Prime

Twenty-six nonnegative integers enter a degree-25 polynomial. A positive answer can only be prime. Follow fourteen squared constraints back through Wilson's theorem, then confront why even the witness for 2 cannot be printed in full.

degree 25 26 variables, a through z 14 squared constraints 87 arithmetic operations smallest positive value 2
Layer 1, the gate

Let the remainder decide.

Choose an integer at least 2. The browser multiplies every factor modulo that integer. It never materialises the factorial, and it checks the result again by trial division.

Wilson's remainder

N is prime exactly when ((N - 1)! + 1) mod N = 0. N = 1 is excluded because it makes the remainder test meaningless.

The slider is a convenience for 2 through 200. The number field accepts exact integers through 1,000,000.

computed exact remainder loading

loading

loading

The multiplication, residue after each factor

Layer 2, the certificate

Twenty-six integers enter.

Edit any coordinate. Every residual, its square, their sum, and the polynomial output are recomputed with exact integer arithmetic. Positivity is possible only when every residual is zero.

P(a,...,z) = (k + 2) [1 - (alpha12 + ... + alpha142)]

All variables are nonnegative integers. The output-driving variable is k, so N = k + 2. The other 25 variables are existential witnesses, not knobs in a fast prime generator.

The residual bench

The zero tuple is diagnostic. It produces S = 1095 and P = -2188, not evidence about the positive range.

Coordinates

Each field accepts 0 through 140 decimal digits. k is limited to 1,000,000 so every positive output can receive a separate trial-division check.

Fourteen exact residuals

    loading
    loading
    loading

    loading

    The fixed-length circuit

    87 additions and multiplications
    the paper's arithmetic-operation convention

    The 1976 paper states this bound and says it is calculated from the fourteen equations. It does not print an operation-by-operation ledger, so this strip counts the published total without inventing a distribution among equations.

    An operation on a million-digit integer and an operation on a one-digit integer each occupy one cell. This is a bounded arithmetic proof, not a bounded running time or an 87-step practical primality test. Finding the 25 auxiliary values remains the hard part.

    The smallest output, compressed

    The witness for 2 will not fit here.

    The preset above loads every coordinate that can be handled honestly in a browser. It leaves c, d, r and u at zero, so constraints 7 and 8 remain visibly red. The actual four values are definitions in a Pell recurrence.

    The materialised seed

    e = 32
    f = 17
    a = 7901690358098896161685556879749949186326380713409290912
    o = 8340353015645794683299462704812268882126086134656108363777

    The verifier begins here, before it reads a page value. It checks exactly that

    323 x 34 x (a + 1)2 + 1 = o2.

    a and o are published witness coordinates. They are displayed constants, not derived by the browser.

    The recurrence

    chia(0)=1, chia(1)=a
    psia(0)=0, psia(1)=1
    T(n+2)=2aT(n+1)-T(n)

    Every pair obeys the exact Pell identity

    chia(n)2 - (a2-1)psia(n)2 = 1.

    The offline check runs this recurrence for 209 pairs and checks the identity each time. That finite run tests the transcription; the cited proof supplies the universal lemma.

    Constraint 7, held as algebra

    J = 4a psia(4a)
    u = chia(J)
    r = psia(J) / (16a2)
    y = 2a

    The divisibility chain from the Pell sequence makes r an integer:

    psia(2)4 divides psia(4a)2 divides psia(J).

    Then the Pell identity at index J is exactly residual 7:

    u2 - 16(a2-1)r2y4 = 1.

    >

    r has more than 101056 decimal digits.
    The lower bound is derived from 2a-1 > 1055, 4a-1 > 1055, and psia(n) at least (2a-1)n-1.

    Constraint 8, closed without expansion

    beta = a + u2(u2-a)
    c = (2beta2 - x - 1) / u
    d = (2beta - n) / (4y)

    With the quotient integrality supplied by the cited congruence lemmas, those definitions give

    x + cu = 2beta2-1 = chibeta(2)
    n + 4dy = 2beta = psibeta(2).

    Residual 8 then becomes the two-step Pell identity. The verifier expands that identity for beta from 2 through 100. It does not pretend those samples reprove the general congruence lemmas.

    The check

    Recomputed now

    loading
    • Wilson's remainder uses modular multiplication, then trial division checks the same N by a separate route.
    • Every reachable tuple uses exact BigInt residuals. No floating-point number enters P.
    • The zero preset is independently fixed at S = 1095 and P = -2188.
    • The witness preset materialises twelve zero residuals and deliberately leaves two unsatisfied.

    Published constants

    valuewhat it means
    25total polynomial degree
    26all variables a through z, including k
    14squared integer residuals
    87additions and multiplications in the paper's proof convention
    2smallest positive value and witness target

    These five values are displayed from the 1976 paper. The browser does not derive publication facts from its own code. The verifier does independently recover 26 variables, fourteen residuals, and degree 25 from a separate transcription.

    Free choices

    • You choose N in the Wilson instrument.
    • You choose all 26 polynomial coordinates. The three presets are conveniences, not samples with statistical meaning.
    • The page limits coordinate fields to 140 digits and k to 1,000,000. Those are browser safety choices, not mathematics.
    • The residue trace shows at most its first 64 factors. The remainder above it still uses every factor.
    • The 87-cell strip is a visual layout choice. Its count is published; its arrangement is not.

    Uncertainty and boundary

    • No measurement uncertainty or randomness occurs here.
    • The finite Wilson sweep in the verifier is not the universal proof. Wilson's theorem and the positive-range theorem are cited results.
    • The verifier does not expand u, r, c or d. It checks the algebraic closure and finite recurrence samples, then relies on the published divisibility and congruence lemmas.
    • A positive P is prime only on the stated domain of nonnegative integers. The polynomial also takes zero and negative values.
    • No density claim is made. “Almost always negative” would require a sampling measure the sources do not supply.

    Apparatus

    1. James P. Jones, Daihachiro Sato, Hideo Wada and Douglas Wiens, “Diophantine Representation of the Set of Prime Numbers,” The American Mathematical Monthly 83(6), June-July 1976, 449-464. Publisher record and DOI. The explicit formula, theorem, degree, variable count and operation count come from this paper.
    2. Yuri V. Matiyasevich, “Diophantine Representation of Enumerable Predicates,” Mathematics of the USSR-Izvestiya 5(1), 1971, 1-28. DOI. This is the completion of the Davis-Putnam-Robinson-Matiyasevich theorem, not a result caused by the 1976 polynomial.
    3. Eric Zheng, “A Nonnegative Integer Solution to the Jones-Sato-Wada-Wiens Polynomial,” 20 March 2021. Author PDF. The compressed witness for 2 and its exact manageable coordinates come from this note.

    Full source checks, independent formulas and known limits are in the verification note.