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”).

Digits of prime factors of k do not appear in k.
7

%I #29 Sep 08 2022 08:44:52

%S 1,4,6,8,9,10,14,16,18,21,27,34,38,40,44,46,48,49,54,56,57,58,60,64,

%T 66,68,69,76,78,80,81,84,86,87,88,90,96,98,99,100,106,108,111,116,118,

%U 129,134,140,144,146,148,158,160,161,166,168,174,177,180,184,188,189,196

%N Digits of prime factors of k do not appear in k.

%H Michael S. Branicky, <a href="/A035139/b035139.txt">Table of n, a(n) for n = 1..10000</a>

%e 161 = 7 * 23 since {2,3,7} and {1,6} are separate digit sets.

%p q:= n-> (f-> is(map(f, numtheory[factorset](n)) intersect

%p {f(n)}={}))(d-> convert(d, base, 10)[]):

%p select(q, [$1..200])[]; # _Alois P. Heinz_, Oct 11 2021

%t Fac[n_] := Flatten[IntegerDigits[Take[FactorInteger[n],All,1]]]; t={1}; Do[ If[!PrimeQ[n] && Intersection[Fac[n], IntegerDigits[n]] == {}, AppendTo[t,n]], {n,2,196}]; t (* _Jayanta Basu_, May 02 2013 *)

%o (Magma) [k:k in [1..200]| forall{a: a in PrimeDivisors(k)|Set(Intseq(a)) meet Set(Intseq(k)) eq {}}]; // _Marius A. Burtea_, Oct 08 2019

%o (Python)

%o from sympy import factorint

%o def ok(n):

%o return set(str(n)) & set("".join(str(p) for p in factorint(n))) == set()

%o print(list(filter(ok, range(1601)))) # _Michael S. Branicky_, Oct 11 2021

%o (PARI) digsf(n) = my(f=factor(n), list=List()); for (k=1, #f~, my(dk=digits(f[k,1])); for (i=1, f[k,2], for (j=1, #dk, listput(list, dk[j])))); Vec(list);

%o isok(m) = my(df=digsf(m), d=digits(m)); (#setintersect(Set(df), Set(d)) == 0); \\ _Michel Marcus_, Oct 11 2021

%Y Cf. A035140, A035141.

%K nonn,base

%O 1,2

%A _Patrick De Geest_, Nov 15 1998

%E Offset corrected and a(1) added by _Giovanni Resta_, May 02 2013