login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A289911
Prime vampire numbers: semiprimes x*y such that x and y have the same number of digits and the union of the multisets of the digits of x and y is the same as the multiset of digits of x*y.
1
117067, 124483, 146137, 371893, 536539, 10349527, 10429753, 10687513, 11722657, 11823997, 12451927, 12484057, 12894547, 13042849, 14145799, 14823463, 17204359, 18517351, 18524749, 18647023, 19262587, 19544341, 19554277, 20540911, 20701957, 21874387, 30189721
OFFSET
1,1
COMMENTS
Subsequence of A014575.
LINKS
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
117067 = 167 * 701. A055642(117067) mod 2 = 0, A055642(167) = A055642(701) and the multiset of digits of 117067 is {0, 1, 1, 6, 7, 7}, which is also the multiset resulting from the union of the multisets of digits of 167 and 701, so 117067 is a term of the sequence.
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