Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Jul 02 2024 02:24:02
%S 1,1,2,4,8,13,26,46,92,166,332,610,1220,2269,4538,8518,17036,32206,
%T 64412,122464,244928,467842,935684,1794196,3588392,6903352,13806704,
%U 26635774,53271548,103020253,206040506,399300166,798600332
%N a(n) = A026637(n, floor(n/2)).
%H G. C. Greubel, <a href="/A026643/b026643.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = (4*a(n-1) + (7*n-9)*a(n-2) + 2*a(n-3) + 4*(n-1)*a(n-4))/(2*(n+1)) with a(0) = a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 8. - _G. C. Greubel_, Jul 01 2024
%t T[n_, k_]:= T[n, k] = If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[(3*n -1)/2], T[n-1,k-1] + T[n-1,k] ]]; (* A026637 *)
%t A026643[n_]:= T[n, Floor[n/2]];
%t Table[A026643[n], {n,0,40}] (* _G. C. Greubel_, Jul 01 2024 *)
%o (Magma) [1] cat [n le 4 select 2^(n-1) else (4*Self(n-1) +(7*n-9)*Self(n-2) +2*Self(n-3) +4*(n-1)*Self(n-4))/(2*(n+1)): n in [1..40]]; // _G. C. Greubel_, Jul 01 2024
%o (SageMath)
%o @CachedFunction
%o def a(n): # a = A026643
%o if n<5: return (1,1,2,4,8)[n]
%o else: return (4*a(n-1) +(7*n-9)*a(n-2) +2*a(n-3) +4*(n-1)*a(n-4))/(2*(n+1))
%o [a(n) for n in range(41)] # _G. C. Greubel_, Jul 01 2024
%Y Cf. A026637, A026638, A026639, A026640, A026641, A026642, A026644.
%Y Cf. A026966, A026967, A026968, A026969, A026970.
%K nonn
%O 0,3
%A _Clark Kimberling_