Vampire number


In number theory, a vampire number is a composite natural 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 and not both with trailing zeroes, where the two factors contain precisely all the digits of the original number, in any order, counting multiplicity. The first vampire number is 1260 = 21 × 60.

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.
For example: 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 are a permutation of the digits of the original number. However, 126000 is not, as 21 and 6000 do not have the correct number of digits, and both 210 and 600 have trailing zeroes. Similarly, 1023 is not, because although 1023 contains all the digits of 31 and 33, the four digits of the pair is not a permutation of the digits of the original number.
Vampire numbers were first described in a 1994 post by Clifford A. Pickover to the Usenet group sci.math, and the article he later wrote was published in chapter 30 of his book Keys to Infinity.

Examples

The vampire numbers are:
1260, 1395, 1435, 1530, 1827, 2187, 6880, 102510, 104260, 105210, 105264, 105750, 108135, 110758, 115672, 116725, 117067, 118440, 120600, 123354, 124483, 125248, 125433, 125460, 125500,...
There are many known sequences of infinitely many vampire numbers following a pattern, such as:

Multiple fang pairs

A vampire number can have multiple distinct pairs of fangs. The first of infinitely many vampire numbers with 2 pairs of fangs:
The first with 3 pairs of fangs:
The first with 4 pairs of fangs:
The first with 5 pairs of fangs:

Variants

Pseudovampire numbers are similar to vampire numbers, except that the fangs of an n-digit pseudovampire number need not be of length n/2 digits. Pseudovampire numbers can have an odd number of digits, for example 126 = 6×21.
More generally, you can allow more than two fangs. In this case, vampire numbers are numbers n which can be factorized using the digits of n. For example, 1395 = 5×9×31. This sequence starts :
A prime vampire number, as defined by Carlos Rivera in 2002, is a true vampire number whose fangs are its prime factors. The first few prime vampire numbers are:
the largest known is the square 2, found by Jens K. Andersen in 2002.
A double vampire number is a vampire number which has fangs that are also vampire numbers, an example of such a number is 1047527295416280 = 25198740 * 41570622 = * which is the lowest double vampire number.
A roman numeral vampire number is roman numerals with the same character, an example of this number is II * IV = VIII.