# 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

-Wikipedia

### 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.

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):where 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:In fact, Γ(x) can be differentiated infinitely often.
• Γ(x) is connected with sin(x): For x > 0

M x

# Waring’s Problem

### Statement:

Take any whole number k that is greater than or equal to 2.  Show that there is some number s (that is allowed to depend on k) so that every positive whole number is a sum of s kth powers.

### Proof

This problem was first solved by David Hilbert, and was then later proved by G.H. Hardy and John Littlewood in a different way. In this case, the second proof actually gave a lot more insight to the problem. To solve Waring’s problem as it has been stated you don’t need to give an s, you only need to show that one exists.  Finding the smallest s that works is a much more challenging (although arguably more interesting) problem. Using the, now named, Hardy-Littlewood circle method, Hardy and Littlewood wrote down an expression that approximated the number of ways to write N as a sum of s kth powers:

The proof of Waring’s problem comes from that fact that since this must be positive and also be a whole number, there must be some way to write N as a sum of s kth powers.

M x

(Sorry for missing a post last week, my university work is getting a bit hectic so posts may be more sporadic!)

# MATHS BITE: Even or Odd?

What are even and odd functions? These two terms get used very frequently in order to simplify problems such as integration or when finding Fourier coefficients, for example.

### Even Function

An even function is such that for all x in the domain

f(x) = f(-x)

An even function is symmetric with respect to the y-axis.

Even Function | mathsisfun

Examples:

• Any polynomial p, where n is even for all xn. For example f(x) = x2+2x4 – 6. Note that (x+1)2 is not even.
• f(x) = cos(x)

### Odd Function

An odd function is such that for all x in the domain

f(x) = -f(-x)

An odd function is symmetric with respect to the origin.

Odd Function | mathsisfun

Examples:

• x, x3, x5,… etc. Note that unlike even functions, an expression such as x3 + 1 is not odd.
• f(x) = sin(x)

### Odd and/or Even?

A function can be neither odd nor even, for example x− x + 1:

Neither odd nor even | mathsisfun

Additionally, the only function that is even and odd is f(x) = 0.

### Properties:

• Adding two even (odd) functions will give an even (odd) function.
• Adding an even and an odd function will give a function that is neither odd nor even.
• Both the product of two even functions and the product of two odd functions is even.
• The product of an even function and an odd function is odd.

# Markov Chains: An Intro

### The Markov Property

A stochastic process (“a mathematical object usually defined as a collection of random variables”) is said to have the Markov Property if, conditional on the present value, the future is independent on the past.

Let’s firstly introduce some notation: let S be a countable set called the state space and let = (Xt: t ≥ 0) be a sequence of random variables taking values in S.

Then, the sequence X is called a Markov Chain if it satisfies the Markov Property:

for all t ≥ 0 and all x0, x1, …, xt ϵ S.

Notation is simplified in the case where the Markov chain is homogeneous. This is when for all i, j ϵ S, the conditional probability P(Xt+1 = j | Xt = i) does not depend on the value of t.

### Examples

• Branching Process: The branching process is a simple model of the growth of a population; each member of the nth generation has a number of offspring that is independent of the past; Xn = size of the nth generation.
• Random Walk: A particle performs a random walk on the line: let Z1, Z2, …, be independent with P(Zi = 1) = p and P(Zi = -1) = 1-p, then Xn =
Z1 + … + Zn; at each epoch of time, it jumps a random distance that is independent of the previous jumps.
• Poisson Process: the Poisson process satisfies a Markov property in which time is a continuous variable rather than a discrete variable, and thus the Poisson process is an example of a continuous-time Markov chain; the Markov property still holds as arrivals after time t are independent of arrivals before this time.

### Two Quantities

For simplification (and as this is only an intro to  Markov chains) we’ll assume that the Markov chains are homogeneous.

Two quantities that are needed in order to calculate the probabilities in a chain are the:

1. transition matrix: P = (pi,j: i,j ϵ S) given by pi,j = P(X1 = j | X0 = i);
2. initial distribution: λ = (λi : i ϵ S) given by λi = P(X0 = i).

As we have assumed homogeneity we have that

pi,j = P(Xn+1 = j | Xn = i) for n ≥ 0.

These quantities are characterised in the following way:

#### Proposition:

a) The vector λ is a distribution  in that λi ≥ 0 for i ϵ S and the sum of λi over i = 1.

b) The matrix P = (pi,j) is a stochastic matrix in that pi,j ≥ 0 for i, j ϵ S and the sum of pi,j over j = 1 for i ϵ S (i.e. that P row sums to 1)

#### Proof:

a) As λi is a probability, it is clearly non-negative. Additionally, the sum of λi over i = the sum of P(X0 = i) over i = 1.

b) Since pi,j is a probability, it is non-negative. Finally, the sum of pi,j over j = the sum of P(Xn+1 = j | Xn = i) over j = P(Xn+1 ϵ S | Xn = i) = 1.

Hope you enjoyed this brief introduction to a Markov Chain!

M x

# Mind the Gap

Having now been through one full year of university, I thought I’d write a blog post on the differences between secondary school and university mathematics in the British curriculum.

Personally, the main difference that I found was the focus on mathematical proof, something that is not taught in secondary school. For example, one of my lecture courses in first year was Numbers and Sets, which focused on learning how to construct a proof, rather than teaching a lot theory. The technique of writing a proof is something that, as a mathematician, I will carry with me throughout the rest of my academic career so I worked hard to learn this skill well. Becoming used to the language and symbols used in mathematical documents was definitely challenging but vital in order to be able to understand lectures.

The only part of A-Levels that prepared me for this major aspect of university maths was the fact that in order to score all the method marks we had to demonstrate all the steps in our working out. However, I must stress that this is not the same; mathematical proofs, especially in pure maths, often require more explanation in each step and a more logical succession of steps.

The other big difference is not understanding everything! For me, A-Level maths was not a big challenge. Yes, I studied hard, but things came easily for me and I found that I wouldn’t be stuck on a question for a very long time. Fast-forward to now, I find myself stuck on a question for hours! Whilst this can often be very frustrating, I love and thrive off the challenge – this year I have progressed so much as a mathematician!

Finally, mathematics at university is much less computational. There are some more applied courses where computation is essential, however the pure courses require almost no calculations! In secondary school, they label pure maths as what I now call applicable maths. This is maths that still requires are fair bit of computational work, however it is not directly linked to another subject, such as physics. For example, differential equations.

Hope you enjoyed this brief overview of my thoughts on the differences between university and secondary school mathematics. If you would like me to go more in depth please leave me a comment below! M x