%I #39 Jun 06 2021 09:05:51
%S 0,0,1,0,1,2,2,0,1,2,4,4,2,4,4,0,1,2,4,4,4,8,8,8,2,4,8,8,4,8,8,0,1,2,
%T 4,4,4,8,8,8,4,8,12,16,8,16,16,16,2,4,8,8,8,16,16,16,4,8,16,16,8,16,
%U 16,0,1,2,4,4,4,8,8,8,4,8,12,16,8,16,16,16,4,8,12,16,12,24,24,32,8,16,24,32,16
%N Count of integers x in [0,n] satisfying A000120(x) + A000120(n-x) = A000120(n) + 1.
%C For every solution x, binomial(n,x) is 2 times an odd integer.
%C A generalization: for every solution 0 <= x <= n of the equation A000120(x) + A000120(n-x) = A000120(n) + r, binomial(n,x) is 2^r times an odd integer.
%C Apparently this is also the number of 2's in the n-th row of A034931. - _R. J. Mathar_, Jul 28 2017
%H Alois P. Heinz, <a href="/A163000/b163000.txt">Table of n, a(n) for n = 0..10000</a>
%H Kenneth S. Davis and William A. Webb, <a href="http://www.fq.math.ca/Scanned/29-1/davis.pdf">Pascal's triangle modulo 4</a>, Fib. Quart., 29 (1991), 79-83.
%H Vladimir Shevelev, <a href="http://arXiv.org/abs/0907.3302">Binomial predictors</a>, arXiv:0907.3302 [math.NT], 2009.
%H L. Spiegelhofer and M. Wallner, <a href="https://arxiv.org/abs/1710.10884">Divisibility of binomial coefficients by powers of two</a>, arXiv:1710.10884 [math.NT], 2017.
%F a(n)=0 iff n=2^k-1, k>=0. a(n)=1 iff n=2^k, k>=1.
%F Conjecture: a(n) = A033264(n)* 2^(A000120(n)-1); from [Davis & Webb]. - _R. J. Mathar_, Jul 28 2017
%p A163000 := proc(n) local a,x; a := 0 ; for x from 0 to n do if A000120(x)+A000120(n-x) = A000120(n)+1 then a := a+1; fi; od: a; end:
%p seq(A163000(n),n=0..100) ; # _R. J. Mathar_, Jul 21 2009
%t okQ[x_, n_] := DigitCount[x, 2, 1] + DigitCount[n - x, 2, 1] == DigitCount[n, 2, 1] + 1; a[n_] := Count[Range[0, n], x_ /; okQ[x, n]]; Table[a[n], {n, 0, 92}] (* _Jean-François Alcover_, Jul 13 2017 *)
%o (PARI) a(n) = my(z=hammingweight(n)+1); sum(x=0, n, hammingweight(x) + hammingweight(n-x) == z); \\ _Michel Marcus_, Jun 06 2021
%Y Cf. A000120, A007814.
%Y A001316 and A163577 count binomial coefficients with 2-adic valuation 0 and 2. A275012 gives a measure of complexity of these sequences. - _Eric Rowland_, Mar 15 2017
%K nonn,base
%O 0,6
%A _Vladimir Shevelev_, Jul 20 2009
%E Extended beyond a(22) by _R. J. Mathar_, Jul 21 2009