Friday, 16 February 2018

Goldbach's Conjecture Revisited

I touched on Goldbach's Conjecture in a post from November of 2015 but I was reminded of it once again when I celebrated my 25156th day on Earth. Here is my tweet for the day:


For any given number, WolframAlpha will return the prime decomposition with the lowest prime. It doesn't say so explicitly but a few test numbers reveal that this is what's happening e.g. 100 returns 3 and 97. Here is a screenshot of what happens to 50312 which is 25156 x 2:


Let's remember that the Goldbach conjecture states that every even number can be expressed as the sum of two primes. OEIS sequence A001031 shows how many compositions are possible for numbers up to 10,000. For 10,000 there are 231 possible compositions and WolframAlpha as said will quickly return the one involving the smallest primes, namely 59 and 9941. 

A plot of the number of compositions against the even integers themselves, sometimes called Goldbach's comet, is shown below for numbers up to 2000:


While there is clearly a general trend toward larger numbers of compositions as the numbers increase in size, there is little evidence of this at the local level. For example, here is a sample of the number of compositions for odd and even integers between 9975 and 10,000 (even integers have their number of compositions marked in bold type):

9975 559, 9976 165, 9977 183, 9978 338, 9979 175, 9980 217, 9981 330, 9982 215, 9983 174, 9984 357, 9985 225, 9986 165, 9987 331, 9988 187, 9989 213, 9990 454, 9991 164, 9992 163, 9993 335, 9994 180, 9995 219, 9996 435, 9997 192, 9998 167, 9999 366, 10000 231

Of course, what OEIS A208662 is saying is that 25156 is the smallest number in which it's double (50312) has the prime number 181 appearing for the first time as one of the two primes whose sum is equal to 50312. This is not so easy to show unless all the compositions less than 50312 are tested. OEIS A002373 provides a list of the smallest prime number in the composition of all integers up to 20,000 but that falls a little short of 25156. Scanning through the list, it's clear that most of the primes are quite small and the bigger primes make only relatively rare appearances. For example, 89 doesn't make an appearance until 19828. I'll leave off here as I've already spent a lot of time dithering around with this.

ADDENDUM: added on November 24th 2019

It's embarrassingly easy to find the minimal Goldbach composition for a number using only a table of primes. The smaller of the two primes is generally very small and so only needs to be subtracted from the number. If the result of the subtraction is a prime number, then you have your minimal Goldbach decomposition. In the case of 50312, you only need to test up to 181 before you succeed. Here is some SageMath code that does this:

Click here for Permalink

Monday, 12 February 2018

Chess960


Currently an unofficial world championship is underway in Oslo pitting Hikaru Nakamura against Magnus Carlsen. However, the two are not playing traditional chess but instead so-called Chess960 described as follows in Wikipedia:
Chess960, also called Fischer Random Chess (originally Fischerandom), is a variant of chess invented and advocated by former world chess champion Bobby Fischer, publicly announced on June 19, 1996, in Buenos Aires, Argentina. 
It employs the same board and pieces as standard chess, but the starting position of the pieces on the players' home ranks is randomised. The random setup renders the prospect of obtaining an advantage through the memorisation of opening lines impractical, compelling players to rely on their talent and creativity. 
Randomising the main pieces had long been known as Shuffle Chess; however, Chess960 introduces restrictions on the randomisation, "preserving the dynamic nature of the game by retaining bishops of opposite colours for each player and the right to castle for both sides".[3] The result is 960 unique possible starting positions. 
White's pieces (not pawns) are placed randomly on the first rank, with two restrictions:
  • The bishops must be placed on opposite-color squares.
  • The king must be placed on a square between the rooks.
  • Black's pieces are placed equal-and-opposite to White's pieces. (For example, if the white king is randomly determined to start on f1, then the black king is placed on f8.) Pawns are placed on the players' second ranks as in standard chess.
It is the number 960 that is of interest in this mathematics blog and this is explained as follow:
Each bishop can take one of four squares; for each position of two bishops, the queen can be placed on six different squares; and then the two knights can assume five and four possible squares, respectively. This leaves three open squares which the king and rooks must occupy, per setup stipulations, without choice. This means there are 4×4×6×5×4 = 1920 possible starting positions if the two knights were different in some way; however, the two knights are indistinguishable during play (if swapped, there would be no difference), so the number of distinguishable possible positions is half of 1920, or 1920÷2 = 960. (Half of the 960 positions are left–right mirror images of the other half; however, the Chess960 castling rules preserve left–right asymmetry in play.) 
There is another variant called Double Fischer Random Chess which is the same as Chess960, except the White and Black starting positions do not mirror each other. In this form of the game, the number of possible starting positions is 960 x 960 = 921600. In Shuffle Chess, the parent variant of Chess960, there are no restrictions on the back-rank shuffles, with castling possible only when king and rook are on their traditional starting squares. In the case, the number of permutations is 8! but division by 8 is necessary because the pairs of Knights, Bishops and Rooks are indistinguishable. This means 7! or 5040 arrangements are possible.

Sunday, 11 February 2018

The Mathematics of Chess Pairings

There was a recent article is ChessBase regarding a problem that had arisen last year involving the world's highest ranked woman player, Hou Hifan. The article began:
The Gibraltar Masters wrapped up Thursday, with Levon Aronian in first place. This year Round Ten passed without incident, in contrast to 2017 when, on February 2nd, the story of the day was a rare scandal involving women's World Champion Hou Yifan deliberately losing a game in protest of the high number of women she was paired against. She was further confounded when a similarly unlikely string of pairings happened in October at the Isle of Man Open. Johannes Meijer looks at the odds in detail. Hou did not return to Gibralter in 2018, but instead competed in the Tata Steel Chess Masters.
Imagine, you are at a tournament with 255 players of which 43 are female. You are to play ten rounds. How many female opponents would you expect to face? Three? Five? I am pretty sure you wouldn't say seven. Yet, this was exactly the number of female players Hou Yifan faced at the Gibraltar Open 2017 when, a year ago today, she threw her last game in protest of these seemingly odd pairings.
The article goes on to ask the question: How probable is such a pairing? Could it have happened by chance at all? Well, the approach to solving this problem involves the hypergeometric distribution, a discrete probability distribution commonly covered in high school probability and statistics courses. Wikipedia describes it thus:


Thus to find how likely, or unlikely, Hou's pairings were we only have to replace "green marbles" with women and "red marbles" with men. So k=7, K=43, N=255, n-10, n-k=3 and N-K=212. Substituting into the formula we get:$$P(X=7)=\frac{^KC_k \text{ . } ^{N-K}C_{n-k}}{^NC_n}=\frac{^{43}C_7 \text{ . } ^{212}C_{3}}{^{255}C_{10}}\approx 0.000188 $$Thus it seen that the likelihood is very small that this could happen and yet the pairings were allegedly arranged using a computer draw. The quoted article carries out similar calculations but follow a somewhat different approach.

To be strictly accurate, since possible pairings with Hou Hifan are under consideration, we should make K=42 and thus N=254. This gives a slightly lower probability of 0.000164 and so even more unlikely. It means that out of 10,000 random pairings of a woman with ten competitors, the result of being paired with another woman in seven out of the ten rounds would be expected to occur less than twice. On the other hand, the probability of not being paired with any women is nearly 16% and is given by:$$P(X=0)=\frac{^KC_k \text{ . } ^{N-K}C_{n-k}}{^NC_n}=\frac{^{42}C_0 \text{ . } ^{212}C_{10}}{^{254}C_{10}}\approx 0.158251 $$

Saturday, 3 February 2018

The Permutations of {1, 2, 3, 4, 5}

Today I am 25143 days old, a permutation of the digits 1, 2, 3, 4 and 5. There are 5! or 120 possible ways to arrange these digits and they are as follows:

{1, 2, 3, 4, 5} | {1, 2, 3, 5, 4} | {1, 2, 4, 3, 5} | {1, 2, 4, 5, 3} | {1, 2, 5, 3, 4} | {1, 2, 5, 4, 3} | {1, 3, 2, 4, 5} | {1, 3, 2, 5, 4} | {1, 3, 4, 2, 5} | {1, 3, 4, 5, 2} | {1, 3, 5, 2, 4} | {1, 3, 5, 4, 2} | {1, 4, 2, 3, 5} | {1, 4, 2, 5, 3} | {1, 4, 3, 2, 5} | {1, 4, 3, 5, 2} | {1, 4, 5, 2, 3} | {1, 4, 5, 3, 2} | {1, 5, 2, 3, 4} | {1, 5, 2, 4, 3} | {1, 5, 3, 2, 4} | {1, 5, 3, 4, 2} | {1, 5, 4, 2, 3} | {1, 5, 4, 3, 2} | {2, 1, 3, 4, 5} | {2, 1, 3, 5, 4} | {2, 1, 4, 3, 5} | {2, 1, 4, 5, 3} | {2, 1, 5, 3, 4} | {2, 1, 5, 4, 3} | {2, 3, 1, 4, 5} | {2, 3, 1, 5, 4} | {2, 3, 4, 1, 5} | {2, 3, 4, 5, 1} | {2, 3, 5, 1, 4} | {2, 3, 5, 4, 1} | {2, 4, 1, 3, 5} | {2, 4, 1, 5, 3} | {2, 4, 3, 1, 5} | {2, 4, 3, 5, 1} | {2, 4, 5, 1, 3} | {2, 4, 5, 3, 1} | {2, 5, 1, 3, 4}

TODAY | {2, 5, 1, 4, 3} | 

{2, 5, 3, 1, 4} | {2, 5, 3, 4, 1} | {2, 5, 4, 1, 3} | {2, 5, 4, 3, 1} | {3, 1, 2, 4, 5} | {3, 1, 2, 5, 4} | {3, 1, 4, 2, 5} | {3, 1, 4, 5, 2} | {3, 1, 5, 2, 4} | {3, 1, 5, 4, 2} | {3, 2, 1, 4, 5} | {3, 2, 1, 5, 4} | {3, 2, 4, 1, 5} | {3, 2, 4, 5, 1} | {3, 2, 5, 1, 4} | {3, 2, 5, 4, 1} | {3, 4, 1, 2, 5} | {3, 4, 1, 5, 2} | {3, 4, 2, 1, 5} | {3, 4, 2, 5, 1} | {3, 4, 5, 1, 2} | {3, 4, 5, 2, 1} | {3, 5, 1, 2, 4} | {3, 5, 1, 4, 2} | {3, 5, 2, 1, 4} | {3, 5, 2, 4, 1} | {3, 5, 4, 1, 2}

JUST BEFORE | {3, 5, 4, 2, 1} | 97th BIRTHDAY

{4, 1, 2, 3, 5} | {4, 1, 2, 5, 3} | {4, 1, 3, 2, 5} | {4, 1, 3, 5, 2} | {4, 1, 5, 2, 3} | {4, 1, 5, 3, 2} | {4, 2, 1, 3, 5} | {4, 2, 1, 5, 3} | {4, 2, 3, 1, 5} | {4, 2, 3, 5, 1} | {4, 2, 5, 1, 3} | {4, 2, 5, 3, 1} | {4, 3, 1, 2, 5} | {4, 3, 1, 5, 2} | {4, 3, 2, 1, 5} | {4, 3, 2, 5, 1} | {4, 3, 5, 1, 2} | {4, 3, 5, 2, 1} | {4, 5, 1, 2, 3} | {4, 5, 1, 3, 2} | {4, 5, 2, 1, 3} | {4, 5, 2, 3, 1} | {4, 5, 3, 1, 2} | {4, 5, 3, 2, 1} | {5, 1, 2, 3, 4} | {5, 1, 2, 4, 3} | {5, 1, 3, 2, 4} | {5, 1, 3, 4, 2} | {5, 1, 4, 2, 3} | {5, 1, 4, 3, 2} | {5, 2, 1, 3, 4} | {5, 2, 1, 4, 3} | {5, 2, 3, 1, 4} | {5, 2, 3, 4, 1} | {5, 2, 4, 1, 3} | {5, 2, 4, 3, 1} | {5, 3, 1, 2, 4} | {5, 3, 1, 4, 2} | {5, 3, 2, 1, 4} | {5, 3, 2, 4, 1} | {5, 3, 4, 1, 2} | {5, 3, 4, 2, 1} | {5, 4, 1, 2, 3} | {5, 4, 1, 3, 2} | {5, 4, 2, 1, 3} | {5, 4, 2, 3, 1} | {5, 4, 3, 1, 2} | {5, 4, 3, 2, 1}

Humans will only experience up to 35421 because 35421/365.25 = 96.98 or about 8 days short of one's 96th birthday. The next number 41235 is only reached a little short of one's 113th birthday. There's nothing deeply mathematical about any of this and of course it's specific to the number system being used. For example, in an octal base 25143 becomes 61067\(_8 \). Primeness of course is different and transcends number systems. 61067\(_8 \) and 25143\(_{10} \) are both prime!

Friday, 2 February 2018

The Mathematics of Music

The musical notes between one octave on the next are set up so that the ratio between the frequency of one note and the frequency of the next higher note is the same. Let's call this ratio \(r \) and so we have, starting with the notes \(G_1, Ab, A \):$$ \frac{f_{Ab}}{f_{G_1}} = r \text{ and } \frac{f_A}{f_{Ab}}=r \text{  and so   } f_A=r^{\scriptscriptstyle{2}} \times f_{G_1} \text{ etc.} $$In the end, we'll have the following crucial relationship between one octave and the next:$$ f_{G_2}=r^{\scriptscriptstyle{12}} \times f_{G_1} \text{ but because }f_{G_2}=2 \times f_{G_1} \text{ we have } r^{\scriptscriptstyle{12}}=2 \text{  or } r=\sqrt[12]{2}$$The perfect fifth, which according to Pythagoras should be exactly halfway between the two octaves (or seven semitones) giving a frequency of: $$ \frac{\scriptstyle{3}}{\scriptstyle{2}} \times f_{G_1} \text{ compared to the actual } 2^{\scriptscriptstyle{7/12}} \times f_{G_1} \approx 1.498307077 \times f_{G_1}$$Thus the two are almost identical but of course Pythagoras applied his 1.5 method to determine all the other notes but this is not the method that the equal temperament scale uses.

Sunday, 28 January 2018

Deficient Numbers

Sometimes it's easy to forget the basics, such as what defines a deficient number. For example, today's number 25137 has the following entry in OEIS: deficient numbers n having a companion m > n such that sigma(n)/n = sigma(m)/m. The initial numbers in this sequence are shown below:
135, 3375, 1485, 2295, 2565, 3105, 3915, 4185, 4995, 5535, 5805, 6345, 25137, 7155, 7965, 8235, 9045, 9585, 9855, 10665, 11205, 12015, 13095, 13635, 13905, 14445, 14715, 43875, 15255, 16335, 17145, 17685, 18495, 18765, 57375, 20115, 20385, 21195, 64125
These numbers are listed in the order that their companions were found. All these numbers appear to have only one companion, which appear in A212609. The initial entries in this sequence are shown below with the 13th entry marked, namely 40131, because 25137 is the 13th entry in the previous set of numbers:
819, 6975, 9009, 13923, 15561, 18837, 23751, 25389, 30303, 33579, 35217, 38493, 40131, 43407, 48321, 49959, 54873, 58149, 59787, 64701, 67977, 72891, 79443, 82719, 84357, 87633, 89271, 90675, 92547, 99099, 104013, 107289, 112203, 113841, 118575, 122031
So the companion for 25137 is 40131 and checking we find that: $$ \frac {\sigma(25137)}{25137}=\frac{\sigma(40131)}{40131} \approx 1.81406 $$However, just to remind myself about the distinction between deficient, perfect and abundant numbers, I've included the following graphic:


By now the sigma function has begun to sink into my long term memory along with the Euler totient function or phi function as it's sometimes known.

Sunday, 7 January 2018

432 Hz versus 440 Hz

I've been aware for a while about the the controversy surrounding the standard A note and whether it should be set to \(440 \text{Hz} \) (as it now is) or changed to \( 432 \text{Hz}. \) I'm trying in this post to look at the mathematical properties of \( 432 \).
  • \( 432^2 = 186624 \) is close to the speed of light as measured in miles per second. Wolfram Alpha gives a figure of \( 186282 \) miles per second for the speed of light in a vacuum which is \( 99.82 \text{%} \) of \( 432^2 \).

  • It also turns out that the area of an equilateral triangle whose numerical area is equal to its perimeter is given by \(12 \sqrt{3} = \sqrt{432} \).

  • \( 432 \) sits between the twin primes \( 431 \) and \( 433 \)

  • The factors of \( 432 \) are \( 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 36, 48, 54, 72, 108, 144, 216 \text{ and } 432 \). The sum of these divisors is \(1240 \).

  • \(432 \) is a 3-smooth number, one that is of the form \( 2^i*3^j \text{ where }i,j>=0 \) or to put it less mathematically it is a number that can be written as a power of two times a power of three, specifically \( 2^4×3^3 \). Such numbers have been called harmonic numbers. Here are the harmonic numbers up to \( 1000 \):


  • \( 432 \) is the sum of four consecutive primes: \(103+107+109+113 = 432\)

  • \( 432 \) is the sum of two positive cubes: \( 6^3+6^3=432 \)

  • OEIS lists \( 2944 \) entries for the number \( 432 \)