The residue tapestry
Weave the sequence into rows. Each cell is one n, read left to right and top to bottom, coloured by its residue. When the row length matches the period, every row is the same and the palindrome appears as a mirror down the middle; any other width turns the same sequence into diagonal patterns.
Hover over a cell to see n and P(n).
What to look for
- Row length 25: every row is identical, because H has period 25. Each row reads the same backwards after its first cell, and the centre column pair (n = 12, 13) is the fifth.
- Row length 50 with “last digit”: the last digits of the areas repeat every 50 and are mirrored at n = 25.
- Row length 5: the sign of the correction depends only on the column, i.e. on n mod 5.
- Row length 24 or 26: the same 25-periodic pattern slides one step per row and draws diagonals.