A080718 1, together with numbers n that are the product of two primes p and q such that the multiset of the digits of n coincides with the multiset of the digits of p and q.
1, 1255, 12955, 17482, 25105, 100255, 101299, 105295, 107329, 117067, 124483, 127417, 129595, 132565, 145273, 146137, 149782, 174082, 174298, 174793, 174982, 250105, 256315, 263155, 295105, 297463, 307183, 325615, 371893, 536539
Offset: 1
Examples
1255 = 5*251, 12955 = 5*2591, 17482 = 2*8741, 100255 = 5*20051, 146137=317*461, etc.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..145 from Robert Israel)
Crossrefs
Programs
-
Maple
filter:= proc(n) local F,p,q,Ln,Lpq; F:= ifactors(n)[2]; if nops(F) > 2 or convert(F,`+`)[2]<>2 then return false fi; p:= F[1][1]; if nops(F) = 2 then q:= F[2][1] else q:= F[1][1] fi; Ln:= sort(convert(n,base,10)); Lpq:= sort([op(convert(p,base,10)),op(convert(q,base,10))]); evalb(Ln = Lpq); end proc: filter(1):= true: A080718:= select(filter,[1, seq(4+9*i,i=1..10^6)]); # Robert Israel, May 04 2014
-
Mathematica
ptpQ[n_]:=Module[{sidn=Sort[IntegerDigits[n]],fi=Transpose[ FactorInteger[ n]]}, fi[[2]]=={1,1}&&Sort[Flatten[ IntegerDigits/@ fi[[1]]]]==sidn]; Join[{1}, Select[Range[4,550000,9],ptpQ]] (* Harvey P. Dale, Jun 22 2014 *)
-
Python
from sympy import factorint from itertools import count, islice def agen(): # generator yield 1 for k in count(4, 9): t = sorted(str(k)) f = factorint(k) if sum(f.values()) == 2: p, q = min(f), max(f) if t == sorted(str(p)+str(q)): yield k print(list(islice(agen(), 30))) # Michael S. Branicky, Apr 20 2025
Extensions
Edited by N. J. A. Sloane, Jan 03 2009
Incorrect entry 163797 removed by Robert Israel, May 04 2014
Comments