A379152 The binary weights of the odd Catalan numbers.
1, 1, 2, 6, 16, 25, 60, 127, 244, 494, 1010, 2015, 4076, 8086, 16281, 32818, 65518, 131059, 262348, 524448, 1047643, 2097675, 4194133, 8386693, 16776916, 33554390, 67114125, 134214652, 268452748
Offset: 0
Links
- Florian Luca and Paul Thomas Young, On the binary expansion of the odd Catalan numbers, Proceedings of the XIVth International Conference on Fibonacci Numbers, Morelia, Mexico, 2010, pp. 185-190; ResearchGate link.
Crossrefs
Programs
-
Mathematica
a[n_] := DigitCount[CatalanNumber[2^n-1], 2, 1]; Array[a, 23, 0]
-
PARI
a(n) = my(m = -1 + 1 << n); hammingweight(binomial(2*m, m)/(m+1));
-
Python
from itertools import count, islice def A379152_gen(): # generator of terms yield from [1,1] c, s = 1, 3 for n in count(2): c = (c*((n<<2)-2))//(n+1) if n == s: yield c.bit_count() s = (s<<1)|1 A379152_list = list(islice(A379152_gen(),10)) # Chai Wah Wu, Dec 17 2024