cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226590 Total number of 0's in binary expansion of all divisors of n.

This page as a plain text file.
%I A226590 #29 Apr 24 2022 06:36:03
%S A226590 0,1,0,3,1,2,0,6,2,4,1,6,1,2,1,10,3,7,2,9,2,4,1,12,3,4,3,6,1,6,0,15,5,
%T A226590 8,4,15,3,6,3,16,3,8,2,9,5,4,1,20,3,9,5,9,2,10,3,12,4,4,1,15,1,2,4,21,
%U A226590 7,14,4,15,5,12,3,26,4,8,6,12,4,10,2,25,7
%N A226590 Total number of 0's in binary expansion of all divisors of n.
%C A226590 Also total number of 0's in binary expansion of concatenation of the binary numbers that are the divisors of n written in base 2 (A182621).
%C A226590 a(n) = 0 iff n = 1 or n is a Mersenne prime (A000668). - _Bernard Schott_, Apr 22 2022
%H A226590 Jaroslav Krizek, <a href="/A226590/b226590.txt">Table of n, a(n) for n = 1..500</a>
%F A226590 a(n) = A182627(n) - A093653(n).
%F A226590 a(2^n) = n*(n+1)/2 = A000217(n). - _Bernard Schott_, Apr 22 2022
%e A226590 a(8) = 6 because the divisors of 8 are [1, 2, 4, 8] and in binary: 1, 10, 100, 1000, so six 0's.
%t A226590 Table[Count[Flatten[IntegerDigits[Divisors[n], 2]], 0], {n, 81}] (* _T. D. Noe_, Sep 04 2013 *)
%o A226590 (Python)
%o A226590 from sympy import divisors
%o A226590 def a(n): return sum(bin(d)[2:].count("0") for d in divisors(n))
%o A226590 print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Apr 20 2022
%o A226590 (PARI) a(n) = sumdiv(n, d, 1+logint(d, 2) - hammingweight(d)); \\ _Michel Marcus_, Apr 24 2022
%Y A226590 Cf. A093653 (number of 1's in binary expansion of all divisors of n).
%Y A226590 Cf. A182627 (number of digits in binary expansion of all divisors of n).
%Y A226590 Cf. A182621 (concatenation of the divisors of n written in base 2).
%Y A226590 Cf. A000217, A000668.
%K A226590 base,nonn
%O A226590 1,4
%A A226590 _Jaroslav Krizek_, Aug 31 2013