login
a(n) = A136431(n,n).
2

%I #49 Sep 08 2022 08:45:52

%S 0,1,3,11,41,155,591,2267,8735,33775,130965,509015,1982269,7732659,

%T 30208749,118167055,462760369,1814091011,7118044023,27952660883,

%U 109853552255,432021606103,1700093447847,6694137523051,26372544576331,103950885100775,409928481296331

%N a(n) = A136431(n,n).

%C 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

%H Vincenzo Librandi, <a href="/A176085/b176085.txt">Table of n, a(n) for n = 0..300</a>

%F a(n+1) - 4*a(n) = -A081696(n-1).

%F From _Vaclav Kotesovec_, Oct 21 2012: (Start)

%F G.f.: x*(x-sqrt(1-4*x))/(sqrt(1-4*x)*(x^2+4*x-1)).

%F 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).

%F a(n) ~ 4^n/sqrt(Pi*n). (End)

%F a(n) = Sum_{k=1..n} (F(k)*binomial(2*n-k-1,n-k)), where F(k) = A000045(k). - _Vladimir Kruchinin_, Mar 17 2016

%F Simpler g.f.: x/sqrt(1-4*x)/(x+sqrt(1-4*x)). - _Don Knuth_, May 11 2016

%F a(n) = A000045(3*n) - A054441(n). - _Hrishikesh Venkataraman_, May 27 2021

%F a(n) = 4*a(n-1) + a(n-2) - binomial(2*n-4,n-2) for n>=2. - _Hrishikesh Venkataraman_, Jul 02 2021

%p 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

%p 1/(sqrt(1 - 4*x) + 1/x - 4): series(%, x, 27):

%p seq(coeff(%, x, k), k=0..26); # _Peter Luschny_, May 29 2021

%t t[n_, k_]:= CoefficientList[ Series[x/(1-x-x^2)/(1-x)^k, {x,0,k}], x][[k+1]]; Array[ t[#, #] &, 20]

%t Table[Sum[Binomial[2*n-k-1, n-k]*Fibonacci[k], {k,0,n}], {n,0,30}] (* _G. C. Greubel_, Nov 28 2019 *)

%o (Maxima)

%o a(n):=sum(fib(k)*binomial(2*n-k-1,n-k),k,1,n); /* _Vladimir Kruchinin_, Mar 17 2016 */

%o (PARI) a(n) = sum(k=1, n, fibonacci(k)*binomial(2*n-k-1, n-k)) \\ _Michel Marcus_, Mar 17 2016

%o (Magma) [(&+[Binomial(2*n-k-1, n-k)*Fibonacci(k): k in [0..n]]): n in [0..30]]; // _G. C. Greubel_, Nov 28 2019

%o (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

%o (GAP) List([0..30], n-> Sum([0..n], k-> Binomial(2*n-k-1, n-k)*Fibonacci(k) )); # _G. C. Greubel_, Nov 28 2019

%Y Cf. A000045, A054441.

%K nonn,easy

%O 0,3

%A _Paul Curtz_, Apr 08 2010