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 7 vampires with 4 digits:
1260=21 · 60, 1395=15 · 93, 1435=35 · 41,
1530=30 · 51, 1827=21 · 87, 2187=27 · 81,
6880=80 · 86
The 5 prime vampires with 6 digits:
117067 = 167 · 701, 124483 = 281 · 443, 146137 = 317 · 461,
371893 = 383 · 971, 536539 = 563 · 953
Modulo 9 congruence
An important theoretical result found by Pete Hartley:
If x·y is a vampire number then x·y == x+y (mod 9)
Proof:
Let mod be the binary modulo operator and d(x) the sum of the decimal digits of x.
It is wellknown that d(x) mod 9 = x mod 9, for all x.
Assume x·y is a vampire. Then it contains the same digits as x and y,
and in particular d(x·y) = d(x)+d(y). This leads to:
(x·y) mod 9 = d(x·y) mod 9 = (d(x)+d(y)) mod 9 = (d(x) mod 9 +
d(y) mod 9) mod 9
= (x mod 9 + y mod 9) mod 9 = (x+y) mod
9
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 
Vampire
equations 
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 (ndigit vampire numbers)/(ndigit 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.
First 15 vampires with exactly 2 fang pairs
125460 = 204 · 615 = 246 · 510

11930170 = 1301 · 9170 = 1310 · 9107

12054060 = 2004 · 6015 = 2406 · 5010

12417993 = 1317 · 9429 = 1347 · 9219

12600324 = 2031 · 6204 = 3102 · 4062

12827650 = 1826 · 7025 = 2075 · 6182

13002462 = 2031 · 6402 = 3201 · 4062

22569480 = 2649 · 8520 = 4260 · 5298

23287176 = 2673 · 8712 = 3267 · 7128

26198073 = 2673 · 9801 = 3267 · 8019

26373600 = 3600 · 7326 = 3663 · 7200

26839800 = 2886 · 9300 = 3900 · 6882

46847920 = 4760 · 9842 = 6290 · 7448

61360780 = 7130 · 8606 = 7613 · 8060

1001795850 = 10170 · 98505 = 19701 · 50850

First 15 vampires with 3 fang pairs:
13078260 
= 
1620 · 8073 
= 
1863 · 7020 
= 
2070 · 6318 
107650322640 
= 
140532 · 766020 
= 
153204 · 702660 
= 
200760 · 536214 
113024597400 
= 
125100 · 903474 
= 
152100 · 743094 
= 
257400 · 439101 
119634515208 
= 
195351 · 612408 
= 
234156 · 510918 
= 
285513 · 419016 
134549287600 
= 
138650 · 970424 
= 
145700 · 923468 
= 
182900 · 735644 
135173486250 
= 
164175 · 823350 
= 
328350 · 411675 
= 
361185 · 374250 
138130447950 
= 
140415 · 983730 
= 
308913 · 447150 
= 
330891 · 417450 
146083269717 
= 
167409 · 872613 
= 
204687 · 713691 
= 
237897 · 614061 
150967233648 
= 
163548 · 923076 
= 
327096 · 461538 
= 
367983 · 410256 
216315684000 
= 
316251 · 684000 
= 
351000 · 616284 
= 
421668 · 513000 
221089445500 
= 
225500 · 980441 
= 
440198 · 502250 
= 
441980 · 500225 
315987404670 
= 
348705 · 906174 
= 
446859 · 707130 
= 
453087 · 697410 
463997983680 
= 
469938 · 987360 
= 
478380 · 969936 
= 
493680 · 939876 
472812953760 
= 
629370 · 751248 
= 
657342 · 719280 
= 
671328 · 704295 
10174695862032 
= 
1322058 · 7696104 
= 
1406019 · 7236528 
= 
1809132 · 5624076 
First vampires with 4 and 5 fang pairs:
16758243290880 
= 
1982736 · 8452080 
= 
2123856 · 7890480 
= 
2751840 · 6089832 
= 
2817360 · 5948208 
18762456533040 
= 
2558061 · 7334640 
= 
3261060 · 5753484 
= 
3587166 · 5230440 
= 
3637260 · 5158404 
24959017348650 
= 
2947050 · 8469153 
= 
2949705 · 8461530 
= 
4125870 · 6049395 

= 
4129587 · 6043950 
= 
4230765 · 5899410 
Smallest vampire number with 1, 2, 3, 4, 5 fang pairs:
1260, 125460, 13078260, 16758243290880, 24959017348650
Vampire with 100025 fang pairs
A 70digit vampire number with 100025 different fang pairs:
1067781345046160692992979584215948335363056972783128881420721375504640
= 10678480810942174645657393025226495 · 99993750417382556182683103817340672
= 10678627541790580122508405533952248 · 99992376442330371917154164866387680
= 10678870645463554371658209457751760 · 99990100123533226388114347982829264
= 10678925660351864576350317228737136 · 99989585002034549234496184711872240
= 10679051531926761484527503920563120 · 99988406447319285718532648847633072
= 10679070628515510276363214421074560 · 99988227645479313532487533888609194
= 10679277844716332381108925372508482 · 99986287516103441645630395905467520
= 10679542601279227006934138728832640 · 99983808755841163513535641459770426
= 10679621271352355185449739854675480 · 99983072237818042661261004507343968
..... (100015 fang pairs omitted here)
= 32676369193453808819526186585907440 · 32677478294010514277129531489030256
The tested number was carefully chosen.
See choice of vampire, 1000 fang pairs or
all fang pairs (3.2 MB zip file).
Search of small vampires
I wrote a very efficient C program to find vampire numbers:
Algorithms and C source.
The 4390670 12digit 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 14digit vampires were computed to a 7 GB file in 19 hours on
November 1213
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 · 4208
1005240208 = 25001 · 40208
.....
1·10^{2n+3}+524·10^{n+1}+208 = (25·10^{n}+1) ·
(40·10^{n}+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)·10^{n+2}+y = x · y, where rev(x) is the decimal
reverse of x.
I noticed that the smallest vampire with 2 fang pairs starts a pattern of vampires with 2 fang pairs:
125460 = 204 · 615 = 246 · 510
12054060 = 2004 · 6015 = 2406 · 5010
.....
12·10^{2n}+54·10^{n}+60 = (2·10^{n}+4) · (6·10^{n}+15)
= (2.4·10^{n}+6) · (5·10^{n}+10)
This formula generates squared vampires:
(94,892,254,795·10^{n}+1)^{2} = 9,004,540,020,079,200,492,025·10^{2n}+189,784,509,590·10^{n}+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: (22 November 2002, 04:32pm)
1301a 94892254795*10^45418+1 45429 p97 2002
...
p97 Jens Kruse Andersen, PrimeForm
The corresponding vampire has 90858 digits.
Update September 9 2007: 94892254795·10^{103294}+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·10^{n}) · (5·10^{n}+1) =
15·10^{2n}+3·10^{n}
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 ddigit 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 ddigit vampires (d even) grows faster than d^{b1} 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 d^{b1} which completes the proof.
A formula for the vampire sequence with only one 0 to the left of all 3's is:
(30·10^{n}) · (50·10^{n}+3510·(10^{n}1)/9999+1)
= 15·10^{2n+2}+1053·(10^{n}1)/9999·10^{n+2}+30·10^{n}
Here n must be divisible by 4. 3510·(10^{n}1)/9999 is the number with n/4 concatenations of
"3510", and 1053·(10^{n}1)/9999 is n/4 concatenations of
"1053".
Gigantic vampire number
November 17 2002 I found the 10060digit 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 100digit vampire found by Myles Hilliard March 9
1999. I broke that several times in the week before the above record.
Links about vampire numbers:
Clifford A. Pickover's
original vampire number post from 1994
A 1999 post from Casey Billett ascribing the modulo
9 congruence to Pete Hartley
Eric Weisstein's
World of Mathematics
John Child's
Vampire Numbers (obsolete results)
Carlos Rivera's
Prime Puzzles and Problems
Neil Sloane's
The OnLine Encyclopedia of Integer Sequences (search on vampire numbers)
Henry Ernest Dudeney's Amusements in Mathematics at Project
Gutenberg (Puzzle 85: The cab numbers)
This page was made by Jens Kruse Andersen and last updated 12 March 2012.
Email me with any comments or interesting results.jens.k.a@get2net.dk home