Is there a prime every year if YYYYMMDD is treated as a base-$10$ number

divisibilityelementary-number-theorynumber theoryprime numbersrecreational-mathematics

As we approach the end of the year, I thought about the appearance of primes in calendar dates as a recreational problem. Consider the number formed by concatenating the digits of a date in the form YYYYMMDD. For example 31-Dec-2019 will be written as $20191231$.

I was investigating if the number YYYYMMDD is prime. I checked for the next hundred thousand years and found that each year has between a minimum of $1$ for the year $5771237$ and a maximum of $37$ primes for the year $450060$. I could not yet find a single year which did not have a prime.

Conjecture: There is at least one prime every year.

Update: The year $27789755$ is the smallest year which has no prime.

What is the smallest counter example?

Also $37$ primes occurring in the year $450060$ because it implies that the interval $(4500600001, 4500601231)$ contains at least $37$ primes. Upon checking, it turns out this interval contains $77$ primes which is quite a dense for a short interval between two large numbers.

Best Answer

Your conjecture is false.

Let $S=\left\{s_1,s_2,\ldots,s_{366}\right\}$ be the set of all numbers of the form MMDD, including $229$. We can restate your problem in the following marginally weaker form (it's weaker since not all years are leap years):

For every $k$, at least one of the numbers $$10000k+s$$ for $s\in S$ is a prime number.

However, this can easily be proven false. If we take $p_1,p_2,\ldots,p_{366}$ to be $366$ distinct prime numbers, different from $2$ and $5$, by the Chinese Remainder Theorem, there exists a $Y$ such that $$Y\equiv-s_1\cdot10000^{-1}\pmod{p_1}$$ $$Y\equiv-s_2\cdot10000^{-1}\pmod{p_2}$$ $$\vdots$$ $$Y\equiv-s_{366}\cdot10000^{-1}\pmod{p_{366}}$$ For this year $Y$, every single number $10000Y+s_i$ that we can generate will be divisible by the corresponding $p_i$ (while at the same time being much bigger than it), meaning that this year will have no primes.


Here's an alternate proof, much more technical, but much more faster. If every year had a prime, then $\pi(n)\in O(n)$, which is false by the Prime Number Theorem.

Related Question