MATHS BITE: Sierpinski Number

A Sierpinski number is an odd natural number k such that {\displaystyle k\times 2^{n}+1} is not prime for all natural numbers n. In 1960, Sierpinski proved that there are infinitely many odd integers k with this property, but failed to give an example. Numbers in such a set with odd k and k < 2^n are called Proth numbers.

78557, 271129, 271577, 322523, 327739, 482719, 575041, 603713, 903983, 934909,….

-List of some known Sierpinski Numbers

Sierpinski Problem

The Sierpinski problem asks what the smallest Sierpinski number is. In 1967, Sierpinski and Selfridge conjectured that 78557 is the smallest Sierpinski number. To show this is true, we need to show that all the odd numbers smaller than 78557 are not Sierpinski numbers, i.e. for every odd k below 78557 there is a positive interger n such that {\displaystyle k\times 2^{n}+1} is prime. There are only five numbers which have not been eliminated:

k = 21181, 22699, 24737, 55459, and 67607

Numberphile Video

Find out more here. M x


Casting Out Nines

Inspired by a recent Numberphile video I thought I would share with you a cool trick to check your arithmetic is correct called ‘Casting Out Nines‘.

To check the result of a calculation using this technique, take the digital root of each number in the calculation. Then perform the calculation on these digital roots, and take the digital root of this answer. If no mistake has been made, the digital root of the result of this calculation should be the same as the digital root of the result of the original calculation.

What is a digital root?

The digital root is the value (a single digit) you get by completing an iterative process of summing the digits of the number, where you use the result from the previous iteration to compute a digit sum on each iteration.

Example: Multiplication

12345 x 67890 = 838102050

The digital roots of 12345 and 67890 are 6 and 3 respectively. The product of these digital roots is 18. The digital root of 18 is 9.

The sum of the digits of 838102050 is 27, whose digital root is also 9.

Hence, this confirms that the calculation is correct. Pretty cool eh?

How does this work?

For any number

{\displaystyle 10^{n}d_{n}+10^{n-1}d_{n-1}+\cdots +d_{0}}

the digit sum is {\displaystyle d_{n}+d_{n-1}+\cdots +d_{0}}. The difference between the original number and its digit sum is

{\displaystyle {\begin{aligned}&10^{n}d_{n}+10^{n-1}d_{n-1}+\cdots +d_{0}-\left(d_{n}+d_{n-1}+\cdots +d_{0}\right)\\={}&\left(10^{n}-1\right)d_{n}+\left(10^{n-1}-1\right)d_{n-1}+\cdots +9d_{1}.\end{aligned}}}

Noting that numbers of the form {\displaystyle 10^{i}-1} are always divisible by 9, replacing the original number by its digit sum has the effect of casting out

{\displaystyle {\frac {10^{n}-1}{9}}d_{n}+{\frac {10^{n-1}-1}{9}}d_{n-1}+\cdots +d_{1}}

lots of 9.

M x


6174 is known as Kaprekar’s Constant. Why is this number important? Perform the following process (called Kaprekar’s Routine):

  1. Take any two digit number whose digits are not all identical.
  2. Arrange the digits in descending and then ascending order to get two four digit numbers.
  3. Subtract the smaller number from the bigger number.
  4. Go to step 2 and repeat.

This process will always reach its fixed point 6174 in at most 7 iterations. 6174 is a fixed point as once it has been reached, the process will continue yielding 7641 – 1467 = 6174.

Example: 3141


The Maths Behind it

Each number in the sequence uniquely determines the next number. As there are only finitely many possibilities, eventually the sequence must return to a number it has already hit. This leads to a cycle.

So any starting number will give a sequence that eventually cycles.

There can be many cycles, but for 4 digit numbers in base 10, there happens to be 1 non – trivial cycle, which involves the number 6174.

To read more, click here.

Numberphile Video


Click here for my previous post about Kaprekar. M x

MATHS BITE: Wythoff’s Game

Wythoff’s game is a two-player mathematical strategy game. It is played with two piles of counters and goes as follows:

Players take turns to remove counters from one, or both piles (if they are removing stones from both piles, they must remove the same number of stones from each). The game ends when one person removes the last counter, or counters, thus winning.

It is name Wythoff’s game, as it was Dutch mathematician W. A. Wythoff that published a mathematical analysis of the game in 1907, although it was previously know in China as tsyan-shidzi (“choosing stones”).

Optimal Strategy?

Any position of the game can be described by a pair of integers (x,y) where x≤y. This describes the size of both piles in the position.

The strategy of the game involves cold and hot positions:

  • A cold position is one where the player whose turn it is to move will lose, even with his best move;
  • A hot position is one where the player whose turn it is to move will win with his best move.

Thus, the optimal strategy for a person in a hot position is to move to a cold position.

We can classify the positions as hot or cold recursively, using 3 simple rules:

  1. (0,0) is a cold position;
  2. Any position from which a cold position can be reached in a single move is a hot position;
  3. If every move leads to a hot position then the position is cold.

For example (taken from Wikipedia):

“all positions of the form (0, y) and (y, y) with y > 0 are hot, by rule 2. However, the position (1,2) is cold, because the only positions that can be reached from it, (0,1), (0,2), and (1,1), are all hot. The cold positions (x, y) with the smallest values of x and y are (0, 0), (1, 2), (3, 5), (4, 7),(6,10) and (8, 13).”

Connection with the Golden Ratio

Wythoff discovered that the cold positions can be determined using the Golden Ratio. Namely, if n is any natural number, then

Screen Shot 2017-11-05 at 5.54.53 PM.png

is a cold position (where we use the floor function and φ is the Golden Ratio).

To read more, click here.

M x

MATHS BITE: Kaprekar Numbers

Consider an n-digit number k. Square it, and then add the right n digits to the left n or n-1 digits (by convention, the second part may start with the digit 0, but must be nonzero). If the result is k then it is called a Kaprekar number. They are named after D. R. Kaprekar, a recreational mathematician from India.

We can extend the definition to any base b:

Let  X  be a non-negative integer and  n a positive integer.  X  is an n-Kaprekar number for base  b  if there exist non-negative integer A, and positive integer B  satisfying:

X2 = Abn + B, where 0 < B < bn
X = A + B


Examples in Base 10

  • 297: 2972 = 88209, which can be split into 88 and 209, and 88 + 209 = 297.

  • 999: 9992 = 998001, which can be split into 998 and 001, and 998 + 001 = 999.
  • In particular, 9, 99, 999… are all Kaprekar numbers.
  • More generally, for any base b, there exist infinitely many Kaprekar numbers, including all numbers of the form bn − 1.
  • 100: 100 is NOT a Kaprekar number as, although 1002 = 10000 and 100 + 00 = 100, the second part here is zero.

    M x

    (P.S. Another post on Kaprekar is coming soon!)

Modern Mathematicians: Hirotugu Akaike

On November 5th, Google Doodle celebrated the 90th birth anniversary of Hirotugu Akaike. Having never heard of his work before I was interested in finding out more about him.


Google Doodle

Hirotugu Akaike was an award-winning Japanese statistician who worked in information theory (“studies the quantification, storage, and communication of information”).

He is known for the ‘Akaike Information Criterion’, which he formulated in the 1970s. In post-war Japan, Akaike worked on problems that were unique to his country and that would help contribute to its reconstruction. Using fundamental concepts of information maths, he analysed the processing of “sericultural products, cement kiln controls, and thermal electric power plant controls”. In doing so, he was able to give a  solution to the model selection problem: the Akaike Information Criterion.

AIC is widely used today as a guideline for the selection of statistical models in a variety of areas, such as medicine, engineering, economics as well as the fields of mathematics and statistics.

In 2006, Akaike was awarded the Kyoto Prize for “his major contribution to statistical science and modelling in the development of the Akaike information criterion“.

He passed away on August 4, 2009 at the age of 82.

M x

What is the Gamma Function?

A lot of important functions in applied sciences are defined using improper integrals, and perhaps the most famous of these is the Gamma Function. Throughout my course I have heard mention of this function, and always wondered “but what exactly is the Gamma Function?” I finally decided to find out.

Mathematicians wanted to find a formula that generalised the factorial expression for the natural numbers. This lead to the discovery of following very well-known formula:


Say we replace the n but the x to create the function:


What is the domain of this function? The only possible ‘bad points‘ are 0 and ∞:

  • t ≈ 0: e^-t ≈ 1 and hence the expression inside the integral is approximately t^x, meaning we have convergence at around 0, only if x>-1.
  • t –> ∞: No matter the value of x, the integral is convergent.

From this we can see that the domain of f(c)  is (-1,∞).

To obtain (0,∞) as the domain, we need to shift the function one unit to the right. This defines the Gamma Function.


The above discussion explains why the Gamma Function has the x-1 power.


Some Properties:

  • Γ(n) = (n-1)! where n is a natural number
  • Γ(x+1) = xΓ(x) for x > 0. This follows easily from the definition of Γ(x) by performing integration by parts.
  • Weierstrass’s definition is also valid for all complex numbers (except non-positive integers):{\displaystyle \Gamma (z)={\frac {e^{-\gamma z}}{z}}\prod _{n=1}^{\infty }\left(1+{\frac {z}{n}}\right)^{-1}e^{z/n}}where{\displaystyle \gamma \approx 0.577216} is the Euler-Mascheroni Constant.
  • Taking the logarithm of the above expression (we can do this as Γ(x) > 0 for x > 0), we get that:


  • Differentiating this, we observe that:displaymath355In fact, Γ(x) can be differentiated infinitely often.
  • Γ(x) is connected with sin(x): For x > 0 displaymath451

Click here for more properties and applications.

M x