OFFSET
1,2
FORMULA
a(n) = Sum_{d|n} [floor(log_10(d)) = floor(log_10(n))], where [ ] is the Iverson bracket.
EXAMPLE
a(20) = 2; The only divisors of 20 that have the same number of digits as 20 are 10 and 20, so a(20) = 2.
MATHEMATICA
Table[Sum[KroneckerDelta[Floor[Log10[i]], Floor[Log10[n]]] (1 - Ceiling[n/i] + Floor[n/i]), {i, n}], {n, 100}]
PROG
(PARI) a(n) = sumdiv(n, d, #Str(d) == #Str(n)); \\ Michel Marcus, Dec 22 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Wesley Ivan Hurt, Dec 22 2020
STATUS
approved