OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
P. R. J. Asveld, Generating all permutations by context-free grammars in Chomsky normal form, Theoretical Computer Science 354 (2006) 118-130.
FORMULA
a(n) = Sum_{k=1..n} t(n, k)*C(k, ceiling(k/2)), where t(n, k) is the n-th row in the Pascal-like triangle of A090349 and C(k, i) is the binomial coefficient.
EXAMPLE
a(4) = 4*C(1,1) + 6*C(2,1) + 0*C(3,2) + 1*C(4,2) = 4 + 12 + 0 + 6 = 22; cf. the example grammar in A090349.
PROG
(PARI) a(n)={my(b=vector(n)); for(i=0, logint(n, 2), b[n>>i]=1; b[((n-1)>>i)+1]=1); sum(k=1, n, b[k]*binomial(n, k)*binomial(k, k\2))} \\ Andrew Howroyd, Feb 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter R. J. Asveld, Jan 30 2004
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Feb 29 2020
STATUS
approved