Vampire numbers

Document created December 10 2002.
Sections "Vampire with 100025 fang pairs" and
"Exponentially growing number of vampires" added June 27 2003.

The vampire numbers were introduced by Clifford A. Pickover in 1994.
(H. E. Dudeney's book "Amusements in Mathematics" from 1917 contained a variant in a puzzle called "The
cab numbers")

Definitions:
A vampire number is a number which can be written as a product of two numbers (called fangs),
containing the same digits the same number of times as the vampire number.
Example:1827000 = 210 · 8700
A true vampire number is a vampire number which can be written with two fangs having
the same number of digits and not both ending in 0. Example:1827 = 21 · 87
All vampire numbers (or just vampires) on the rest of this page are implicitly true.
They must clearly have an even number of digits.
A prime vampire number (introduced by Carlos Rivera in 2002) is a
true vampire number where the fangs are the prime factors.

The solutions to the congruence are
(x mod 9, y mod 9) in {(0,0), (2,2), (3,6), (5,8), (6,3), (8,5)}
Only these cases (6 out of 81) have to be tested in a vampire search
based on testing x·y for different values of x and y.

Vampire number counts

Digits

Vampire
ratio

Vampires with at least f
different fang pairs

Vampireequations

Prime
vampires

f=1(all vampires)

f=2

f=3

f=4

f=5

4

1/1286

7

0

0

0

0

7

0

6

1/6081

148

1

0

0

0

149

5

8

1/27881

3228

14

1

0

0

3243

57

10

1/82984

108454

172

0

0

0

108626

970

12

1/204980

4390670

2998

13

0

0

4393681

26653

14

1/431813

208423682

72630

140

3

1

208496456

923920

Vampire ratio is (n-digit vampire numbers)/(n-digit integers)
and not a ratio of performed tests.
Vampire equations are all equations of the form vampire = fang1 · fang2, i.e. each
vampire number counts for each different fang pair. Prime vampires obviously only have one fang pair.
The vampire equations for all table counts below 15 are on this page.

I wrote a very efficient C program to find vampire numbers:
Algorithms and C source.
The 4390670 12-digit true vampire numbers were computed to a 128 MB text file in 9 minutes on my
Athlon XP 1500+ with 133 MHz ram on November 10 2002. As far as I know, Walter
Schneider was first to compute them but a bug gave him too many numbers. We
agree on the count now.

The 208423682 14-digit vampires were computed to a 7 GB file in 19 hours on
November 12-13
2002.

Vampire patterns

Schneider writes that Fred Roushe and Douglas Rogers were first to find a pattern to generate infinitely many true vampires.
He references an undated manuscript I have not seen.
All known patterns fill 0's in the middle of one or both fangs.
Such patterns are abundant and easy to find with a computer search. Extra
conditions are required to make huge vampires interesting.

Weisstein ascribes this pattern to Roushe and Rogers:10524208 = 2501 · 42081005240208 = 25001 · 40208
.....1·102n+3+524·10n+1+208 = (25·10n+1) ·
(40·10n+208)
The formula produces vampires with 2n+4 digits, i.e. the 2 examples are for n=2 and n=3.
If the fangs are called x and y then the vampire equation can be written:rev(x)·10n+2+y = x · y, where rev(x) is the decimal
reverse of x.

This formula generates squared vampires:(94,892,254,795·10n+1)2 = 9,004,540,020,079,200,492,025·102n+189,784,509,590·10n+1
The form of the fang makes it ideal for proving large primes. I have used PrimeForm/GW to
find and prove the fang prime for n = 41, 65, 75, 257, 633, 730, 4755, 4780,
16868 and 45418.
The last prime has 45429 digits and was number 1301 on the list of the
5000 largest known primes
when I submitted it:

The corresponding vampire has 90858 digits.
Update September 9 2007: 94892254795·10103294+1 is prime!
The vampire has 206610 digits. Many exponents between 45418 and 103294 have not been tested.

Exponentially growing number of vampires

The simplest vampire pattern is:
(3·10n) · (5·10n+1) =
15·102n+3·10n
The first cases are: 30·51=1530, 300·501=150300, ...
It remains a vampire when an arbitrary number of the digits "351" is inserted in the second fang, as long as there is at least one "0" to the left of every "3".
Example: 300000000000 · 500351035101 = 150105310530300000000000
Each "0351" in the second fang is multiplied by 3 and becomes "1053" in the vampire.
This pattern trivially shows that the number of d-digit vampires tends to infinite.
Moreover, it grows faster than any polynomial since sufficiently large n can give an arbitrary number of "free variables" (positions to place "351"). This is also called exponential growth.

Theorem: The number of d-digit vampires (d even) grows faster than db-1 for any given b.
Proof: Consider vampires of the above pattern with exactly b occurrences of "351".
Split the second fang in b parts, one for each "351".
If d is big enough, then each "351" can move independently in at least d/(10b) positions.
The value 10 is not important, only that there is some constant.
The number of combinations is at least (d/(10b))b.
If b is fixed then this grows faster than db-1 which completes the proof.

A formula for the vampire sequence with only one 0 to the left of all 3's is:
(30·10n) · (50·10n+3510·(10n-1)/9999+1)
= 15·102n+2+1053·(10n-1)/9999·10n+2+30·10n
Here n must be divisible by 4. 3510·(10n-1)/9999 is the number with n/4 concatenations of
"3510", and 1053·(10n-1)/9999 is n/4 concatenations of
"1053".

Gigantic vampire number

November 17 2002 I found the 10060-digit vampire number:

S · (S+12958410996), where S is 503 repetitions of "9514736028".

It is the smallest solution of form S · (S+9n) and required 12958410996/9+1 = 1,439,823,445 attempts to find.
All digits occurs more than 1000 times in the
decimal expansion.
The fangs were not generated by a vampire pattern and do not contain adjacent
0's. The old record was a 100-digit vampire found by Myles Hilliard March 9
1999. I broke that several times in the week before the above record.