OFFSET
0,3
COMMENTS
Scatter plot might be called "Cypress forest on a windy day". - Antti Karttunen, Nov 30 2021
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
J. Abate and W. Whitt, Brownian Motion and the Generalized Catalan Numbers, J. Int. Seq. 14 (2011) # 11.2.6.
FORMULA
a(2n+1) = a(n) for n >= 0.
Sum_{k=0..2^n - 1} a(k) = A000108(n+1) for n >= 0.
a((4^n - 1)/3) = A000108(n) for n >= 0.
a(2^m*(2^n - 1)) = binomial(n + m, n) for n >= 0, m >= 0.
Generalization:
b(2n+1, p, q) = b(n, p, q) for n >= 0.
b(2n, p, q) = p*b(n, p, q) + q*b(n - 2^A007814(n), p, q) = for n > 0 with b(0, p, q) = 1.
Sum_{k=0..2^n - 1} b(k, 2, 1) = A006318(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 2, 2) = A115197(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 1) = A108524(n+1) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 3) = A116867(n) for n >= 0.
b((4^n - 1)/3, p, q) is generalized Catalan number C(p, q; n).
Conjecture: C(p, q; n) = Sum_{k=0..n-1} p^k*q^(n-k-1) Sum_{j=0..k} q^j*A009766(n-2, j) for n > 1 with C(p, q; 0) = C(p, q; 1) = 1.
MATHEMATICA
a[0] = 1; a[n_] := a[n] = If[OddQ[n], a[(n - 1)/2], a[n/2] + a[n/2 - 2^IntegerExponent[n/2, 2]]]; Array[a, 100, 0] (* Amiram Eldar, Sep 06 2021 *)
PROG
(PARI) a(n) = if (n==0, 1, if (n%2, a(n\2), a(n/2) + a(n/2 - 2^valuation(n/2, 2)))); \\ Michel Marcus, Sep 09 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Mikhail Kurkov, Aug 23 2021 [verification needed]
STATUS
approved