Patterns /Sequences

ABAB Pattern Numbers

Two digits taking strict turns: 5252, 8080, 393939. The pattern repeats with period two from the first digit to the last.

Matches in range
243
Share of all numbers
1 in 4,115
Out of
1,000,001

An ABAB number is fully specified by two digits, no matter how long it is — which is why the count above stays flat while the range grows by a factor of ten at each length.

Alternation is a stronger constraint than merely using two distinct digits. 5522 uses the same two digits but has no period-two structure, so it does not qualify here.

Even-length ABAB numbers are often palindromic-adjacent but not palindromes, which makes them a good illustration of why symmetry and sequence are scored as separate groups.

Highest-scoring examples

The best-scoring numbers of four digits or more that carry this pattern. Shorter numbers are excluded here because their length alone dominates any score ranking.

Smallest examples

The first numbers in the range that match this pattern.

Related sequences patterns