# Prime Number Problem

Standard

Following is a problem about prime factorization of the sum of consecutive odd primes. (source: problem 80 from The Green Book of Mathematical Problems)

Prove that the sum of two consecutive odd primes is the product of at least three (possibly repeated) prime factors.

The first thing to observe is that sum of odd numbers is even, hence the sum of two consecutive odd primes will be divisible by 2. Let’s see factorization of some of the examples: $3 + 5 = 2\times 2 \times 2$ $5 + 7 = 2 \times 2\times 3$ $7+11 = 2 \times 3\times 3$ $11+13 = 2 \times 2 \times 2 \times 3$ $13+17 = 2 \times 3 \times 5$ $17+19 = 2\times 2\times 3 \times 3$ $19+23 = 42 = 2\times 3\times 7$ $23+29 = 52 = 2\times 2 \times 13$

Now let $p_n$ and $p_{n+1}$ be the consecutive odd primes, then from above observations we can conjecture that either $p_n+p_{n+1}$ is product of at least three distinct primes or $p_n+p_{n+1}= 2^k p^\ell$ for some odd prime $p$ such that $k+\ell \geq 3$.

To prove our conjecture, let’s assume that $p_n+p_{n+1}$ is NOT a product of three (or more) distinct primes (otherwise we are done). Now we will have to show that if $p_n+p_{n+1}= 2^k p^\ell$ for some odd prime $p$ then $k+\ell \geq 3$.

If $\ell = 0$ then we should have $k\geq 3$. This is true since $3+5=8$.

Now let $\ell > 0$. Since $k\geq 1$ (sum of odd numbers is even), we just need to show that $k=1, \ell=1$ is not possible. On the contrary, let’s assume that $k=1,\ell = 1$. Then $p_n+p_{n+1} = 2p$. By arithmetic mean property, we have $\displaystyle{p_n < \frac{p_n+p_{n+1}}{2}} = p

But, this contradicts the fact that $p_n,p_{n+1}$ are consecutive primes. Hence completing the proof of our conjecture.

This is a nice problem where we are equating the sum of prime numbers to product of prime numbers. Please let me know the flaws in my solution (if any) in the comments.

# Happy Birthday Ramanujam

Standard

Today is the 130th birthday of Srinivasa Ramanujam Iyengar.

I will discuss the easiest-to-follow work of Ramanujam, from G. H. Hardy’s Ramanujan: Twelve lectures on subjects suggested by his life and work.

A partition of $n$ is a division of $n$ into any number of positive integral parts. Thus, the sum of digits of 130 = 1+3+0=4 has 5 partitions: $\displaystyle{4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1}$

The order in which the partitions are arranged is irrelevant, so we may think of them, as arranged in descending order. We denote the number of partitons of $n$ by $p(n)$; thus $p(4) = 5$. Also, by convention, we define $p(0) = 1$.

Very little was known about the arithmetical properties of $p(n)$; when Ramanujam started his investigations. Though we still don’t know when $p(n)$ is even or odd, there has been a lot of progress in this domain of research. For an overview, see the first section of Ken Ono’s “Distribution of the partition function modulo m” (it’s 17-year-old paper…)

Ramanujam was the first, and up to his death, the only, mathematician to discover the arithmetical properties of $p(n)$. His theorems were discovered by observing Percy MacMahon‘s table of $p(n)$ for the first 200 values of $n$. Ramanujan observed that the table indicated certain simple congruence properties of $p(n)$. In particular, the numbers of the partitions of numbers $5m+4, 7m+5$ and $11m+6$ are divisible by 5, 7 and 11 respectively, i.e.

• $p(5m+4) \equiv 0 \pmod{5}$
• $p(7m+5) \equiv 0 \pmod{7}$
• $p(11m+6) \equiv 0 \pmod{11}$

Hence, for example, for $n=130+1$ (Chinese way of calculating age) $p(131) \equiv 0 \pmod{7}$. And we can verify this using SageMath: Now, to check its divisibility by 7, take the last digit of the number you’re testing and double it. Then, subtract this number from the rest of the remaining digits. If this new number is either 0 or if it’s a number that’s divisible by 7, then the original number is divisible by seven. [Derive it yourself!]

This process is lengthy but it converts the process of division by a simpler operation of subtraction.

Here, we have: $5964539504 \rightarrow 596453942\rightarrow 59645390\rightarrow 5964539\rightarrow 596435\rightarrow 59633\rightarrow 5957\rightarrow 581\rightarrow 56 = 7\times 8$.

If you know how SageMath calculates the number of partitions, please let me know in the comments below.

# Finite Sum & Divisibility – 2

Standard

Earlier this year I discussed a finite analogue of the harmonic sum. Today I wish to discuss a simple fact about finite harmonic sums.

If $p$ is a prime integer, the numerator of the fraction $1+\frac{1}{2}+\frac{1}{3}+\ldots + \frac{1}{p-1}$ is divisible by $p$.

We wish to treat the given finite sum modulo $p$, hence we can’t just add up fractions. We will have to consider each fraction as inverse of an integer modulo p. Observe that for $0, we have inverse of each element $i$ in the multiplicative group $\left(\mathbb{Z}/p\mathbb{Z}\right)^\times$, i.e. there exist an $i^{-1}$ such that $i\cdot i^{-1}\equiv 1 \pmod p$.

For example, for $p=5$, we have $1^{-1}=1, 2^{-1}=3, 3^{-1}=2$ and $4^{-1}=4$.

Hence we have $\displaystyle{i\cdot \frac{1}{i}\equiv 1 \pmod p ,\qquad (p-i)\cdot \frac{1}{p-i} \equiv 1 \pmod p }$
for all $0.

Hence we have: $\displaystyle{i\left(\frac{1}{i}+\frac{1}{p-i}\right)\equiv i\cdot \frac{1}{i} - (p-i)\cdot \frac{1}{p-i} \equiv 0 \pmod p}$

Thus we have: $\displaystyle{\frac{1}{i}+\frac{1}{p-i}\equiv 0 \pmod p}$

The desired result follows by summation.

We can, in fact, prove that the above harmonic sum is divisible by $p^2$, see section 7.8 of G. H. Hardy and E. M. Wright’s An Introduction to the Theory of Numbers for the proof.