A385494 Total number of 1's in the decimal digits of the divisors of n.
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
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
PARI
a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
-
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