OFFSET
1,1
COMMENTS
Subsequence of A014575.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
Carlos Rivera, Puzzle 199. The Prime-Vampire numbers, The Prime Puzzles & Problems Connection.
G. Villemin's Almanach of Numbers, Nombres Vampires, gives the first 5 terms.
Wikipedia, Vampire number.
EXAMPLE
PROG
(PARI) is_a001637(n) = #Str(n)%2==0
is_a001358(n) = omega(n)==2
samefactorlength(v) = #Str(v[1])==#Str(v[2])
samedigitmultiset(v) = vecsort(concat(digits(v[1]), digits(v[2])))==vecsort(digits(v[1]*v[2]))
is(n) = if(!is_a001637(n) || !is_a001358(n) || (!issquarefree(n) && bigomega(n) > 2), return(0), my(f=factor(n)[, 1]~); if(samefactorlength(f) && samedigitmultiset(f), return(1), return(0)))
(PARI) \\ terms with n digits (if n is odd then returns terms with n + 1 digits).
ndigits(n) = {n-=2; n+=(n%2); my(res=List()); forprime(p=ceil(10^(n/2)), 10^(n/2+1)-1, forprime(q = max(p, ceil(10^(n+1)/p)), 10^(n/2+1)-1, if(Set(vecsort(digits(p*q)) -vecsort(concat(digits(p), digits(q))))==[0], listput(res, p*q)))); listsort(res); res} \\ David A. Corneth, Jul 24 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Jul 15 2017
STATUS
approved