cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A176670 Composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

This page as a plain text file.
%I A176670 #55 Feb 16 2025 08:33:12
%S A176670 1111,1255,12955,17482,25105,28174,51295,81229,91365,100255,101299,
%T A176670 105295,107329,110191,110317,117067,124483,127417,129595,132565,
%U A176670 137281,145273,146137,149782,163797,171735,174082,174298,174793,174982,193117,208174,210181,217894
%N A176670 Composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.
%C A176670 Subsequence of A006753 (Smith numbers).
%C A176670 These numbers still need a better name. - _Ely Golden_, Dec 25 2016
%C A176670 Terms of this sequence never have more zero digits than their prime factors. - _Ely Golden_, Jan 10 2017
%H A176670 Ely Golden, <a href="/A176670/b176670.txt">Table of n, a(n) for n = 1..10000</a> [Terms 1 through 2113 were computed by Paul Weisenhorn; and terms 2114 to 10000 by Ely Golden, Nov 30 2016]
%H A176670 Ely Golden, <a href="/A176670/a176670_1.sagews.txt">Smith number sequence generator optimized for A176670</a>
%H A176670 Ely Golden, <a href="/A280827/a280827.txt">Proof that A280827(n)>=0 for all n>1</a>
%H A176670 Eric W. Weisstein, <a href="https://mathworld.wolfram.com/SmithNumber.html">Smith Number</a>
%e A176670 n = 25105 = 5*5021; both n and the factorization of n have digits 1, 2, 5, 5; sorted and excluding zeros.
%e A176670 n = 110191 = 101*1091; both n and the factorization of n have digits 1, 1, 1, 1, 9; sorted and excluding zeros.
%e A176670 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.
%t A176670 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]
%t A176670 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 *)
%o A176670 (Python)
%o A176670 from sympy import factorint, flatten
%o A176670 def sd(n): return sorted(str(n).replace('0', ''))
%o A176670 def ok(n):
%o A176670   f = factorint(n)
%o A176670   return sum(f[p] for p in f) > 1 and sd(n) == sorted(flatten(sd(p)*f[p] for p in f))
%o A176670 print(list(filter(ok, range(220000)))) # _Michael S. Branicky_, Apr 22 2021
%Y A176670 Cf. A006753.
%K A176670 nonn,base
%O A176670 1,1
%A A176670 _Paul Weisenhorn_, Apr 23 2010