login
a(n) = binomial(2*(n - 1), n - 1) + 1.
7

%I #12 Oct 23 2023 11:25:07

%S 1,2,3,7,21,71,253,925,3433,12871,48621,184757,705433,2704157,

%T 10400601,40116601,155117521,601080391,2333606221,9075135301,

%U 35345263801,137846528821,538257874441,2104098963721,8233430727601,32247603683101,126410606437753,495918532948105

%N a(n) = binomial(2*(n - 1), n - 1) + 1.

%H G. C. Greubel, <a href="/A323230/b323230.txt">Table of n, a(n) for n = 0..500</a>

%F Let G(x) = -1/(x - 1) - I*x/sqrt(4*x - 1) with Im(x) < 0, then a(n) = [x^n] G(x).

%F The generating function G(x) satisfies the differential equation 6*x^2 - 4*x + 1 = (4*x^4 - 9*x^3 + 6*x^2 - x)*diff(G(x), x) - (2*x^3 - 5*x^2 + 4*x - 1)*G(x).

%F a(n) = ((4*n - 6)*a(n - 1) - 3*n + 5)/(n - 1) for n >= 2. - _Peter Luschny_, Aug 02 2019

%F From _G. C. Greubel_, Dec 09 2021: (Start)

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

%F E.g.f.: exp(x) + x*exp(2*x)*(BesselI[0, 2*x] - BesselI[1, 2*x]). (End)

%p aList := proc(len) local gf, ser; assume(Im(x)<0);

%p gf := -1/(x-1) - I*x/sqrt(4*x-1); ser := series(gf, x, len+2):

%p seq(coeff(ser, x, n), n=0..len) end: aList(27);

%p # Alternative:

%p a := proc(n) option remember;

%p if n < 2 then [1, 2][n+1] else ((4*n - 6)*a(n - 1) - 3*n + 5)/(n - 1) fi end:

%p seq(a(n), n=0..27); # _Peter Luschny_, Aug 02 2019

%t Table[Binomial[2(n - 1), n - 1] + 1, {n, 0, 27}]

%o (Magma) [1] cat [1 + n*Catalan(n-1): n in [1..30]]; // _G. C. Greubel_, Dec 09 2021

%o (Sage) [1 + binomial(2*n-2, n-1) for n in (0..30)] # _G. C. Greubel_, Dec 09 2021

%o (PARI) a(n)=binomial(2*n-2, n-1)+1 \\ _Charles R Greathouse IV_, Oct 23 2023

%Y Compare to A244174 which is "missing" the second term 2.

%Y Cf. A000108.

%K nonn,easy

%O 0,2

%A _Peter Luschny_, Feb 12 2019