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.

A163000 Count of integers x in [0,n] satisfying A000120(x) + A000120(n-x) = A000120(n) + 1.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Vladimir Shevelev, Jul 20 2009

Keywords

Comments

For every solution x, binomial(n,x) is 2 times an odd integer.
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.
Apparently this is also the number of 2's in the n-th row of A034931. - R. J. Mathar, Jul 28 2017

Crossrefs

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

Programs

  • Maple
    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:
    seq(A163000(n),n=0..100) ; # R. J. Mathar, Jul 21 2009
  • Mathematica
    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 *)
  • PARI
    a(n) = my(z=hammingweight(n)+1); sum(x=0, n, hammingweight(x) + hammingweight(n-x) == z); \\ Michel Marcus, Jun 06 2021

Formula

a(n)=0 iff n=2^k-1, k>=0. a(n)=1 iff n=2^k, k>=1.
Conjecture: a(n) = A033264(n)* 2^(A000120(n)-1); from [Davis & Webb]. - R. J. Mathar, Jul 28 2017

Extensions

Extended beyond a(22) by R. J. Mathar, Jul 21 2009