Inmathematics, avampire number(ortrue vampire number) is acompositenatural numberv, with an even number ofdigitsn, that can be factored into twointegersxandyeach withn/2 digits and not both with trailing zeroes, wherevcontains precisely all the digits fromxand fromy, in any order, counting multiplicity.xandyare called thefangs.
For example: 1260 is a vampire number, with 21 and 60 as fangs, since 21 × 60 = 1260. However, 126000 (which can be expressed as 21 × 6000 or 210 × 600) is not, as 21 and 6000 do not have the correct length, and both 210 and 600 have trailing zeroes. Similarly, 1023 (which can be expressed as 31 × 33) is not, as although 1023 contains all the digits of 31 and 33, the list of digits of the factors does not coincide with the list of digits of the original number.