login
Numbers that do not have two divisors with an equal sum of digits.
2

%I #9 Dec 21 2022 20:22:14

%S 1,2,3,4,5,6,7,8,9,11,13,14,15,16,17,19,23,25,26,28,29,31,32,33,34,35,

%T 37,38,39,41,43,46,47,49,51,53,55,56,57,58,59,61,62,64,65,67,68,69,71,

%U 73,74,75,76,77,78,79,82,83,85,86,87,89,91,92,93,94,95,97

%N Numbers that do not have two divisors with an equal sum of digits.

%t a={}; For[k=1, k<=97, k++, If[Length[Intersection[Table[Total[Part[IntegerDigits[Divisors[k]], i]], {i, DivisorSigma[0, k]}]]] == DivisorSigma[0, k],AppendTo[a, k]]]; a

%o (Python)

%o from sympy import divisors

%o def sod(n): return sum(map(int, str(n)))

%o def ok(n):

%o s = set()

%o for d in divisors(n, generator=True):

%o sd = sod(d)

%o if sd in s: return False

%o s.add(sd)

%o return True

%o print([k for k in range(1, 98) if ok(k)]) # _Michael S. Branicky_, Dec 15 2022

%o (PARI) isok(k) = my(d=divisors(k)); #Set(apply(sumdigits, d)) == #d; \\ _Michel Marcus_, Dec 19 2022

%Y Complement of A359074.

%Y Cf. A000005, A007953, A359077 (proper divisors).

%K nonn,base

%O 1,2

%A _Stefano Spezia_, Dec 15 2022