Wednesday 31 May 2017

Oz Lotto


Last night for $1.30, I bought a single game in Oz Lotto. The winning numbers were 1, 4, 13, 19, 26, 31, 35 and the numbers in bold were the matching numbers that I had in my game. I got three out of the seven numbers which didn't win me a prize but it was impressive nonetheless I thought. What were the odds of this happening?

The number of ways that seven numbers can be selected from 45 numbers, disregarding order, is given by \( ^{45}C_7  = 45,379,620 \). Thus there is only one chance in 45,379,620 that the combination 1, 4, 13, 19, 26, 31, 35 will appear. Given those seven numbers, in how many ways can three of them be chosen? Clearly, in \( ^7C_3 \) = 35 ways.

This means that the number of ways in which three winning numbers can occur out of seven numbers is  \( \text{35 x }  ^{38}C_4 \). This is because none of the remaining four numbers can contain a winning number, thus it is a choice of any four of the remaining 38 non-winning numbers. The probability of choosing three winning numbers in a single game is thus: \[ \text{35 x } \frac{^{38}C_4}{^{45}C_7} = \frac{172235}{3025308} \approx 0.05693 \]Thus the figure as a percentage is about 5.7%. I dithered around trying to work this out but I'm fairly certain that this is the correct approach. For the sake of completeness, I'll work out the probability of getting four, five and six numbers:

For four numbers, chances are: \[ \text{35 x } \frac{^{38}C_3}{^{45}C_7} = \frac{4921}{756327} \approx 0.0065 \]For five numbers, chances are: \[ \text{21 x } \frac{^{38}C_2}{^{45}C_7} = \frac{4921}{15126540} \approx 0.0003 \]For six numbers, chances are:\[ \text{7 x } \frac{^{38}C_1}{^{45}C_7} = \frac{133}{22689810} \text{  or a very small chance!} \]Working on this post, I noticed that Blogger's rendering of LaTeX code has changed. Before, use of the $ sign at the beginning and end of a mathematical expression meant that MathJax was used to create the inline expression:
MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers ... MathJax uses web-based fonts (in those browsers that support it) to produce high-quality typesetting that scales and prints at full resolution (unlike mathematics included as images) source
Now however, use of the dollar sign creates an inline image of the mathematical expression and it is only by use of the curved brackets and backslash that MathJax is invoked. The double dollar sign to create display expressions remains unchanged however, and there is no need yet to use backslash and open and closed square brackets. As before, in Android, nothing seems to work.

Sunday 21 May 2017

Odd Primitive Abundant Numbers

Today I turned 24885 days old. As usual I turned to WolframAlpha to find the prime number factorisation. It is \(3^2 \times 5 \times 7 \times 79\). I then turned to the Online Encyclopaedia of Integer Sequences (OEIS) to see what was special about the number. First mentioned was OEIS A006038: odd primitive abundant numbers. I was already familiar with abundant numbers. These are numbers in which the sum of the proper divisors exceeds the number itself. The first abundant number is 12 and the sum of its proper divisors (1, 2, 4 and 6) is 13. On the other hand, a number like 15 is called deficient because the sum of its proper divisors (1, 3 and 5) is only 9. A number like 6 is called perfect because the sum of its proper divisors (1, 2 and 3) is 6 and equals the number itself.

The divisors of 24885 turn out to be: 1 | 3 | 5 | 7 | 9 | 15 | 21 | 35 | 45 | 63 | 79 | 105 | 237 | 315 | 395 | 553 | 711 | 1185 | 1659 | 2765 | 3555 | 4977 | 8295 and total 25035. It is clearly an abundant number but what is a primitive abundant number? Well, Wikipedia supplies the following definition: in mathematics a primitive abundant number is an abundant number whose proper divisors are all deficient numbers. 20 is given an example of such a number because its divisors (1, 2, 4, 5 and 10) are all deficient numbers (the sums of the factors being respectively 0, 1, 3, 1 and 8). The sequence of primitive abundant numbers begins as follows (OEIS A091191):
12, 18, 20, 30, 42, 56, 66, 70, 78, 88, 102, 104, 114, 138, 174, 186, 196, 222, 246, 258, 272, 282, 304, 308, 318, 354, 364, 366, 368, 402, 426, 438, 464, 474, 476, 498, 532, 534, 550, 572, 582, 606, 618, 642, 644, 650, 654, 678, 748, 762, 786, 812, 822
It will be noted that any odd numbers are conspicuously absent from this initial list. As it turns out, the first odd primitive abundant number is 945. The sequence of odd primitive abundant numbers begins as follows (OEIS A006038):
945, 1575, 2205, 3465, 4095, 5355, 5775, 5985, 6435, 6825, 7245, 7425, 8085, 8415, 8925, 9135, 9555, 9765, 11655, 12705, 12915, 13545, 14805, 15015, 16695, 18585, 19215, 19635, 21105, 21945, 22365, 22995, 23205, 24885, 25935, 26145, 26565, 28035, 28215
So that's the story. There are:
  • abundant numbers
  • primitive abundant numbers
  • even primitive abundant numbers
  • odd primitive abundant numbers (far less frequent than their even counterparts)
Looking at the list of numbers of odd primitive abundant numbers, it can be seen that it will be about three years before I encounter another one.

Tuesday 16 May 2017

Varieties of Balanced Primes

Recently I passed the 24877 mark. 24877 is a prime number but it's also a balanced prime of order seven, meaning that it is the average of the seven primes preceding it and seven primes succeeding it. The first example of such a prime is 29 because:
$$\textbf{29} = \frac{\overbrace{5 + 7 + 11 + 13 + 17 + 19 + 23}^\text{seven primes below}}{15} \\ + \frac{\textbf{29} + \overbrace{31 + 37 + 41 + 43 + 47 + 53 + 59}^\text{seven primes above}}{15}$$Balanced primes range from order one upwards with the first balanced prime of order one being 5 where:$$\textbf{5}=\frac{3+\textbf{5}+7}{3}$$A subset of the balanced primes are those primes that are doubly balanced, meaning they are averages of both their immediate and their second neighbours. The first example of such a prime is 18731 with surrounding primes of 18713, 18719 below and 18743, 18749 above. We find that:$$ \begin{align} \textbf{18731} &= \frac{18719+\textbf{18731}+18743}{3} \\
&=\frac{18713+18719+\textbf{18731}+18743+18749}{5} \end{align} $$
Primes can be triply balanced (the first of these is 683783), quadruply balanced (the first of these is 98303927) and so on. In terms of the counting of the days of our lives, it is only the first five of the doubly balanced primes (18731, 25621, 28069, 30059 and 31051) that we are likely to encounter.

A prime can be balanced in more ways than one but the orders may not be continuous. A doubly balanced prime like 18713 is a balanced prime of order 1 and order 2. Here the orders, 1 and 2, are continuous. However, a prime like 263 can be written as (257 + 263 + 269)/3 but also (179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233 + 239 + 241 + 251 + 257 + 263 + 269 + 271 + 277 + 281 + 283 + 293 + 307 + 311 + 313 + 317 + 331 + 337 + 347 + 349 + 353)/31. It is a balanced prime of order 1 and order 31, but 1 and 31 are not continuous. Both 263 and 18713 are said to be balanced primes of index 2. The balanced primes of index 1 are those that are balanced in one way only, the first of these being 5.

Unlike the doubly balanced primes (18731, 25621, 28069, 30059, 31051 etc.), the balanced primes of index 2 are relatively frequent. Here is a list of the first of them:

211, 263, 349, 397, 409, 439, 709, 751, 787, 827, 1153, 1187, 1259, 1487, 1523, 1531, 2281, 2287, 2347, 2621, 3037, 3109, 3313, 3329, 3539, 3673, 4357, 4397, 4493, 4951, 4969, 4987, 5189, 5303, 5347, 5857, 6323, 6337, 7583, 7907, 7933, 8429, 8713, 8821

After that, they naturally become less frequent. Here are the first balanced primes of index 3:

53, 607, 977, 1289, 2083, 2351, 4013, 5563, 8803, 10657, 11117, 12583, 14747, 16433, 18731, 22067, 22699, 28477, 32833, 39227, 39749, 41957, 44357, 46229, 46643, 50053, 50123, 51869, 53617, 54469, 56167, 63377, 63527, 66797, 74729, 75217

Even the first few balanced primes of index 4 (157, 353, 8233, 23893, 26183 and 30197) will occur within the lives of most individuals.

Sunday 7 May 2017

The Basel Problem and Beyond

The Basel Problem asks for the exact sum, in closed form, of the summation:$$\sum_{n=1}^\infty \frac{1}{n^2} = \frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \cdots + \frac{1}{n^2} + \cdots$$Leonhard Euler proved that the sum was \( \dfrac{\pi}{6}\) and the details of Euler's proof and other proofs can be found here. Euler of course went further and generalised his investigation to include:$$\zeta(s) =\sum_{n=1}^\infty\frac{1}{n^s}$$ This is the Riemann zeta function or Euler–Riemann zeta function \(\zeta(s)\) which is a function of the complex variable \(s\). In this post, I'll focus on the case where \(s=3\) and look at the exact value of the Riemann zeta function for this value:$$\begin{align}\zeta(3) &= \sum_{n=1}^\infty\frac{1}{n^3} \\&= \lim_{n \to \infty}\left(\frac{1}{1^3} + \frac{1}{2^3} + \cdots + \frac{1}{n^3}\right)\end{align}$$The value of this summation is called Apéry's constant. \(\zeta(3)\) was so named because of the French mathematician, Roger Apéry, who proved in 1978 that it is an irrational number. Here is an interesting Numberphile video about this mathematician's proof:



Up to the present time however, Apéry's constant has not been proven to be transcendental. There are many interesting ways of calculating the value of this constant. Two are shown below and taken from the Wikipedia article about the constant:$$\zeta(3) =\frac{1}{2}\int_0^\infty \frac{x^2}{e^x-1}\, dx $$
$$\zeta(3) =\frac{2}{3}\int_0^\infty \frac{x^2}{e^x+1}\, dx $$