login
Vampire numbers in base 12 (definition 2): decimal values of base-12 integers n for which there exist fangs x and y, where x and y have the same number of base-12 digits, x * y = n, the concatenation of the base-12 digits of x and y is a permutation of the base-12 digits of n, and not both x and y end in 0 (base 12).
3

%I #58 Jun 16 2026 22:09:24

%S 2100,2220,2352,2628,2910,3052,3200,5550,6264,8062,252257,253071,

%T 253164,254604,256188,257955,259500,259522,262884,264588,265005,

%U 267168,274455,275237,275880,277920,281060,281203,281232,281418,281554,283745,286006,286649,287375

%N Vampire numbers in base 12 (definition 2): decimal values of base-12 integers n for which there exist fangs x and y, where x and y have the same number of base-12 digits, x * y = n, the concatenation of the base-12 digits of x and y is a permutation of the base-12 digits of n, and not both x and y end in 0 (base 12).

%D Clifford A. Pickover, Keys to Infinity, Wiley, NY, 1995, Chap. 30, "Vampire Numbers", pp. 233-238

%H Lars Verhaevert, <a href="/A392325/b392325.txt">Table of n, a(n) for n = 1..10000</a>

%H Lars Verhaevert, <a href="https://github.com/Lars-Ve/Vampire-Numbers-in-base-12">GitHub: Vampire Numbers in base 12 (unsorted outputs, sorted outputs, source codes)</a>

%e 2100 is a term since 1270_12 = 21_12 * 70_12 = 25 * 84 = 2100.

%e 2220 is a term since 1350_12 = 31_12 * 50_12 = 37 * 60 = 2220.

%e 2352 is a term since 1440_12 = 40_12 * 41_12 = 48 * 49 = 2352.

%e 2628 is a term since 1630_12 = 30_12 * 61_12 = 36 * 73 = 2628.

%e 3200 is a term since 1A28_12 = 21_12 * A8_12 = 25 * 128 = 3200.

%e 35883660 is a term since 10026010_12 = 2001_12 * 6010_12 = 3457 * 10380 = 35883660.

%e 35900940 is a term since 10034010_12 = 3001_12 * 4010_12 = 5185 * 6924 = 35900940.

%e 35919948 is a term since 10043010_12 = 3010_12 * 4001_12 = 5196 * 6913 = 35919948.

%o (C++) // See GitHub link

%o (PARI) is(n, b)=my(v=digits(n, b)); if(#v%2, return(0)); fordiv(n, d, if(#digits(d,b)==#v/2 && #digits(n/d,b)==#v/2 && vecsort(v)==vecsort(concat(digits(d,b), digits(n/d,b))) && (d%b || (n/d)%b), return(1))); 0; \\ _Michel Marcus_, Jun 12 2026

%o (Python)

%o from gmpy2 import digits

%o from sympy import divisors

%o def ok(n, base=12):

%o s = "".join(sorted(digits(n, base)))

%o if len(s)&1: return False

%o divs, L, U = divisors(n), base**((len(s)//2)-1), base**(len(s)//2)

%o for i in range((len(divs)+1)//2+1):

%o x, y = divs[i], divs[-1-i]

%o if L <= x < U and L <= y < U and (x%base or y%base):

%o t, u = digits(x, base), digits(y, base)

%o if "".join(sorted(t+u)) == s:

%o return True # use return (n, s, t, u) or similar for verbose output

%o return False

%o print([k for k in range(300_000) if ok(k)]) # _Michael S. Branicky_, Jun 12 2026

%Y Cf. A014575 (vampire numbers in base 10).

%K nonn,base

%O 1,1

%A _Lars Verhaevert_, Jun 07 2026