THE FOLD / GRIND / BACKPROP / THE PERCEPTRON
THE PERCEPTRON
the first learning machine — and its XOR wall
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Perrin sequence. Seed it P(0)=3, P(1)=0, P(2)=2, then P(n) = P(n−2) + P(n−3): 3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, …
It hides a near-perfect primality test. For every prime p, the number p divides P(p) — that is, P(p) ≡ 0 (mod p). So to test whether p is prime, compute P(p) mod p and see if it’s zero. For a long time it was hoped that no composite could ever fool this test. It was almost true: the smallest composite that sneaks through — a Perrin pseudoprime — is 271441 = 521², and they only get rarer from there. So the test is fast and nearly flawless, but not a proof of primality.
LIT verified live: P(p) ≡ 0 (mod p) for every prime p under 2000, no composite under 4000 passes, and 271441 (composite, 521²) genuinely does pass — the first liar (window.__perrin). FIG the ‘primes pass’ direction is exact and proven; the converse is false but rare, carried honestly — the test detects, it does not prove.
It hides a near-perfect primality test. For every prime p, the number p divides P(p) — that is, P(p) ≡ 0 (mod p). So to test whether p is prime, compute P(p) mod p and see if it’s zero. For a long time it was hoped that no composite could ever fool this test. It was almost true: the smallest composite that sneaks through — a Perrin pseudoprime — is 271441 = 521², and they only get rarer from there. So the test is fast and nearly flawless, but not a proof of primality.
LIT verified live: P(p) ≡ 0 (mod p) for every prime p under 2000, no composite under 4000 passes, and 271441 (composite, 521²) genuinely does pass — the first liar (window.__perrin). FIG the ‘primes pass’ direction is exact and proven; the converse is false but rare, carried honestly — the test detects, it does not prove.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this in THE GATEKEEPER — the boss domain of the check you must pass to get through. Perrin is a gatekeeper that lets every prime through and almost never lets a composite by. AVAN (AI) built the instrument: the mod-tester, the prime-lights, the necessary-vs-sufficient gap.
The weave: David names the seat (the gatekeeper); I make the sequence test each number and show where the gate is fooled — the residues in 1D, the prime-detector grid in 2D, the necessary/sufficient split in 3D. The sphere is the seam. Credit: Édouard Lucas (1876); R. Perrin (1899); the pseudoprimes catalogued by Adams & Shanks (1982); OEIS A001608.
The weave: David names the seat (the gatekeeper); I make the sequence test each number and show where the gate is fooled — the residues in 1D, the prime-detector grid in 2D, the necessary/sufficient split in 3D. The sphere is the seam. Credit: Édouard Lucas (1876); R. Perrin (1899); the pseudoprimes catalogued by Adams & Shanks (1982); OEIS A001608.
3 ONE DIMENSION
The Perrin values 3, 0, 2, 3, 2, 5, 5, 7, … along a strip, and beneath them P(n) mod n. It lands on 0 exactly at the prime indices — the signature the test reads.
4 TWO DIMENSIONS · INTERACTIVE
Every number n tested by the gate: it lights green when P(n) ≡ 0 (mod n) — “passes as prime.” Compare with the true primes: in this range they match exactly. Probe a number to see its Perrin residue.
5 THREE DIMENSIONS + AVAN’S INVERSE
The prime indices where the gate opens, threaded as a turning helix of Perrin residues — green where P(n) ≡ 0 (mod n), the primes passing through.
AVAN’s addition (the inverse-companion): the magenta marks are the pseudoprimes — composites like 271441 that pass anyway. The proven direction is prime ⇒ passes: a necessary condition, always true. The test uses the inverse — passes ⇒ prime — and that inverse is false, just very rarely. This is the exact gap between a necessary and a sufficient condition: forward it never fails, backward it fails at 271441, 904631, … The magenta liars are the places where inverting a one-way implication betrays you — the honest reason a fast test is not a proof. Green is where the implication is safe to run both ways; magenta is where reading it backward lies. A gate that never turns a prime away can still, once in a great while, wave a fraud through.
LIT Genuine perceptron (Frank Rosenblatt, 1958; Novikoff convergence 1962; Minsky-Papert XOR limit 1969). Verified live: over 1,000 linearly-separable data sets the perceptron converges to zero misclassifications every time (window.__perceptron.converged === true), and on XOR it never converges. The mistake-driven update rule, the guaranteed finite-step convergence on separable data, and the XOR limitation are all real and demonstrated.
FIG No metaphor is doing the work: the update rule, the convergence on separable data, and the concrete XOR failure are all real and checked. Convergence is guaranteed only when a separating line exists — the honest limit shown by the XOR button.
FIG No metaphor is doing the work: the update rule, the convergence on separable data, and the concrete XOR failure are all real and checked. Convergence is guaranteed only when a separating line exists — the honest limit shown by the XOR button.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of BACKPROP · David Lee Wise (ROOT0), with AVAN