login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Generalized Catalan Numbers.
5

%I #22 Jul 20 2021 07:00:11

%S 1,1,1,1,1,2,4,8,16,32,65,133,274,568,1184,2481,5223,11042,23434,

%T 49908,106633,228505,490999,1057683,2283701,4941502,10713941,23272929,

%U 50642017,110377543,240944076,526717211,1152996206,2527166334,5545804784,12184053993

%N Generalized Catalan Numbers.

%H Seiichi Manyama, <a href="/A023421/b023421.txt">Table of n, a(n) for n = 0..2795</a>

%F G.f. A(x) satisfies: A(x) = (1 + x^2 * A(x)^2) / (1 - x + x^2 + x^3 + x^4). - _Ilya Gutkovskiy_, Jul 20 2021

%p A023421 := proc(n)

%p option remember;

%p if n = 0 then

%p 1;

%p else

%p procname(n-1)+add(procname(k)*procname(n-2-k), k=3..n-2) ;

%p end if;

%p end proc: # _R. J. Mathar_, May 01 2015

%t a[0]=1; a[n_]:= a[n]=a[n-1] + Sum[a[k]*a[n-2-k], {k,3,n-2}]; Table[a[n], {n,0,30}] (* modified by _G. C. Greubel_, Jan 01 2018 *)

%o (PARI) {a(n) = if(n==0,1, a(n-1) + sum(k=3,n-2, a(k)*a(n-k-2)))};

%o for(n=0,30, print1(a(n), ", ")) \\ _G. C. Greubel_, Jan 01 2018

%Y Cf. A000108, A001006, A004148, A004149, A023422, A023423.

%Y Fourth row of A064645.

%K nonn,easy

%O 0,6

%A _Olivier Gérard_