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”).

a(n) = T(2*n, n), where T is given by A026519.
21

%I #10 Dec 21 2021 02:34:23

%S 1,1,5,16,65,251,1016,4117,16913,69865,290455,1212905,5085224,

%T 21389824,90226449,381519416,1616684241,6863544233,29187402749,

%U 124305180842,530108333515,2263423401745,9674857844129,41396075156859,177285394355336,759895396193376,3259667597627576,13992851410449865

%N a(n) = T(2*n, n), where T is given by A026519.

%H G. C. Greubel, <a href="/A026525/b026525.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A026519(2*n, n).

%F a(n) = A026536(2*n, n).

%t T[n_, k_]:= T[n, k]= If[k<0 || k>2*n, 0, If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+1)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k], T[n-1, k-1] + T[n-1, k-2] + T[n-1, k] ]]]]; (* T = A026519 *)

%t a[n_] := a[n] = Block[{$RecursionLimit = Infinity}, T[2 n, n] ];

%t Table[a[n], {n, 0, 40}] (* _G. C. Greubel_, Dec 20 2021 *)

%o (Sage)

%o @CachedFunction

%o def T(n,k): # T = A026519

%o if (k<0 or k>2*n): return 0

%o elif (k==0 or k==2*n): return 1

%o elif (k==1 or k==2*n-1): return (n+1)//2

%o elif (n%2==0): return T(n-1, k) + T(n-1, k-2)

%o else: return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)

%o [T(2*n, n) for n in (0..40)] # _G. C. Greubel_, Dec 20 2021

%Y Cf. A026519, A026520, A026521, A026522, A026523, A026524, A026526, A026527, A026528, A026529, A026530, A026531, A026533, A026534, A027262, A027263, A027264, A027265, A027266.

%Y Cf. A026536.

%K nonn

%O 0,3

%A _Clark Kimberling_

%E Terms a(20) onward added by _G. C. Greubel_, Dec 20 2021