Number — page 5
A small quotient for every denominator
Pick a denominator, any whole number. Among the fractions with that denominator, is there always one whose continued fraction has no large entries — whose path down the Stern–Brocot tree never turns the same way more than five times running? Stanisław Zaremba guessed so in 1972, for a reason to do with sampling a square evenly. Every denominator up to a hundred thousand obeys, with only 6, 54 and 150 needing a five. The guess is proved for almost every denominator and not for all, and the reason it ought to be true is a dimension: the reals whose quotients stay at most five fill a set of dimension 0.837, enough to give each denominator thousands of good fractions on average, and the open question is whether averages are kept everywhere.
How close two sums of square roots come
Two different sums of square roots of whole numbers are never equal: square roots of different squarefree numbers are independent, so no cancellation can make them agree. But they can come very close. Among sums of two square roots of numbers up to 320, √88 + √289 and √171 + √177 agree to eight decimal places. How many digits must be computed, in the worst case, to tell two such sums apart is not known — the best proof allows a number of digits doubly exponential in the length of the sums, the examples suggest only a modest polynomial, and the gap between them is why nobody knows whether the shortest route through points in the plane can be checked quickly.
A quarter of the bases at most
Carmichael numbers pass Fermat's test for every base they share no factor with, so Fermat's test can be fooled for ever. Watch the squarings on the way to aⁿ⁻¹ instead, and a prime allows only one pattern; 561 lets just 10 of its 320 bases through, and Monier and Rabin proved that no odd composite but 9 lets through more than a quarter. Four fixed bases prove every number below 3.2 billion prime or not.
Most numbers are missing from the table
An N × N multiplication table has N² cells, and every product in it is less than or equal to N². Yet only 22.5% of the numbers that small turn up in the 10,000 × 10,000 table, and the share keeps falling. Erdős proved in 1955 that it falls to nought; Kevin Ford found in 2008 how slowly — like a tiny power of the logarithm, 0.0861 — because a product of two numbers has too many prime factors to be typical.
Divisors that take a prime whole
Six is perfect because its proper divisors 1, 2 and 3 add up to 6. Keep only the divisors that take each prime of a number completely or not at all — for 60, that is 1, 3, 4, 5, 12, 15 and 20 — and ask for the same coincidence. Below ten million it happens four times: 6, 60, 90 and 87,360. The fifth has twenty-four digits. And unlike ordinary perfect numbers, where nobody knows whether an odd one exists, here a two-line argument rules every odd number out.
Nineteen fourth powers, and then sixteen
Edward Waring claimed in 1770 that every number is a sum of at most nineteen fourth powers. It is true, and it is needed: 79 takes nineteen, because its remainder on division by sixteen forces fifteen ones. But only seven numbers need nineteen, the last of them 559; the last to need eighteen is 1,248, and the last to need seventeen is 13,792. Counting every number to ten million shows the stragglers thinning out and the one obstruction that never goes away — the remainder modulo sixteen, which makes 31, 496, 7,936 and every 31·16ᵐ need sixteen for ever.
The largest amount two coins cannot pay
With coins of 5 and 7, the amounts 1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18 and 23 cannot be paid, and everything else can. Two lines of argument give the formula ab − a − b for the last gap, and half the rest of the board is gaps. For three coins no such formula exists, in a sense that can be proved. And the sets that coins can make have a count that climbs at the golden ratio, a conjecture settled from a table of 67, 118, 204.
Numbers that never make a prime
Multiply 78,557 by a power of two and add one. The result is never prime, for any power, though almost every other odd number gives a prime within a few doublings. The reason is that seven small primes take it in turn to divide the result, on a schedule repeating every 36 steps that leaves no step uncovered. Proving nothing smaller does this has taken sixty years of search, and five candidates are still running.
Sums with too few primes
Add 2 to 6,436,341 and the sum is 23⁵: three numbers with only four primes between them, and their product 15,042 is far smaller than the sum. The abc conjecture says this can happen only so far. Of 606 such triples up to 200,000, only seven reach quality 1.4, and if the conjecture holds, Fermat's last theorem and much else follows for large exponents in a line.
The comet Goldbach left behind
Count the ways each even number is a sum of two primes, and the points do not form a smear. They split into bands: 12,000 has 302 ways and 12,002 has 115. One small product over odd prime factors explains every band and brings them all to a single line, and it says the count grows without bound. Nobody can prove the count is never nought.
Five powers of two, seven more than a square
2³ − 7 = 1², 2⁴ − 7 = 3², 2⁵ − 7 = 5², 2⁷ − 7 = 11², 2¹⁵ − 7 = 181². Ramanujan asked in 1913 whether there are any more. Testing every exponent up to 10,000 finds none, and Nagell proved in 1948 that none exist, by moving to a number system where 2 splits into two primes and factorisation is still unique. The same five solutions decide when a two-error-correcting code can be perfect.
Two pounds in 73,682 ways
Count the ways to pay an amount exactly with a fixed set of coins and the answer is almost a polynomial in the amount — a polynomial plus waves that repeat with the periods of the coins. With parts 1, 2 and 3 the whole formula fits on a line; with British coins the leading term is still 3% off at four hundred pounds. And the fewest coins is a different question, which the cashier's rule answers correctly only for some coinages.
The largest piece that still fits
Fill a unit with unit fractions, always taking the largest one that still fits: 1/2, 1/3, 1/7, 1/43, 1/1807. The denominators are Sylvester's sequence, each one more than the product of all before it, and after k of them what is left is exactly one over the next term minus one. Curtiss proved in 1922 that no k unit fractions get closer to 1 from below; an exact search confirms it to six terms. Applied to almost any other fraction, the same greedy rule is wasteful — 8/97 ends with a denominator of 150 digits.
The fewest ones that build a number
Build a number from ones using only addition, multiplication and brackets, and ask for the fewest ones. Six needs five, as (1+1)·(1+1+1); seven needs six. A power of three needs exactly three ones per factor, and no number does better for its size; building from binary digits never needs more than three ones per doubling. Between those bounds, the cheapest expressions are found by multiplying cheap factors and adding one. Every prime up to thirty thousand costs exactly one more than the number before it — a pattern that holds until 353,942,783.
One card from every pile
Split a deck into piles, take one card from every pile, and put the cards taken into a new pile. Repeat. With ten cards, every starting arrangement ends at piles of 4, 3, 2 and 1, which the move leaves unchanged, and the slowest takes twelve moves; with fifteen it is 5, 4, 3, 2, 1 after at most twenty. The move is a partition turning its first column into a row, the bound is exactly k² − k for k(k + 1)/2 cards, and for any other number of cards the game never stops — it goes round in cycles, and the cycles are necklaces.
Numbers that survive a sieve of positions
Take the odd numbers and strike every third one still standing; then, since 7 survives, every seventh; then every ninth, every thirteenth, and on. The survivors — 1, 3, 7, 9, 13, 15, 21, 25 — are Ulam's lucky numbers, and they know nothing of divisibility. Yet they thin out like the primes, at n over ln n, have about as many twins, and every even number tested is a sum of two of them. Which properties of the primes are about multiplication, and which only about being the survivors of a sieve?
The primes hidden in a row of ones
Write 1, 11, 111, 1111, and keep going. Which primes divide these numbers is decided by one fact about each prime: how long the repeating block of its reciprocal is. Seven divides every sixth row of ones because 1/7 repeats every six digits. Every new row brings a prime never seen before, always one more than a multiple of the row's length — and a row of ones is itself prime only rarely: among the prime lengths to eleven hundred, at 2, 19, 23, 317 and 1,031.
A prime test that squares and subtracts two
Start at 4, square, subtract 2, and keep only the remainder on division by 2^p − 1. After p − 2 steps the remainder is nought exactly when 2^p − 1 is prime. The rule looks like numerology, and it is Fermat's little theorem moved onto a circle: the points of x² − 3y² = 1 modulo a Mersenne prime number one more than the prime, a power of two, and the test checks that 2 + √3 walks all the way round.