In recreational mathematics, a vampire number (or true vampire number) is a compositenatural number with an even number of digits, that can be factored into two natural numbers each with half as many digits as the original number, where the two factors contain precisely all the digits of the original number, in any order, counting multiplicity. The two factors cannot both have trailing zeroes. The first vampire number is 1260 = 21 × 60.[1][2]
Definition
Let be a natural number with digits:
Then is a vampire number if and only if there exist two natural numbers and , each with digits:
such that , and are not both zero, and the digits of the concatenation of and are a permutation of the digits of . The two numbers and are called the fangs of .
Vampire numbers were first described in a 1994 post by Clifford A. Pickover to the Usenet group sci.math,[3] and the article he later wrote was published in chapter 30 of his book Keys to Infinity.[4]
Examples
n
Count of vampire numbers of length n
4
7
6
148
8
3228
10
108454
12
4390670
14
208423682
16
11039126154
1260 is a vampire number, with 21 and 60 as fangs, since 21 × 60 = 1260 and the digits of the concatenation of the two factors (2160) are a permutation of the digits of the original number (1260).
However, 126000 (which can be expressed as 21 × 6000 or 210 × 600) is not a vampire number, since although 126000 = 21 × 6000 and the digits (216000) are a permutation of the original number, the two factors 21 and 6000 do not have the correct number of digits. Furthermore, although 126000 = 210 × 600, both factors 210 and 600 have trailing zeroes.
Vampire numbers also exist for bases other than base 10. For example, a vampire number in base 12 is 10392BA45768 = 105628 × BA3974, where A means ten and B means eleven. Another example in the same base is a vampire number with three fangs, 572164B9A830 = 8752 × 9346 × A0B1. An example with four fangs is 3715A6B89420 = 763 × 824 × 905 × B1A. In these examples, all 12 digits are used exactly once.