The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A093653 Total number of 1's in binary expansion of all divisors of n. 34
 1, 2, 3, 3, 3, 6, 4, 4, 5, 6, 4, 9, 4, 8, 9, 5, 3, 10, 4, 9, 9, 8, 5, 12, 6, 8, 9, 12, 5, 18, 6, 6, 8, 6, 9, 15, 4, 8, 10, 12, 4, 18, 5, 12, 15, 10, 6, 15, 7, 12, 9, 12, 5, 18, 11, 16, 10, 10, 6, 27, 6, 12, 17, 7, 8, 16, 4, 9, 10, 18, 5, 20, 4, 8, 16, 12, 11, 20, 6, 15, 12, 8, 5, 27, 9, 10, 12 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Antti Karttunen, Table of n, a(n) for n = 1..16384 (first 500 terms from Jaroslav Krizek) Maxwell Schneider and Robert Schneider, Digit sums and generating functions, arXiv:1807.06710 [math.NT], 2018. See (22) p. 6. Index entries for sequences related to binary expansion of n FORMULA a(n) = Sum_{k = 0..n} if(mod(n, k) = 0, A000120(k), 0). - Paul Barry, Jan 14 2005 a(n) = A182627(n) - A226590(n). - Jaroslav Krizek, Sep 01 2013 a(n) = A292257(n) + A000120(n). - Antti Karttunen, Dec 14 2017 From Bernard Schott, May 16 2022: (Start) If prime p = A000043(n), then a(2^p-1) = a(A000668(n)) = p+1 = A050475(n). a(2^n) = n+1 (End) EXAMPLE a(8) = 4 because the divisors of 8 are [1, 2, 4, 8] and in binary: 1, 10, 100, 1000, so four 1's. MAPLE a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](n)): seq(a(n), n=1..100); # Alois P. Heinz, May 17 2022 MATHEMATICA Table[Plus@@DigitCount[Divisors[n], 2, 1], {n, 75}] (* Alonso del Arte, Sep 01 2013 *) PROG (PARI) A093653(n) = sumdiv(n, d, hammingweight(d)); \\ Antti Karttunen, Dec 14 2017 (PARI) a(n) = {my(v = valuation(n, 2), n = (n>>v)); sumdiv(n, d, hammingweight(d)) * (v + 1)} \\ David A. Corneth, Feb 15 2023 (Python) from sympy import divisors def a(n): return sum(bin(d).count("1") for d in divisors(n)) print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Apr 20 2022 (Python) from sympy import divisors def A093653(n): return sum(d.bit_count() for d in divisors(n, generator=True)) print([A093653(n) for n in range(1, 88)]) # Michael S. Branicky, Feb 15 2023 CROSSREFS Cf. A000120, A093687, A192895, A292257. Cf. A226590 (number of 0's in binary expansion of all divisors of n). Cf. A182627 (number of digits in binary expansion of all divisors of n). Cf. A034690 (a decimal equivalent). Sequence in context: A087688 A126854 A115206 * A205442 A049982 A245642 Adjacent sequences: A093650 A093651 A093652 * A093654 A093655 A093656 KEYWORD base,easy,nonn AUTHOR Jason Earls, May 16 2004 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 13 14:10 EDT 2024. Contains 375142 sequences. (Running on oeis4.)