|
|
A339915
|
|
Number of divisors of n with the same number of decimal digits as n.
|
|
0
|
|
|
1, 2, 2, 3, 2, 4, 2, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, 1, 3, 2, 3, 1, 3, 2, 3, 2, 2, 1, 6, 1, 2, 2, 3, 2, 4, 1, 3, 2, 4, 1, 5, 1, 2, 3, 3, 2, 4, 1, 5, 2, 2, 1, 6, 2, 2, 2, 4, 1, 6, 2, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|