login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026538 a(n) = T(n,n-1), T given by A026536. Also a(n) = number of integer strings s(0), ..., s(n), counted by T, such that s(n) = 1. 2

%I #8 Apr 11 2022 08:59:06

%S 1,1,3,6,13,33,65,180,346,990,1897,5502,10571,30863,59523,174456,

%T 337672,992304,1926650,5673140,11043858,32571858,63548069,187675644,

%U 366849016,1084649644,2123604927,6284986554,12322549765,36501029265

%N a(n) = T(n,n-1), T given by A026536. Also a(n) = number of integer strings s(0), ..., s(n), counted by T, such that s(n) = 1.

%H G. C. Greubel, <a href="/A026538/b026538.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A026536(n, n-1).

%t T[n_, k_]:= T[n, k]= If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[n/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k-1] + T[n-1, k], T[n-1, k-2] + T[n-1, k]] ]]; Table[T[n, n-1], {n, 35}] (* _G. C. Greubel_, Apr 10 2022 *)

%o (SageMath)

%o @CachedFunction

%o def T(n, k): # A026536

%o if k < 0 or n < 0: return 0

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

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

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

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

%o def A026538(n): return T(n,n-1)

%o [A026538(n) for n in (1..35)] # _G. C. Greubel_, Apr 10 2022

%Y Cf. A026536.

%K nonn

%O 1,3

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)