login
A176670
Composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.
12
1111, 1255, 12955, 17482, 25105, 28174, 51295, 81229, 91365, 100255, 101299, 105295, 107329, 110191, 110317, 117067, 124483, 127417, 129595, 132565, 137281, 145273, 146137, 149782, 163797, 171735, 174082, 174298, 174793, 174982, 193117, 208174, 210181, 217894
OFFSET
1,1
COMMENTS
Subsequence of A006753 (Smith numbers).
These numbers still need a better name. - Ely Golden, Dec 25 2016
Terms of this sequence never have more zero digits than their prime factors. - Ely Golden, Jan 10 2017
LINKS
Ely Golden, Table of n, a(n) for n = 1..10000 [Terms 1 through 2113 were computed by Paul Weisenhorn; and terms 2114 to 10000 by Ely Golden, Nov 30 2016]
Eric W. Weisstein, Smith Number
EXAMPLE
n = 25105 = 5*5021; both n and the factorization of n have digits 1, 2, 5, 5; sorted and excluding zeros.
n = 110191 = 101*1091; both n and the factorization of n have digits 1, 1, 1, 1, 9; sorted and excluding zeros.
n = 171735 = 3*5*107*107; both n and the factorization of n have digits 1, 1, 3, 5, 7, 7; sorted and excluding zeros.
MATHEMATICA
fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, s = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ s[[1]] == 0, s = Drop[s, 1]]; n > 1 && ! PrimeQ@ n && s == id]; Select[ Range@ 200000, fQ]
Select[Range[2*10^5], Function[n, And[CompositeQ@ n, Sort@ DeleteCases[#, 0] &@ IntegerDigits@ n == Sort@ DeleteCases[#, 0] &@ Flatten@ Map[IntegerDigits@ ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)
PROG
(Python)
from sympy import factorint, flatten
def sd(n): return sorted(str(n).replace('0', ''))
def ok(n):
f = factorint(n)
return sum(f[p] for p in f) > 1 and sd(n) == sorted(flatten(sd(p)*f[p] for p in f))
print(list(filter(ok, range(220000)))) # Michael S. Branicky, Apr 22 2021
CROSSREFS
Cf. A006753.
Sequence in context: A343038 A359098 A218042 * A072434 A033285 A085109
KEYWORD
nonn,base
AUTHOR
Paul Weisenhorn, Apr 23 2010
STATUS
approved