OFFSET
1,2
MATHEMATICA
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
PROG
(Python)
from sympy import divisors
def sod(n): return sum(map(int, str(n)))
def ok(n):
s = set()
for d in divisors(n, generator=True):
sd = sod(d)
if sd in s: return False
s.add(sd)
return True
print([k for k in range(1, 98) if ok(k)]) # Michael S. Branicky, Dec 15 2022
(PARI) isok(k) = my(d=divisors(k)); #Set(apply(sumdigits, d)) == #d; \\ Michel Marcus, Dec 19 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Dec 15 2022
STATUS
approved