**Maths prize 10 February 2017**

Jetmir Guri and Mohaned al-Bassam won prizes for these puzzles about the number 23, designed to mark my younger daughter Molly’s 23rd birthday. (Molly is on the left in the picture above, with her team-mates Erin Gourlay and Lauren Browne at the Jessup Moot in Washington, the foremost international competition for law students. Molly was ranked no.1 among the Australian students at the competition).

1. When Molly was little, her mum had a rule that Molly could have a birthday party only every even year. Suppose instead the rule was that Molly could have a party only every prime-number birthday. At what age would she first have to wait two years for her next birthday party? At what age does she first have to wait four years? At what age will she first have to wait six years?

Answer: first has to wait two years at age 3.

First has to wait four years at age 7.

First has to wait six years at age 23.

Then there is a long time until the first wait over six years, which comes with a eight year gap after age 89.

The next jump is to a 14-year gap after age 113.

The *average* gap between primes is known to increase so that the average gap between primes less than n is approximately ln (n). But, as you can see, the increase is jerky and irregular,

Whether pairs of primes only two apart, like 3-5, 5-7, 11-13, 17-19, go on for ever is an unsolved problem. Mathematicians think they do go on for ever, but can’t prove it yet. The best so far is a proof that pairs of primes only 246 or less apart go on for ever.

2. At which age would she first have a party that was more than two years away from any other party (i.e. more than two years from the previous party, and more than two years from the next)?

23 is the first prime which is not a twin prime.

3. Suppose Molly decided (or, when she was little, her mum decided) that each year she would celebrate her birthday on a date chosen at random. It’s unlikely her 2nd birthday would be the same date as her 1st, but if she lives to 366 it’s certain that the same date will have been the birthday-celebration day twice. (Ignore leap years). At what age does the probability of the same date having been the birthday-celebration date twice rise above 50%?

23 again. Probability of Molly NOT having had the same birthday twice = 364/365 at her 2nd birthday

364/365 × 363/365 at her 3rd birthday

364/365 × 363/365 × 362/365 at her 4th

…

364 × 363 × ……× (366−n) / 365^{(n−1)} at her nth birthday

It is OK to multiply the probabilities because they are mutually independent – i.e. each year’s random choice of day does not affect any other year’s.

A bit of work on your calculator will show you that the first birthday at which she will have a probability ≤ 50% is the 23rd.

A related but subtly different problem is: at which age is Molly most likely to find that her randomly-picked birthday is on the same date as in a previous year? The answer is 20.

4. What is the smallest number which cannot be written as the sum of 8 or fewer cubes? (1=1^{3}, 2=1^{3}+1^{3}, 17=2^{3}+2^{3}+1^{3}, 15=2^{3}+1^{3}+1^{3}+1^{3}+1^{3}+1^{3}+1^{3}+1^{3}, etc.)

23. In fact every number can be written as the sum of nine cubes. Only two numbers need nine: 239 and one other. Every other number can be done with eight. Also, every number can be written as the sum of four squares. This is Waring’s Problem.