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.

Table of contents

1. Definitions

1.1 Simple case (base 10, power 2)

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

[latex]\large n^2 \equiv n \quad ( \bmod \; 10^{\lfloor\log_{10}(n)+1\rfloor} )[/latex]

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 [latex]n \in \mathbb{N}_{0}[/latex] is "immortal" with power [latex]p \in \mathbb{N}\setminus\{0,1\}[/latex] at base [latex]b \in \mathbb{N}\setminus\{0,1\}[/latex], if it satisfies following equation:

[latex]\large n^p \equiv n \quad ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

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 [latex]\small \mathbb{M}_{b}^{p}[/latex] contains all immortal numbers with power [latex]p[/latex] at base [latex]b[/latex].

Definition:

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

Example: [latex]\small 625 \in \mathbb{M}_{10}^{2}[/latex]

1.4 Immortality of base/power-tuples

The "immortality" of a [latex](b,p)[/latex] 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 [latex]\tfrac{I}{D}[/latex] ("Immortals per Digit"). Since the numbers [latex]\{0,1\}[/latex] are always immortal, they will be exluded from this calculation.

Formal definition:

[latex]\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]}[/latex]

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

Here you can find a plot that compares the immortality of various [latex](b,p)[/latex] tuples.

1.5 Pseudo immortal base/power-tuples

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

Their immortality is zero [latex]\vert\mathbb{M}_{b}^{p}\vert^\ast = 0[/latex] because:

[latex]\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 [/latex]

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

1.6 Super immortal numbers

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

[latex]\mathbb{M}_{s} := \bigcap_{b=2}^{\infty}\bigcap_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \{0,1\}[/latex]

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)

Download the giant immortal numbers:

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 [latex]\mathbb{M}_{b}^{p}[/latex] .
Green dots denote an immortality of [latex]\mathbb{N}[/latex].
Blue dots denote an immortality of [latex]\mathbb{R}[/latex].

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 [latex]\large \mathbb{M}_{b}^{p} \subseteq \mathbb{M}^{p+n(p-1)}_{b}[/latex]

Let's begin with:

[latex]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}[/latex]

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

[latex]n^{p+p-1} \equiv n^{1+p-1} \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

[latex]n^{p+(p-1)} \equiv n^{p} \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

With mathematical induction we can now prove that

[latex]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} )[/latex]

therefore

[latex]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}[/latex]

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

[latex]\large \mathbb{M}_{b}^{p} \subseteq \mathbb{M}^{p+n(p-1)}_{b} \quad \blacksquare[/latex]

5.2 Theorem of complete immortality

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

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

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

[latex]\bigcup_{b=2}^{\infty} \bigcup_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \mathbb{N}_{0}[/latex]

Proof:

(0) Let [latex]n \in \mathbb{N}_0[/latex] with an arbitary value.

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

In other words: [latex]\gcd(b,n) = 1 \; \Rightarrow \; \gcd(m,n) = 1[/latex] .

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

[latex]n^{\varphi(m)} \equiv 1 \quad (\bmod \; m)[/latex]

Transforming it a bit, we get:

[latex]n^{\varphi(m)} \equiv 1 \quad (\bmod \; m) \quad \vert \cdot n[/latex]

[latex]n^{\varphi(m)} \cdot n \equiv n \quad (\bmod \; m)[/latex]

[latex]n^{\varphi(m)+1} \equiv n \quad (\bmod \; m)[/latex]

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

[latex]\large n^{p} \equiv n \quad (\bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

which is equivalent to:

[latex]\large n \in \mathbb{M}_{b}^{p} \quad \blacksquare[/latex]

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.

[latex]\mathbb{M}_{s} := \bigcap_{b=2}^{\infty}\bigcap_{p=2}^{\infty}\mathbb{M}_{b}^{p} = \{0,1\}[/latex]

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

(1.1) [latex]\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}[/latex]

(1.2) [latex]\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}[/latex]

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

[latex]\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\}[/latex]

(3) The definition of an immortal number is

[latex]n^p \equiv n \quad ( \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

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

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

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

If we choose [latex]b := n^p[/latex], we get:

[latex]n^{p^{\lfloor\log_{n^p}(n)+1\rfloor}} > n^p[/latex]

[latex]n^{p+{\lfloor\log_{n^p}(n)+1\rfloor}} > n^p[/latex]

[latex]n^{p+{\lfloor\tfrac{\ln n}{\ln n^p}+1\rfloor}} > n^p[/latex]

[latex]n^{p+{\lfloor\tfrac{\ln n}{p \cdot \ln n}+1\rfloor}} > n^p[/latex]

[latex]n^{p+{\lfloor\tfrac{1}{p}+1\rfloor}} > n^p[/latex]

[latex]n^{p+{\lfloor\tfrac{1}{p}\rfloor}+1} > n^p[/latex]

If [latex]p>1[/latex], then [latex]\lfloor\tfrac{1}{p}\rfloor = 0[/latex] and therefore:

[latex]n^{p+0+1} > n^p[/latex], which is true, if [latex]n>1[/latex].

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

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

which can also be written as:

[latex](n^p \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor}) = (n \bmod \; b^{\lfloor\log_{b}(n)+1\rfloor} )[/latex]

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

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

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

(6) Therefore:

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

[latex] \Leftrightarrow \forall \; n\in\mathbb{N}\setminus\{0,1\}: \; n \notin \mathbb{M}_{s}[/latex]

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

[latex]\mathbb{M}_{s} =  \{0,1\} \quad \blacksquare[/latex]

6. Open questions and unproven theorems

Help and suggestions are welcome!

#1:

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

#2:

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

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

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

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

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

#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