login
A385494
Total number of 1's in the decimal digits of the divisors of n.
4
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 3, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 1, 1, 3, 1, 2, 3, 2, 1, 2, 3, 2, 2, 1, 1, 4, 2, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 3, 1, 1, 2, 2, 3, 2, 1, 3, 2, 2, 1, 4, 2, 1, 1, 3, 1, 4, 3, 1, 2, 1, 2, 3, 1, 2, 3, 3
OFFSET
1,10
LINKS
EXAMPLE
a(11) = 3 because of the divisors of 11, there is one 1 in 1 and two in 11.
a(60) = 4 because of the divisors of 60, there is one 1 in 1, one in 10, one in 12, one in 15 and none in the other divisors.
MAPLE
f:= proc(n) local d; add(numboccur(1, convert(d, base, 10)), d=numtheory:-divisors(n)) end proc:
map(f, [$1..100]);
MATHEMATICA
a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten, 1]; Array[a, 100] (* Stefano Spezia, Aug 28 2025 *)
PROG
(Python)
from sympy import divisors
def a(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 27 2025
(PARI) a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
CROSSREFS
Sequence in context: A120881 A297930 A031217 * A064131 A368859 A338238
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 27 2025
STATUS
approved