OFFSET
1,1
REFERENCES
Clifford A. Pickover, Keys to Infinity, Wiley, NY, 1995, Chap. 30, "Vampire Numbers", pp. 233-238
LINKS
Lars Verhaevert, Table of n, a(n) for n = 1..10000
EXAMPLE
2100 is a term since 1270_12 = 21_12 * 70_12 = 25 * 84 = 2100.
2220 is a term since 1350_12 = 31_12 * 50_12 = 37 * 60 = 2220.
2352 is a term since 1440_12 = 40_12 * 41_12 = 48 * 49 = 2352.
2628 is a term since 1630_12 = 30_12 * 61_12 = 36 * 73 = 2628.
3200 is a term since 1A28_12 = 21_12 * A8_12 = 25 * 128 = 3200.
35883660 is a term since 10026010_12 = 2001_12 * 6010_12 = 3457 * 10380 = 35883660.
35900940 is a term since 10034010_12 = 3001_12 * 4010_12 = 5185 * 6924 = 35900940.
35919948 is a term since 10043010_12 = 3010_12 * 4001_12 = 5196 * 6913 = 35919948.
PROG
(C++) // See GitHub link
(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
(Python)
from gmpy2 import digits
from sympy import divisors
def ok(n, base=12):
s = "".join(sorted(digits(n, base)))
if len(s)&1: return False
divs, L, U = divisors(n), base**((len(s)//2)-1), base**(len(s)//2)
for i in range((len(divs)+1)//2+1):
x, y = divs[i], divs[-1-i]
if L <= x < U and L <= y < U and (x%base or y%base):
t, u = digits(x, base), digits(y, base)
if "".join(sorted(t+u)) == s:
return True # use return (n, s, t, u) or similar for verbose output
return False
print([k for k in range(300_000) if ok(k)]) # Michael S. Branicky, Jun 12 2026
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lars Verhaevert, Jun 07 2026
STATUS
approved
