login
A182627
Total number of digits in binary expansion of all divisors of n.
6
1, 3, 3, 6, 4, 8, 4, 10, 7, 10, 5, 15, 5, 10, 10, 15, 6, 17, 6, 18, 11, 12, 6, 24, 9, 12, 12, 18, 6, 24, 6, 21, 13, 14, 13, 30, 7, 14, 13, 28, 7, 26, 7, 21, 20, 14, 7, 35, 10, 21, 14, 21, 7, 28, 14, 28, 14, 14, 7, 42, 7, 14, 21, 28, 15, 30, 8, 24, 15, 30, 8
OFFSET
1,2
COMMENTS
Also, total number of digits in row n of triangle A182620.
Also, number of digits of A182621(n).
Rows sums of triangle A182628.
From Davide Rotondo, Apr 20 2022: (start)
Can be constructed by writing the sequence of natural numbers with 1 one, 2 twos, 4 threes, 8 fours, ..., where 1,2,4,8,... are consecutive powers of 2; then the same sequence spaced by a zero, then the same sequence spaced by two zeros, and so on. Finally add the values of the columns.
1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5 ...
0 1 0 2 0 2 0 3 0 3 0 3 0 3 0 4 ...
0 0 1 0 0 2 0 0 2 0 0 3 0 0 3 0 ...
0 0 0 1 0 0 0 2 0 0 0 2 0 0 0 3 ...
0 0 0 0 1 0 0 0 0 2 0 0 0 0 2 0 ...
0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 ...
0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 ...
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 ...
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ...
...
----------------------------------------------
Tot. 1 3 3 6 4 8 4 10 7 10 5 15 5 10 10 15 ... (End)
LINKS
FORMULA
a(n) = A093653(n) + A226590(n). - Jaroslav Krizek, Sep 01 2013
a(n) = tau(n) + Sum_{d|n} floor(log_2(d)). - Ridouane Oudra, Dec 11 2020
a(n) = Sum_{i=0..floor(log_2(n))} A135539(n,2^i). - Ridouane Oudra, Sep 19 2022
EXAMPLE
The divisors of 12 are 1, 2, 3, 4, 6, 12. These divisors written in base 2 are 1, 10, 11, 100, 110, 1100. Then a(12)=15 because 1+2+2+3+3+4 = 15.
MATHEMATICA
Table[Total[IntegerLength[Divisors[n], 2]], {n, 60}] (* Harvey P. Dale, Jan 26 2012 *)
PROG
(PARI) a(n) = sumdiv(n, d, 1+logint(d, 2)); \\ Michel Marcus, Dec 11 2020
(Python)
from sympy import divisors
def a(n): return sum(d.bit_length() for d in divisors(n))
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Apr 21 2022
CROSSREFS
Cf. A093653 (number of 1's in binary expansion of all divisors of n).
Cf. A226590 (number of 0's in binary expansion of all divisors of n).
Sequence in context: A144624 A023827 A199153 * A135986 A334848 A284614
KEYWORD
nonn,base,easy
AUTHOR
Omar E. Pol, Nov 23 2010
STATUS
approved