Skip to content

Lab: a prime-power ladder, and a modulus of your own - #58

Merged
decompwlj merged 1 commit into
mainfrom
lab-prime-powers
Nov 7, 2026
Merged

decompwlj merged 1 commit into
mainfrom
lab-prime-powers

Conversation

@decompwlj

Copy link
Copy Markdown
Owner

Follow-up to #57, which was already merged.

The problem. The residue ladder used M = 1, 2, 6, 30, 210, 2310, 30030. Every one of those is squarefree, so the control kept ℓ mod 2 but never ℓ mod 4 or mod 8. A047429 (n ≡ 4, 5, 6 mod 8) shows why that matters: the whole of its departure from the control comes from ℓ mod 8, yet the gap stayed near −5.9 points at every step. The −2.96 shown at 30030 came from frozen records (100 % frozen there), not from structure.

The fix

  • Ladder = lcm(1, …, n): 1, 2, 6, 12, 60, 420, 840, 2520, 27720, 360360. Each step adds exactly one prime power (2, 3, 4, 5, 7, 8, 9, 11, 13), and the table names it, so any change in the gap at a step belongs to that prime power.
    • A047429 (25k records): −7.58, −5.84, −5.99, −3.14 at 12 (+4), −3.14, −3.22, −0.03 at 840 (+8, z −0.2), then ≈ 0.
    • Primes: the +4, +8 and +9 steps are flat to within noise; the +5 and +7 steps narrow the gap.
  • Your own M (1 to 10⁷): a field in the filter row. It is computed on demand, shown after the ladder, and kept in the link (#a047429.M8, or .own8 alongside a ladder M). On A047429, M = 8 gives z = 0.8.
  • Frozen steps: where more than half the records are frozen, the step is drawn hollow, left off the line and greyed in the table, because the gap there is pushed toward 0.
  • Polish:
    • the plates get a small equal margin on both axes, so the L = 1 line is no longer cut by the frame;
    • x-axis labels no longer overlap at phone width;
    • "−0.00" and "−0.0" no longer appear.

Tests. tests/lab.mjs now checks the ten-step ladder. On A047429 it checks that the gap is still open at 420 and closed at 840 and at the user's own M = 8. It also checks your own M from the form and from a link, and that out-of-range values are refused. Passed locally; check_site.py passes.


Generated by Claude Code

The residue ladder was 1, 2, 6, 30, 210, 2310, 30030: squarefree, so it
kept l mod 2 but never mod 4 or 8. A047429 (n = 4, 5, 6 mod 8) showed the
flaw: its whole departure from the control is l mod 8, and the gap stayed
near -5.9 points at every step (the -2.96 at 30030 was frozen records,
not structure).

- The ladder is now lcm(1..n): 1, 2, 6, 12, 60, 420, 840, 2520, 27720,
  360360. Each step adds exactly one prime power (2, 3, 4, 5, 7, 8, 9, 11,
  13), named in the table, so a change of the gap belongs to it. A047429:
  -7.58, -5.84, -5.99, -3.14 (+4), -3.14, -3.22, -0.03 (+8, z -0.2), ...
- "your own M" (1 to 10^7): computed on demand, shown after the ladder,
  kept in the link (#a047429.M8, or .own8 next to a ladder M).
- Steps with more than half the records frozen are drawn hollow, left off
  the line, and greyed in the table: there the control is close to the
  sequence itself and the gap is pushed toward 0.
- Plates: a small equal margin on both axes, so the L = 1 line and the
  k-axis column are no longer cut by the frame. Axis labels never overlap
  (phone width). No more "-0.00" or "-0.0".
- tests/lab.mjs: ten steps; A047429 open at 420, closed at 840 and at its
  own M = 8; own M from the form and from a link; out-of-range refused.
- README and the screenshot follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpoQj8VF38pkAsogJ8BchK
@decompwlj
decompwlj merged commit ce2f577 into main Nov 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants