OFFSET
1,1
COMMENTS
If k is a term, then so are all multiples of k. - Robert Israel, Dec 20 2022
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
24 is a term since it has two pairs of divisors having an equal sum of digits: 3 and 12; 6 and 24.
MAPLE
q:= n-> (s-> is(nops(s)>nops({s[]})))(map(x-> add(i, i=convert(x,
base, 10)), [numtheory[divisors](n)[]])):
select(q, [$1..165])[]; # Alois P. Heinz, Dec 18 2022
MATHEMATICA
a={}; For[k=1, k<=165, k++, If[Length[Intersection[Table[Total[Part[IntegerDigits[Divisors[k]], i]], {i, DivisorSigma[0, k]}]]] < DivisorSigma[0, k], AppendTo[a, k]]]; a
tdesQ[n_]:=AnyTrue[Tally[Total[IntegerDigits[#]]&/@Divisors[n]][[All, 2]], #>1&]; Select[ Range[200], tdesQ] (* Harvey P. Dale, Jan 13 2023 *)
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 True
s.add(sd)
return False
print([k for k in range(166) 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