login
A379152
The binary weights of the odd Catalan numbers.
2
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,3
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.
FORMULA
a(n) = A000120(A038003(n)) = A000120(A000108(2^n-1)).
a(n) = A379151(2^n-1).
MATHEMATICA
a[n_] := DigitCount[CatalanNumber[2^n-1], 2, 1]; Array[a, 23, 0]
PROG
(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
CROSSREFS
Similar sequences: A011373, A079584, A082481, A379151, A379153.
Sequence in context: A071522 A192532 A395989 * A230853 A364666 A160620
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, Dec 17 2024
STATUS
approved