|
|
|
|
0, 1, 3, 11, 41, 155, 591, 2267, 8735, 33775, 130965, 509015, 1982269, 7732659, 30208749, 118167055, 462760369, 1814091011, 7118044023, 27952660883, 109853552255, 432021606103, 1700093447847, 6694137523051, 26372544576331, 103950885100775, 409928481296331
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n+1) is also the number of sequences of length 2n obeying the regular expression "0^* (1 or 2)^* 3^*" and having sum 3n. For example, a(3)=11 because of the sequences 0033, 0123, 0213, 0222, 1113, 1122, 1212, 1221, 2112, 2121, 2211. - Don Knuth, May 11 2016
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(x-sqrt(1-4*x))/(sqrt(1-4*x)*(x^2+4*x-1)).
Recurrence: (n-2)*a(n) = 2*(4*n-9)*a(n-1) - (15*n-38)*a(n-2) - 2*(2*n-5)* a(n-3).
a(n) ~ 4^n/sqrt(Pi*n). (End)
Simpler g.f.: x/sqrt(1-4*x)/(x+sqrt(1-4*x)). - Don Knuth, May 11 2016
|
|
MAPLE
|
with(combinat); seq( add(binomial(2*n-k-1, n-k)*fibonacci(k), k=0..n), n=0..30); # G. C. Greubel, Nov 28 2019
1/(sqrt(1 - 4*x) + 1/x - 4): series(%, x, 27):
|
|
MATHEMATICA
|
t[n_, k_]:= CoefficientList[ Series[x/(1-x-x^2)/(1-x)^k, {x, 0, k}], x][[k+1]]; Array[ t[#, #] &, 20]
Table[Sum[Binomial[2*n-k-1, n-k]*Fibonacci[k], {k, 0, n}], {n, 0, 30}] (* G. C. Greubel, Nov 28 2019 *)
|
|
PROG
|
(Maxima)
(PARI) a(n) = sum(k=1, n, fibonacci(k)*binomial(2*n-k-1, n-k)) \\ Michel Marcus, Mar 17 2016
(Magma) [(&+[Binomial(2*n-k-1, n-k)*Fibonacci(k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Nov 28 2019
(Sage) [sum(binomial(2*n-k-1, n-k)*fibonacci(k) for k in (0..n)) for n in (0..30)] # G. C. Greubel, Nov 28 2019
(GAP) List([0..30], n-> Sum([0..n], k-> Binomial(2*n-k-1, n-k)*Fibonacci(k) )); # G. C. Greubel, Nov 28 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|