Why 37 divides every three-digit repdigit
The number 777 is 7 × 111. The same construction works for every repeated decimal digit, since 111 = 3 × 37. This proves all nine examples in one step. It also explains the repeating decimal 1/37 = 0.027027… because 37 × 27 = 999.
For a decimal string of n ones, multiply its value by 9 to get 10ⁿ − 1. Modulo 37, the powers of 10 repeat after three steps: 10, 26, 1. Since 9 is invertible modulo 37, the string is divisible by 37 exactly when n is a multiple of three. In base b, the three-digit string instead has value b² + b + 1.
Change the numeral base
Choose how to write a string of ones. The decimal value and remainder show which divisibility patterns survive a change of base.
73 reads both ways
73 is the 21st prime and 37 is the 12th, counting 2 as the first. The decimal digits and the decimal indices both reverse, and the digits of 73 multiply to 21. Pomerance and Spicer proved that 73 is the unique prime with those two decimal properties together. Their proof uses estimates for the distribution of primes to reduce an unbounded question to a finite analysis.
Its binary representation, 1001001, is also a palindrome: 73 = 64 + 8 + 1. In any even-length binary palindrome, matching digits occupy one even and one odd power of 2. Since 2 ≡ −1 modulo 3, those terms cancel modulo 3. Every even-length binary palindrome is divisible by 3, so 3 itself, written 11 in binary, is the only prime with that property.
Read the sources · Pomerance and Spicer · Proof of the Sheldon Conjecture
Why 2 structures computation
Every even number above 2 has 2 as a proper divisor. Reduce integers modulo this smallest prime and you get the field 𝔽₂, with elements 0 and 1. Its addition is XOR and its multiplication is AND. The rule 1 + 1 = 0 turns parity into a calculation.
Attach a parity bit to make a word’s total even. One flipped bit changes the parity and is detected. Two flipped bits can restore it. More powerful codes use several carefully chosen parity checks to locate errors or protect longer messages.
How binary algebra enters quantum error correction
A pure qubit has two complex amplitudes, α and β, with |α|² + |β|² = 1. Their relative phase affects the outcomes of later operations. For example, (|0⟩ + |1⟩)/√2 and (|0⟩ − |1⟩)/√2 give the same probabilities in the computational basis, but a Hadamard gate maps them to |0⟩ and |1⟩ respectively.
In stabilizer codes, binary labels describe products of Pauli X and Z operators up to phase. For two labels (a, b) and (a′, b′), the test a·b′ + b·a′ = 0 over 𝔽₂ tells us that the operators commute. This makes binary linear algebra useful for designing compatible checks. The quantum state itself still uses complex amplitudes.
For n qubits there are 2ⁿ computational-basis amplitudes. Their structure can be used for interference and entanglement, while each measurement in that basis gives one n-bit outcome.
Read the sources · Daniel Gottesman · Stabilizer Codes and Quantum Error Correction
Try a different base
Why does 37 divide the value of 111 in base 10 and fail to divide its value in base 2?
Reveal the explanation
In base 10 the value is 100 + 10 + 1 = 111 = 3 × 37. In base 2 it is 4 + 2 + 1 = 7. The divisibility statement depends on the chosen positional representation.