A pattern that has not started yet
Assumes: Two counters, and one displaced term · The third digit
Two counters and one displaced term found the odd-saltus class of hexadecimal codes carrying three eventual Grundy sequences rather than four, because had been made a family of its own by a key that read a code’s first sixty values. It closed on the thing that produced that:
is the only code in the class whose period takes two blocks to settle, and a pre-period is a much rarer thing in this family than a defect.
Neither half survives. A pre-period is the ordinary case, and ’s is not two blocks but fifty-four heaps.
Two codes in five
A hexadecimal code’s Grundy sequence, when it settles at all, settles into an arithmetic period: a block of values repeating with a constant added each time round. Before that block there may be a stretch of heaps whose values belong to no pattern — a pre-period — and its length is the heap at which the repetition begins.
Sweeping every code and asking where its pattern starts: of the 137 two-digit codes that settle, 47 have a pre-period. Of the 2,050 three-digit codes, 843 do — two in five.
That is not a rarity. The rung below’s sense that it was one came from having looked at a single class of twenty-one codes, in which exactly one had a pre-period; generalising from a class chosen for a different property is exactly how a false rarity is produced.
Nor are they short. The longest pre-period among the two-digit codes is 142 heaps, which is longer than most periods in this family by an order of magnitude. And 321 three-digit codes have a pre-period longer than their own period — more heaps outside the pattern than inside a single instance of it.
That is the shape that makes a fixed-depth reading dangerous. A sequence read to sixty heaps, on a code whose pattern starts at fifty-five, is fifty-four heaps of pre-period and five of pattern, and it will look like a sequence with a pattern that is not the pattern it has.
One clarification about how the start is found, because everything here depends on it. The search takes the earliest heap from which the values repeat with a constant added, scanning start positions upward and period lengths upward from there. So the pre-period reported is the shortest one that works, not the first one somebody noticed, and a code reported with no pre-period genuinely has its pattern from heap one.
That matters because a longer start always “works” once a shorter one does — a sequence periodic from heap 5 is periodic from heap 40 as well. Reporting the minimum is what makes the number a property of the code rather than of the search.
What happened to the siblings
and have the same period of nine and the same saltus of three. ’s pattern starts at heap one; ’s starts at heap fifty-five.
So the rung below’s key — a code’s first sixty values — was reading entirely inside its pattern and almost entirely inside its pre-period. Two codes with the same eventual sequence looked like two families, and the key had five heaps of overlap with which to notice.
Six periods, not two blocks. The rung below’s phrase understated it by a factor of three, and the understatement is not a slip: two blocks is what a sixty-value window can show, so the phrase is a description of the instrument rather than of the code.
And three defects turn out not to be defects
The rung below recorded an open question as well as a finding: three isolated defects at heaps 6, 15 and 54 have no account. Those are the heaps at which and disagree, and they looked like three unrelated irregularities in an otherwise identical pair.
They are the pre-period. The two sequences differ at 6, 15 and 54 and are identical from heap 55 onwards, which is exactly where ’s pattern begins. The three defects are the last three disagreements before one of the two codes finishes settling.
That is not a small reclassification. Three isolated defects in a shared sequence would be a genuinely odd object, and the natural reading of it — that two codes are almost the same game with three exceptions — is wrong. The right reading is that one code takes longer to forget its small heaps, and the disagreements thin out as it does.
What predicts it
The rung below guessed at a mechanism — that is slow because its take-one digit is 1 and its take-two digit is 2, so a heap of one and a heap of two behave unlike every other member’s — and the sweep can score the first half of it.
The take-one digit, which says what a player may do to a heap of one counter, is a strong predictor. The rate runs from nought to 78 per cent across the sixteen digits. Two of them — and — never produce a pre-period at all, over 144 codes between them. Three — , and — produce one on more than half.
So how the game treats the smallest heap decides most of how long the whole sequence takes to settle, which is the rung below’s intuition confirmed.
It is not a rule, and the counterexample is the pair the page is about. and share the take-one digit and differ only in the take-two digit, and one has a pre-period of fifty-four while the other has none. So a single digit predicts strongly and determines nothing, which is what this anchor has found about the digits at every rung.
What the two digits that never do have in common
The two digits that produce no pre-period at all are worth naming precisely, because a rate of exactly nought over 144 codes is the kind of number that has a reason.
They are and — binary and . A hexadecimal digit’s four bits say which numbers of heaps a move taking that many counters may leave: bit nought for leaving no heap, bit one for leaving one, bit two for two, bit three for three. So permits taking a whole heap, splitting into two, and splitting into three, and forbids leaving a single heap; permits everything except taking a whole heap.
What is not obvious is why either should settle instantly. The neighbouring digits and , which differ from these by one bit each, produce pre-periods on a third and on more than half of their codes respectively. So the pattern is not these bits are set; it is something about the particular combinations, and this page has the rate and not the reason.
That is the honest limit of a sweep over digits: it can report which of sixteen behave and cannot say what behaving consists of. What it does establish is that the answer, whatever it is, lives in the smallest heap — because the take-one digit is the only thing being varied.
What a key would have to read
The practical consequence is a caution and it is worth stating as one.
A family key built from a code’s first values is a key on a pre-period unless is known to exceed it. The rung below used sixty. Three two-digit codes have a pre-period of at least fifty-four, so sixty was not comfortably clear even of the narrow family; and a key safe against every two-digit code would need 143 values.
There is no way to know the safe length in advance, because the pre-period is what the sweep is trying to find. So the honest fix is not a longer key but a different one: key a family on its period and saltus, which are properties of the eventual sequence, rather than on a prefix, which is a property of the window. A period with a constant added is where the period and saltus become the objects, and they are exactly what a key should be made of.
What this does to the anchor’s other readings
Two earlier results on this anchor were reported against windows, and both need re-reading in the light of a pre-period being ordinary.
The third digit swept every three-digit code and reported 21 with a saltus that is not a power of two. That is a statement about the eventual sequence and the search finds the eventual sequence’s period, so it is unaffected — a pre-period delays the pattern and does not change it.
The code that climbs by three is the two-digit member of the class, and the pre-period sweep says its pattern starts at heap one, so nothing there was read through a pre-period either.
What is affected is any statement of the form these two codes have different sequences, and that is exactly the statement the rung below made and corrected. So the reclassification is contained: one pair of codes, one family count, and three defects. The anchor’s numbers about periods and saltuses stand, and its numbers about which codes are alike are the ones a pre-period can quietly ruin.
That is a general point about this family. A period and a saltus are properties of a tail; a family key on a prefix is a property of a head; and a pre-period is precisely the disagreement between the two.
Why a sequence should have a pre-period at all
The mechanism is worth a paragraph, because it is not obvious that an arithmetic sequence should need a run-up.
A Grundy value is a mex over the values a move can reach, and a move on a large heap reaches heaps of every size below it — including the small ones. So the small heaps’ values are inputs to every later value, and their influence persists until the mex has enough large options that the small ones are never the least missing value. A code that assigns unusual values to its first few heaps therefore perturbs everything above them, and the perturbation dies out only when the sequence’s values have grown past the small heaps’ values.
That predicts what the sweep finds: the pre-period is longer when the small heaps behave unlike the rest, and the take-one digit is the strongest single predictor because it is the first heap of all. It also predicts that a pre-period should be roughly as long as it takes the sequence to grow past its own small values, which on a sequence climbing by three every nine heaps is a couple of dozen heaps — and ’s fifty-four is two of those.
That is a plausible account and it is not a measurement. What is measured is the association with the first digit; the rest of the paragraph is an explanation looking for a test.
What this does not settle
The sweep has a depth and a period cap. Two-digit codes to 360 heaps with periods up to 60, three-digit ones to 160 with periods up to 40. A code whose pattern starts beyond that depth is recorded as not settling and is excluded, so the sweep cannot see the longest pre-periods there are — it can only see the ones short enough to leave room for two instances of the period after them. The reported longest, 142, is a lower bound on the family’s longest.
And that biases the rate downwards. Codes with very long pre-periods are exactly the ones the sweep drops, so two in five is an underestimate of how many codes have one. The direction of the bias is at least unambiguous.
The prediction is by one digit. The take-one digit is the only structural variable tested. The rung below’s mechanism names two digits, and the take-two digit’s contribution is not measured here, which is a gap the same sweep could fill.
And a pre-period is not a defect. The two are different objects and the page is partly about not confusing them: a defect is a value inside the pattern that breaks it, and a pre-period is a stretch before the pattern starts. The reclassification of the three heaps above turns three of one into the tail of the other, which reduces the anchor’s stock of defects by three and is worth noting because defects are what this family is usually described by.
And the three reclassified heaps are one pair of codes. The account offered — three defects being the tail of a pre-period — is checked on against and nowhere else. Whether other pairs the anchor has recorded as almost identical with a few defects are the same phenomenon is a question the same comparison would answer, and it has not been asked. The code that climbs by three is the place to start, since it is the single two-digit code in the class and the natural reference for the rest.
Normal play throughout, and every value computed by the ordinary mex recursion.
The instrument, and the object
There is a version of this page’s finding that has nothing to do with hexadecimal codes, and it is the one worth carrying.
The rung below built a key out of a code’s first sixty values, used it to group codes into families, and reported the grouping. The grouping was wrong on one code because the key was measuring the head of a sequence and the families are a property of its tail. Nothing about the arithmetic was wrong; the instrument was pointed at the wrong part of the object.
That is the third time this site has caught the same shape. The entry fee was the cap found a quantity that was a property of a sweep’s size limit rather than of a ruleset. A threshold is a detection limit found one that was a property of how fine a difference a sweep could resolve. And here a family is a property of a window’s length.
The three have a common test and it is cheap: vary the instrument and see whether the answer moves. A key of sixty and a key of a hundred and forty-three group these codes differently, and that is enough to know the grouping is not about the codes. Nobody had varied it, because a key is the sort of parameter that gets chosen once and then stops being visible.
Where the ladder goes next
The hexadecimal anchor has six rungs: a period with a constant added, the third digit, the code that climbs by three, the only way to split into three, what the class is a perturbation of, and now how long a perturbation lasts.
The rung above is the pre-period’s length as a function. The take-one digit predicts whether there is one; nothing here predicts how long, and the mechanism above says the length ought to be roughly how long the sequence takes to climb past its own small values — which is a quantity computable from the saltus and the period without running the sequence. Fitting the measured lengths against that estimate is the same sweep with one more column, and it would say whether the perturbation dies out at the rate the mex suggests or at some other rate. A family whose settling time can be predicted from its period is a family whose sweeps can be run to the right depth rather than to a guess.
Two neighbours are worth the trip. The third digit is the sweep this whole class comes out of, and it is worth reading beside a page about how much of a sweep can be pre-period. And a period is a proof is where a periodicity becomes a theorem rather than an observation, and its whole argument depends on knowing where the period starts — which is the quantity this page measures.
Part 6 of 7
One argument about Hexadecimal. The parts either side of it:
What links here
Essays that reach for this one mid-argument — the half of a link its own author cannot write down.
The objects named here
The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.
ApproximationCodesCounterexampleEnumerationGrundy sequencesHeapHexadecimalImpartialInvariantOctal gamePeriodicitySaltus
- The only way to split into three counterexample, enumeration, hexadecimal, impartial, invariant, octal game, periodicity, saltus
- The condition that survived the wider sweep counterexample, enumeration, grundy sequences, impartial, invariant, periodicity
- The values that keep arriving approximation, enumeration, grundy sequences, impartial, octal game, periodicity
- A function with no formula counterexample, enumeration, impartial, invariant, octal game
- The family the Fibonacci numbers belong to counterexample, enumeration, impartial, invariant, periodicity
- The period is small and the proof does not say so counterexample, grundy sequences, impartial, octal game, periodicity