|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|