OFFSET
0,4
COMMENTS
Number of Dyck n-paths with all ascent lengths being 1 less than a power of 2. [David Scambler, May 07 2012]
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: A(x) = Series_Reversion{x/[Sum_{n>=0} x^(2^n-1)]}.
MAPLE
b:= proc(x, y, t) option remember; `if`(x<0 or y>x, 0,
`if`(x=0, 1, b(x-1, y+1, true)+`if`(t, add(
b(x-2^j+1, y-2^j+1, false), j=1..ilog2(y+1)), 0)))
end:
a:= n-> b(2*n, 0, true):
seq(a(n), n=0..32); # Alois P. Heinz, Apr 01 2019
MATHEMATICA
f[x_, y_, d_] := f[x, y, d] = If[x < 0 || y < x, 0, If[x == 0 && y == 0, 1, f[x - 1, y, 0] + f[x, y - If[d == 0, 1, 2*d], If[d == 0, 1, 2*d]]]]; Table[f[n, n, 0], {n, 0, 28}] (* David Scambler, May 07 2012 *)
PROG
(PARI) a(n)=polcoeff(serreverse(x/sum(j=0, #binary(n), x^(2^j-1)+ x*O(x^n))), n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Nov 19 2007
STATUS
approved