Pattern · the experiment runs in your browser

Off by One

The 1885 pamphlet that printed the three Beale ciphers also printed the key to paper No. 2, the Declaration of Independence, with its words counted off in bracketed numbers, and the count is wrong: a word goes uncounted after the 240th, and 480 is printed twice. Paper No. 2, the one that was read, follows the miscounts. Read the unsolved paper No. 1 by the same numbers and three runs of the alphabet stand up in it, the longest 17 letters; count the words yourself and they fall apart. Turn the first miscount like a dial: the runs appear only at the pamphlet's setting.

147a436bl195c320di37e122f113g6h140i8i120j305kp42l58m461mh44n106o301ht13p408po

Paper No. 1, its 188th to 207th numbers, each read as the first letter of a word of the Declaration of Independence by the numbers the 1885 pamphlet prints beside it. The red letter is what the same number gives if you count the pamphlet's words yourself instead.

Three papers of numbers

In 1885 a pamphlet printed at Lynchburg, Virginia, The Beale Papers, told of gold, silver and jewels buried in Bedford County in 1819 and 1821, and printed three papers of numbers: one for the place of the vault (No. 1), one for what is in it (No. 2), and one for the names of the men it belongs to, with “the names and residences of the relatives and others, to whom they devise their respective portions” (No. 3). Only No. 2 was read. The pamphlet prints the key to it:

“To enable my readers to understand the paper numbered “2,” the Declaration of Independence is given, by the assistance of which its hidden meaning was made plain” The Beale Papers (Lynchburg, 1885), p. 17

and, after paper No. 2, says how to use it: “By comparing the foregoing numbers with the corresponding numbers of the initial letters of the consecutive words in the Declaration of Independence, the translation will be found to be as follows” (p. 20). Each number is a word; the letter is the word's first. Nos. 1 and 3 have never been read. This page does not read them either. It asks a smaller question that has an answer: was paper No. 1 made with the same numbered Declaration as paper No. 2?

The numbers the pamphlet prints are not the count of its words

The pamphlet numbers the first ten words of its Declaration, then prints a number in brackets after every tenth word, and at the end after each of the six words that follow “(810)”. Count the words yourself and the printed numbers go wrong in five places. Between “(240)” and “(250)” stand eleven words, so one went uncounted, and from there on a printed number is one less than the word's place. Further on, “(480)” is printed twice, ten words apart. Between “(500)” and “(510)” stand only nine, because “meantime” is numbered as if it were two words, and two more words go uncounted later, one after “(630)” and one after “(670)”. The printed numbers stop at “(816)”.

The pamphlet's page: “pursuing (240) invariably the same object, evinces a design to reduce them under (250) absolute despotism”
The 1885 print, between its “(240)” and “(250)”: invariably the same object, evinces a design to reduce them under, eleven words for ten numbers. (Wikimedia Commons, File:Beale_Papers.djvu, page 17.)
printed numbersa printed number stands for the word that many places further onwhere the drift changes
1 to 2440the printed numbers are the count of the words
246 to 470+1between “(240)” and “(250)” stand eleven words
481 to 504+11“(480)” is printed twice, ten words apart
506 to 634+10between “(500)” and “(510)” stand nine words: “meantime” is numbered as two
636 to 674+11between “(630)” and “(640)” stand eleven words
676 to 816+12between “(670)” and “(680)” stand eleven words
past 816?no number is printed after “(816)”

Paper No. 2 does not follow the count of the words. It follows the printed numbers, slips and all.

Decode paper No. 2 yourself

 

 

 

Letters in capitals come out wrong: the word's first letter is not the one the pamphlet's decipherment needs there. A ? is a number the print cannot place. Numbers whose letters the decipherment prints as figures (“1819”, “$13,000”) are shown but not counted.

Paper No. 2 has 762 numbers as printed (763 in the usual count, which splits a printed “108” into 10 and 8). The decipherment the pamphlet prints shows the letter for 671 of them; the other 91 spell words it prints as figures or rewords (“1819”, “$13,000”, “one thousand” where the cipher spells “ten hundred”), and they are not counted. Of the 671, by the pamphlet's numbers 649 give the letter it needs; by the count of the words, 527. Every number the count of the words gets wrong and the printed numbers get right lies past the first slip. The 15 misses left are misses by both readings, and of another kind: 7 times the letter is a y, which begins no word of the Declaration, and the number is 811: by the pamphlet's numbers that is “fundamentally”, which the pamphlet marks “(811)” and whose last letter is y; 3 times the number is 95 for a u, where the pamphlet prints “inalienable”; most printings of the Declaration before 1823 read “unalienable”, as Stephen Matyas has found; and five times the number gives a word other than the one its letter needs (84 twice, 96, 108, 440), which Nick Pelling read in 2018 as copying slips in the printed cipher: 85 printed as 84, 95 as 96, “10, 8” run together as 108, and 40 as 440. The print cannot place 1005, past its last number, which stands for every x, or 505, in the middle of a miscounted stretch.

The same steps, from paper No. 2 alone

Forget the printed numbers for a moment and ask only paper No. 2. For each of its numbers, which shift along the Declaration's words would make it give the right letter? A program that looks for the fewest steps that explain the most letters finds five steps, at the places and of the sizes of the printed numbers' drift. They explain 652 of the 671 letters. The fit never looks at the printed numbers; they are drawn beside it only to show that the two agree.

Grey dots: for each number of paper No. 2, every shift that would make it give its letter. Black: the shift the fitted steps use. Red line: the steps fitted to paper No. 2 alone. Green dashes, drawn just above: the drift of the pamphlet's printed numbers, whose slips are +1 at 245, +10 at 471 to 480, −1 at 505, +1 at 635, +1 at 675. Shaded bands: stretches where paper No. 2 has no number, so a step could fall anywhere inside them.

Now read paper No. 1 both ways

Paper No. 1 has 520 numbers, up to 2,906; 10 of them point past the end of the Declaration, and 43 fall where the printed numbers do not say which word they mean (after 816, or inside a slip). Read it by the pamphlet's numbers, and three stretches of it run up the alphabet:

Count the words instead, and they come apart: the longest run left is 8 letters (efghiijp). Read by the pamphlet's numbers, 39 letters of paper No. 1 stand in alphabetical runs of eight or more; by the count of the words, 8.

Paper No. 1, number by number

Yellow: letters in an alphabetical run of eight or more. Red outline: the pamphlet's numbers give a different letter here from the count of the words, or cannot place the number. A ? is a number that points past the Declaration's end or into a stretch where the reading cannot say which word it means.

The run that starts at No. 188 is the one James J. Gillogly published in 1980, in an article suggesting that paper No. 1 may be a hoax. It is usually quoted from him as abfdefghiijklmmnohpp, with an f where the alphabet wants a c. That is the string the third reading above gives: the Declaration as the National Archives transcribes it has no “a” in “to institute new Government”, where the pamphlet prints “to institute a new government”, so its 195th word is “for”, where the pamphlet's is “changed”.

Turn the slips like dials

Paper No. 2 fixes each slip's size. If paper No. 1 had nothing to do with that numbered sheet, nothing in it would care what size you give a slip. Each dial below moves one slip, shifting every number of paper No. 1 that falls after it.

The dials

 

Turn the first dial, the word left uncounted after the 240th, and paper No. 1 has 39 letters in long runs at exactly the pamphlet's setting, +1, and never more than 16 at any other setting from −15 to +15. Paper No. 3 never has more than 8 at any setting. The second dial, the doubled 480, peaks at its printed setting too, but only two letters of the runs depend on it, so it decides little on its own. The third, “meantime”, keeps all 39 at every setting, and at a few settings far from its own adds a letter or two to the run at No. 44 (41 at +12); the last two move no letter of any run. So the dials speak for the first slip, and a little for the second; the runs say nothing about the other three. And the place of the first slip matters as much as its size: of the 816 places a one-word slip could take effect, only 20 give paper No. 1 its runs: the ones after word 231 to after word 250. The pamphlet's numbers slip between their “(240)” and “(250)”.

How often does chance do this?

Read by the pamphlet's numbers, paper No. 1 gives 467 letters and 53 numbers the print cannot place, and its longest run is 17 letters. If each of its 520 readings, a letter or a ?, were drawn independently with the frequencies they actually have (a ? breaks a run), a run that long would turn up with probability 7.1 × 10−9, computed exactly. A model of independent letters is not the whole truth about any text, so here is a second test that assumes nothing about letters: shuffle the paper's own 520 numbers and read them by the same numbering. In 100,000 shuffles the longest run never reached 17; the longest any shuffle produced was 12.

Shuffle paper No. 1 in your browser

 

Neither test says anything about the numbering yet. That is the dial's question, and it has a test of its own. Shuffle the paper's numbers, then turn the first dial from 0 to the pamphlet's setting: how many letters does the slip add to long runs? On the paper itself it adds 31. In 20,000 shuffles it never added that many (the most was 17), and no other setting of the dial did either. The statistic, letters standing in alphabetical runs of eight or more, was chosen after looking at the paper, because of the run Gillogly found by eye, and every test here uses it, so none of these figures is a clean significance level. What they measure is how far outside chance the runs sit, and that only the pamphlet's setting of the first slip puts them there.

What this shows, and what it does not

Paper No. 1 was made, at least in part, with the numbered key that paper No. 2 was enciphered with, the first of its counting slips included. Its alphabetical runs appear when it is read by the pamphlet's numbers, and at no other size or place of the first slip; read by the count of the words, its longest run is 8 letters. A run like abcdefghiijklmmno is what picking a word for a, then one for b, and so on down the alphabet produces: read by this key, it spells the alphabet, not words.

It does not show who made the papers, or when, or whether anything was ever buried. It does not show that the rest of paper No. 1 is empty: the runs are 39 of the 467 letters it gives. It says nothing about paper No. 3, which has no run of eight letters by either reading (its longest is 7).

Nor does it settle whose key it was. Stephen Matyas has argued that the pamphlet's numbering is its author's reconstruction of the key from paper No. 2: “The misnumbered DOI in Ward’s pamphlet is the result of the anonymous author’s best attempt to simulate Beale’s key”, as Nick Pelling quotes him. If paper No. 2 was enciphered by January 1822, as the pamphlet's story has it, whoever made paper No. 1 held the same numbered key and used it to spell out the alphabet; if the slips began with the pamphlet's numbering, so did that part of paper No. 1. Either way, one numbered key made both.

Who found what

Carl Hammer saw the strings ten years before Gillogly. His invited paper “Signature Simulation and Certain Cryptographic Codes” (Third Annual Simulation Symposium, 14 January 1970; in the National Security Agency's release, NSA document 656733) says that the pamphlet's Declaration as key “produces alphabetical strings” but “little intelligence”, and tries reading paper No. 1's numbers a word or more off (“lags or leads”), judging each reading by its letter frequencies.

James J. Gillogly, “The Beale Cipher: A Dissenting Opinion”, Cryptologia 4(2), April 1980, pp. 116–119, reported the run; its abstract says the paper reports “a statistical anomaly” in paper No. 1 “which suggests that it may be a hoax”. We found no copy of the article we may fetch, and have not read it. The string is quoted from him in part 9 of the sci.crypt Cryptography FAQ: “Gillogly [GIL80] decrypted B1 with the DOI and found some unexpected strings, including ABFDEFGHIIJKLMMNOHPP.”

The slips were worked out from paper No. 2 long before this page. Hammer's “How did TJB encode B2?” (Cryptologia 3(1), 1979, pp. 9–15; we read it in the same NSA document) lists George Hart's corrections to paper No. 2's numbers, measured from a count of the Declaration other than the pamphlet's printed numbers (they move 96 to 241 back by one, where the printed numbers need no change): plus one for 53 and 84, minus one for twenty-one numbers from 96 to 241, plus ten for four from 449 to 505, plus nine for eleven from 511 to 620, plus ten for 643, 647 and 666, plus eleven for 807 and 811, minus eleven for 1005. Stephen M. Matyas Jr., in Beale Treasure Story: The Hoax Theory Deflated, describes the encipherer's “three clerical errors”, among them a word “accidentally omitted after word 241 and before word 246”, and “one additional clerical error”, ten words skipped “immediately following word 480” (as quoted by Nick Pelling, Cipher Mysteries, 16 December 2018; we have not read the book).

John C. King, “A Reconstruction of the Key to Beale Cipher Number Two”, Cryptologia 17(3), July 1993, pp. 305–317, used such a reconstruction on paper No. 1. Its abstract says it “reveals greater statistical anomalies” in paper No. 1 “than previously reported by Gillogly”, using “the 1885 pamphlet versions of the ciphers”. We could read only the abstract, so we cannot say how much of this page it already holds.

Nick Pelling (Cipher Mysteries, 21 November 2013) read paper No. 1 with “the modified index numbers that are required to transform Ward’s DoI into the letters that reproduce the B2 plaintext” and found it “more coherent (i.e. even more improbable than before)”, with Gillogly's string becoming abcdefghiijklmmnohpp. On 15 November 2018 he gave all three runs and concluded that “not only was the same non-standard DoI used in both, but also the same enciphering tables derived from it, numerical errors and all”, adding “though I believe this is highly likely, I have to point out that this remains speculative”.

The repository david-fitzgerald/beale-ciphers (complete February 2026) reads paper No. 1 with a variant of the Declaration that has eight changes from the standard text and reports “the 17-character run and two of 11”; it tried “Offsets, insertions, deletions, hill-climbing” on that Declaration and found that “No single edit improves all the Gillogly runs”. And under Pelling's 2010 post a commenter signing H. wrote on 28 May 2024 that adding one to every number above 241 “Is sufficient to produce the Gillogy string in B1 (using B2 corrections)”. That is the first slip.

Ming-Yu Hsieh, “A reproducible re-examination of Beale ciphers B1 and B3”, Cryptologia 50(5), 2026, pp. 550–561, reproduces Gillogly's run against models of chance using the Project Gutenberg text of the Declaration; the skeptic's report in its own repository lists as still to do a re-test “against the Ward-pamphlet Declaration shifted by ±1, ±2, ±3 in the numbering”.

What this page adds is a null for the numbering: the dials, the moved slip and the shuffles, runnable in your browser and by the program in the record below. The runs themselves have been set against chance before (Hsieh's article is the latest), and shifted numberings have been tried, but in the sources we could read nobody set a numbering against chance. King's article, which we could not read, may have.

Try your own key

Paste any text and read any paper with it, counting the words one by one. Nothing you type leaves your browser.

Your key

 

 

The record

The papers. The three ciphers are read from the scan of the 1885 pamphlet on Wikimedia Commons (File:Beale_Papers.djvu, public domain), pages 20 to 22. The numbers are those of the validated Wikisource transcription of that scan, after every disagreement among five web transcriptions and an OCR of the scan was settled against the image; eight places disagreed. Two readings stay uncertain at the scan's resolution (No. 1's 148th number, 116 or 110; No. 3's 567th, 236, 235 or 233). Every figure on this page is the same with any of these readings except the probability under independent letters, which becomes 6.9 × 10−9 if No. 1's 148th number is 110. Three of paper No. 2's damaged or ambiguous numbers were settled by the decipherment, so they are counted among its right letters by construction. Paper No. 1 has 520 numbers, No. 2 762, No. 3 618.

The key. The Declaration is the pamphlet's own, pages 17 to 20, from the validated Wikisource transcription read against the same scan: 1,324 words, counting “self-evident” as two (the pamphlet's “(80)” falls where that count puts it) and a dash as a break between words. After its first ten words, which are numbered one by one, it prints 87 numbers in brackets, “(20)” to “(816)”, and each is recorded with the word it follows. The third reading uses the National Archives transcription, counted the same way (1,323 words). A number that falls between two of the pamphlet's printed numbers is found by counting from the nearer one, as a reader would; a number that rule cannot place (the middle of a miscounted stretch, the ten numbers that the doubled “(480)” labels twice, and everything past “(816)”) reads as ?.

The letters paper No. 2 carries. The decipherment the pamphlet prints (pages 20 to 21) writes some of what the cipher spells as figures or other words. Those stretches are written as the cipher spells them and marked, and every count on this page leaves them out: 91 of No. 2's numbers.

The check. verify.mjs recomputes 49 of the figures in this page's text from data.json, with the same engine.mjs the page runs, checks the five places where the printed numbers stop being the count, and holds the headline claims (the runs, the dials, the moved slip, the shuffles) as constants. Run it with Node 18 or later: node verify.mjs takes about 45 seconds and remakes the shuffles 20,000 at a time; --trials 100000 remakes the page's 100,000 exactly; --mutate plants six faults and shows each one caught (about five minutes). Outside the site's repository it fetches the page, data.json and engine.mjs from artwaste.land. The analysis that wrote the figures is research/the-beale-papers/analyze.mjs, the page builder build-page.mjs.

When the page loads, your browser recomputes some of the figures in its text from data.json and says here whether they agree.

Corrections

None yet. A correction will be dated here, with what the page said and who found it.

The claims record 76 claims re-read against their sources, 22 November 2026

Written 2026-11-22. Claims re-read against their sources on 2026-11-22: 76 checked, 43 confirmed, 10 wrong, 0 unverifiable, 23 first-hand observations checked against their record. By claude-gifted-feynman-khu7fr, one agent (general-purpose, read-only) on oversight/claims-pass.md on 2026-11-21 and 22 (the layer not yet live: the local page, its script, engine and data; the check run in an empty directory in the repository's layout, default, with --trials 100000 and --mutate; every entry of assay/sources/beale-ciphers-measured.json read against its source, assay/sources.mjs --online, and the 1885 scan viewed at pp. 17 to 21; the B2 tallies, the step fit, the dials, the moved slip and both nulls recomputed with its own code and generator); every finding re-read at its source by the author before the edit (results.json's dial profiles; NSA DOCID 656733's OCR text for Hammer 1970; the Fitzgerald README fetched again; the 2024 comment; Pelling 2013), and the verifier and the page run again after the edits.

A new layer, read before it landed. The agent audited the working tree at commit 1c840ce6 (the branch, not main). It confirmed every quotation and citation as exact, reproduced every figure with the page's seeds and again with its own code, and viewed the five slips on the scan. What it found was in the wording around the numbers. The dek said every miscount works as a dial, where only the first does. The record said the check recomputes every figure, where it read only the marked ones. And the prior work left out Hammer's 1970 paper (in the same NSA release the page cites), Fitzgerald's repository and a 2024 comment that found the first slip, so "What this page adds" claimed the shifted test as new. The `wrong` count is the HIGH, the MED and the eight MINOR claim lines. Four more findings (the prior work, what the 7.1 x 10^-9 draws, the third dial, the missing command line) attach to claims that are true as far as they go, and one (a stale mirror) to the repository; each has a line below.

Claims

What was done

The assay office: what a record is, and every layer re-read so far.