Vampire number
In recreational mathematics, 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, 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.
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, and the article he later wrote was published in chapter 30 of his book Keys to Infinity.
Examples
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 a vampire number, since although 126000 = 21 × 6000 and the digits 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.
The first few vampire numbers are:
The sequence of vampire numbers is:
There are many known sequences of infinitely many vampire numbers following a pattern, such as:
Al Sweigart calculated all the vampire numbers that have at most 10 digits.
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: