# Immortal numbers

The immortal numbers were defined and researched by Daniel Marschall and are defined as integers, which contain themselves as suffix when raised to a power.

## 1. Definitions

### 1.1 Simple case (base 10, power 2)

Definition: A number $n \in \mathbb{N}_{0}$ is "immortal" (with power 2 at base 10), if it satisfies following equation:

$\large n^2 \equiv n \quad ( \bmod \; 10^{\lfloor\log_{10}(n)+1\rfloor} )$

Example: The number 625 is immortal at base 10, because 625 x 625 = 390625

### 1.2 General case (base b, power p)

Definition: A number $n \in \mathbb{N}_{0}$ is "immortal" with power $p \in \mathbb{N}\setminus\{0,1\}$ at base $b \in \mathbb{N}\setminus\{0,1\}$, if it satisfies following equation:

$\large n^p \equiv n \quad ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

Example: The number 2047 ( 3777(8) ) is immortal with power 3 at base 8, because 3777(8)3 = 77720013777(8)

### 1.3 Set of immortal numbers

The set $\small \mathbb{M}_{b}^{p}$ contains all immortal numbers with power $p$ at base $b$.

Definition:

$\large n \in \mathbb{M}_{b}^{p} \; \Leftrightarrow \; n^p \equiv n \; ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

Example: $\small 625 \in \mathbb{M}_{10}^{2}$

### 1.4 Immortality of base/power-tuples

The "immortality" of a $(b,p)$ tuple is defined by the amount of immortal numbers divided by the maximum length of these numbers. The higher the maximum length is chosen, the more accurate is the immortality. The unit of measurement can be optionally written as $\tfrac{I}{D}$ ("Immortals per Digit"). Since the numbers $\{0,1\}$ are always immortal, they will be exluded from this calculation.

Formal definition:

$\large \vert \mathbb{M}_{b}^{p} \vert^\ast := \lim\limits_{L \rightarrow \infty}{\Big[ \frac{1}{L}\cdot\vert\{ n \in \mathbb{M}_{b}^{p} \; \vert \; 1 < n < b^L \}\vert \Big]}$

Example: For base 10, power 3, there are 1176 immortal numbers with length of 1..100 digits, exluding 0 and 1. The immortality of $(10,3)$ is therefore approximately $\vert\mathbb{M}^{3}_{10}\vert^\ast \approx \tfrac{1176}{100} = 11.76$

Here you can find a plot that compares the immortality of various $(b,p)$ tuples.

### 1.5 Pseudo immortal base/power-tuples

There are base/power-tuples $(b,p)$ where only the numbers $\mathbb{M}_b^p = \{0,1\}$ are immortal. These base/power-tuples are called "pseudo-immortal". An example is $(9,2)$.

Their immortality is zero $\vert\mathbb{M}_{b}^{p}\vert^\ast = 0$ because:

$\vert \{0,1\} \vert^\ast = \lim\limits_{L \rightarrow \infty}{\Big[ \frac{1}{L}\cdot\vert\{ n \in \{0,1\} \; \vert \; 1 < n < b^L \}\vert \Big]} = \lim\limits_{L \rightarrow \infty}{\Big[ \frac{1}{L}\cdot\vert\{ \}\vert \Big]} = 0$

Here you can find a plot that shows the $(b,p)$ values of some pseudo-immortals.

### 1.6 Super immortal numbers

Super immortal numbers are numbers which are immortal to every $(b,p)$ tuple. Only the numbers $\{0,1\}$ satisfy this property (see proof).

$\mathbb{M}_{s} := \bigcap_{b=2}^{\infty}\bigcap_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \{0,1\}$

## 2. Branch graph notation

Immortal numbers can be written in graph with "branches".

In base 10, power 2, things are quite easy: There are only 4 branches 0, 1, 5 and 6. The branches 0 and 1 are trivial branches and have no children.
In branch 5, the immortal numbers are 5, 25, 625, 90625, 890625, 2890625, 12890625, 212890625, 8212890625, ...
In branch 6, the immortal numbers are 6, 76, 376, 9376, 109376, 7109376, 87109376, 787109376, 1787109376, ...
In this case, immortal numbers of base 10 power 2 can be generated using a tree node and adding a single digit in front of it. Additionally, the sum of the pairs of digits below branch 5 and 6 always add up to 9.

However, there are more complex graphs, for example base 10, power 3:

Credits: The graphs were created with mind-map-online.de

## 3. Immortal number search

### 3.1 Base 10, power 2

There has been a huge effort to find immortal numbers with several million digits. A special algorithm, optimized extensively using SSE/MMX technology, has been written to archive this task.

On July, 9th 2019, the immortal number of base 10, power 2 with 1.1 billion digits was found. (Note: The double-verification started 2017 is still running)

Get the tool to calculate these numbers (Source codes written in C)

Credits: The search for giant immortal numbers at base-10-power-2 were only made possible by the users of the matheboard.de thread who contributed the algorithm for finding base-10-power-2 numbers as well as the contributor of this StackOverflow question who has showed me how to speed up the algorithm using SSE/MMX instructions.

### 3.2 Base b, power p

A rather trivial search algorithm has been developed to find all immortal numbers between base 2 and 36 and power 2 till 10, with a maximum length of 100 digits.

Python source code

Get a list of immortal numbers with max length 100 digits, for powers 2 till 10, with following base:
02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

## 4. Graphical plots

### 4.1 Immortal number overview

Python source code

Base 10 filtered:

### 4.2 Immortality of various (b,p)-tuples

Python source code

A red x denotes an immortality of zero. Dots denote an immortality. The bigger the dots are, the greater is the immortality of $\mathbb{M}_{b}^{p}$ .
Green dots denote an immortality of $\mathbb{N}$.
Blue dots denote an immortality of $\mathbb{R}$.

### 4.3 Pseudo immortal base/power tuples

Python source code

## 5. Miscellaneous proofs, theorems and attributes

### 5.1 An immortal number with power p is also immortal with power p+n(p-1)

We want to prove that $\large \mathbb{M}_{b}^{p} \subseteq \mathbb{M}^{p+n(p-1)}_{b}$

Let's begin with:

$n \in \mathbb{M}_{b}^{p} \; \Leftrightarrow \; n^p \equiv n \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} ) \qquad \vert \cdot n^{p-1}$

$n^p \cdot n^{p-1} \equiv n \cdot n^{p-1} \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

$n^{p+p-1} \equiv n^{1+p-1} \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

$n^{p+(p-1)} \equiv n^{p} \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

With mathematical induction we can now prove that

$n^{p+n(p-1)} \equiv n^{p+(n-1)(p-1)} \equiv ... \equiv n^{p+(p-1)} \equiv n^{p} \equiv n \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

therefore

$n \in \mathbb{M}_{b}^{p+n(p-1)} \Leftrightarrow n \in \mathbb{M}_{b}^{p+(n-1)(p-1)} \Leftrightarrow ... \Leftrightarrow n \in \mathbb{M}_{b}^{p+(p-1)} \Leftrightarrow n \in \mathbb{M}_{b}^{p}$

Since all immortal numbers of power $p$ are also immortal in power $p+n(p-1)$, we have now proven that

$\large \mathbb{M}_{b}^{p} \subseteq \mathbb{M}^{p+n(p-1)}_{b} \quad \blacksquare$

### 5.2 Theorem of complete immortality

Theorem: For every number $n \in \mathbb{N}_{0}$ there is a tuple $(b,p)$ so that $n \in \mathbb{M}_{b}^{p}$. In other words, every number is immortal to some specific base and power.

$\large \forall \; n \in \mathbb{N}_0 \; \exists \; (b,p): n \in \mathbb{M}_{b}^{p}$

Note: The theorem of complete immortality also leads to the conclusion:

$\bigcup_{b=2}^{\infty} \bigcup_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \mathbb{N}_{0}$

Proof:

(0) Let $n \in \mathbb{N}_0$ with an arbitary value.

(1) Let $b$ be a prime $b \in \mathbb{P}$ that is not a prime factor of $n$ ( $n \nmid b$ ), then $m := b^{\lfloor\log_{b}(n)+1\rfloor}$ is not a prime factor of $n$ either ( $n \nmid m$ ).

In other words: $\gcd(b,n) = 1 \; \Rightarrow \; \gcd(m,n) = 1$ .

(2) Since we have $\gcd(m,n) = 1$, we can create following term using the Fermat-Euler theorem:

$n^{\varphi(m)} \equiv 1 \quad (\bmod \; m)$

Transforming it a bit, we get:

$n^{\varphi(m)} \equiv 1 \quad (\bmod \; m) \quad \vert \cdot n$

$n^{\varphi(m)} \cdot n \equiv n \quad (\bmod \; m)$

$n^{\varphi(m)+1} \equiv n \quad (\bmod \; m)$

(3) If we now define $p := \varphi(m) + 1$ and insert the definition of $m$ from above, then we get:

$\large n^{p} \equiv n \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

which is equivalent to:

$\large n \in \mathbb{M}_{b}^{p} \quad \blacksquare$

Credits: Many thanks to Finn from matheboard.de for showing me how to prove this theorem!

### 5.3 The only super-immortals are 0 and 1

We want to prove that the only super-immortals are 0 and 1.

$\mathbb{M}_{s} := \bigcap_{b=2}^{\infty}\bigcap_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \{0,1\}$

(1) First, we verify that 0 and 1 are immortal to every $b,p \in \mathbb{N}\setminus\{0,1\}$ :

(1.1) $\forall \; b,p \geq 2: \; 0^p = 0 \quad \Rightarrow \quad 0^p \equiv 0 \; (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} ) \quad \Rightarrow \quad 0 \in \mathbb{M}_{b}^{p}$

(1.2) $\forall \; b,p \geq 2: \; 1^p = 1 \quad \Rightarrow \quad 1^p \equiv 1 \; (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} ) \quad \Rightarrow \quad 1 \in \mathbb{M}_{b}^{p}$

(2) To prove that the only super-immortals are 0 and 1, we want to find a $(b,p)$ tuple for every $n > 1$ that will cause $n \notin \mathbb{M}_{b}^{p}$ :

$\large \forall \; n \in \mathbb{N}\setminus\{0,1\} \; \exists \; (b,p): n \notin \mathbb{M}_{b}^{p}; \quad b,p \in \mathbb{N}\setminus\{0,1\}$

(3) The definition of an immortal number is

$n^p \equiv n \quad ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

We can see that a number can only be immortal if $n^p$ is a number that has more digits (in the notation of base $b$) than $n$.

(4) If we choose a high enough base $b$, then $n$ and $n^p$ would have the same amounts of digits, and therefore $n$ could not be immortal.

So, we need to find a $b$, so that $b^{\lfloor\log_{b}(n)+1\rfloor} > n^p$ .

If we choose $b := n^p$, we get:

$n^{p^{\lfloor\log_{n^p}(n)+1\rfloor}} > n^p$

$n^{p+{\lfloor\log_{n^p}(n)+1\rfloor}} > n^p$

$n^{p+{\lfloor\tfrac{\ln n}{\ln n^p}+1\rfloor}} > n^p$

$n^{p+{\lfloor\tfrac{\ln n}{p \cdot \ln n}+1\rfloor}} > n^p$

$n^{p+{\lfloor\tfrac{1}{p}+1\rfloor}} > n^p$

$n^{p+{\lfloor\tfrac{1}{p}\rfloor}+1} > n^p$

If $p>1$, then $\lfloor\tfrac{1}{p}\rfloor = 0$ and therefore:

$n^{p+0+1} > n^p$, which is true, if $n>1$.

(5) We continue by taking the general definition of an immortal number

$n^p \equiv n \; ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} ); \quad b,p \in \mathbb{N}\setminus\{0,1\}$

which can also be written as:

$(n^p \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor}) = (n \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )$

Since $b^{\lfloor\log_{b}(n)+1\rfloor} > n^p$ and $b^{\lfloor\log_{b}(n)+1\rfloor} > n$ ( because $n^p > n$ if $p \geq 2$ ) :

$(n^p \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor}) = (n \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} ) \; \Rightarrow \; n^p = n$, which is false if $p \geq 2$ .

Side note:
$(a \bmod m) := a - \lfloor \tfrac{a}{m} \rfloor \cdot m$
If $m > a$ , then: $(a \bmod m) = a - 0 \cdot m = a$

(6) Therefore:

$\Large \forall \; n\in\mathbb{N}\setminus\{0,1\}: \; n \notin \mathbb{M}_{b:=n^p}^{p}, \;\; p \in \mathbb{N}\setminus\{0,1\}$

$\Leftrightarrow \forall \; n\in\mathbb{N}\setminus\{0,1\}: \; n \notin \mathbb{M}_{s}$

(7) Bringing together the results of step (1) and (6), we can conclude:

$\mathbb{M}_{s} = \{0,1\} \quad \blacksquare$

## 6. Open questions and unproven theorems

Help and suggestions are welcome!

#1:

$\bigcap_{b=2}^{\infty} \Big( \bigcup_{p=2}^{\infty}\mathbb{M}_{b}^{p} \Big) \stackrel{?}{=} \{0,1\}$

#2:

$\bigcap_{p=2}^{\infty} \Big( \bigcup_{b=2}^{\infty}\mathbb{M}_{b}^{p} \Big) \stackrel{?}{=} \{0,1\}$

#3: Is there a base that does not have any non-trivial (not 0,1) immortal numbers?

$\exists? \; b \in \mathbb{N}\setminus\{0,1\} : \sum_{p=2}^{\infty} \vert \mathbb{M}_{b}^{p} \vert^{\ast} = 0$

#4: Is there a power that does not have any non-trivial (not 0,1) immortal numbers?

$\exists? \; p \in \mathbb{N}\setminus\{0,1\} : \sum_{b=2}^{\infty} \vert \mathbb{M}_{b}^{p} \vert^{\ast} = 0$

#5: The topic "Base B / Power P" is not researched very much. It is not known how to find "Base B / Power P" immortal numbers without brute-forcing them.

Various notes and other stuff: runs, old_notes

Credits: The equations were generated with the Codecogs Online LaTeX Editor.

Last update: 13 July 2019

Contact: info&daniel-marschall.de