This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A026725 Triangular array, T, read by rows: T(n,0) = T(n,n) = 1, for n >= 2 and 1<=k<=n-1, T(n,k) = T(n-1,k-1) + T(n-2,k-1) + T(n-1,k) if n is even and k=n/2, otherwise T(n,k) = T(n-1,k-1) + T(n-1,k). 26

%I

%S 1,1,1,1,2,1,1,4,3,1,1,5,7,4,1,1,6,16,11,5,1,1,7,22,27,16,6,1,1,8,29,

%T 65,43,22,7,1,1,9,37,94,108,65,29,8,1,1,10,46,131,267,173,94,37,9,1,1,

%U 11,56,177,398,440,267,131,46,10,1,1,12,67,233

%N Triangular array, T, read by rows: T(n,0) = T(n,n) = 1, for n >= 2 and 1<=k<=n-1, T(n,k) = T(n-1,k-1) + T(n-2,k-1) + T(n-1,k) if n is even and k=n/2, otherwise T(n,k) = T(n-1,k-1) + T(n-1,k).

%C T(n+2,n) = A134869(n+1). - _Philippe Deléham_, Feb 01 2014

%H G. C. Greubel, <a href="/A026725/b026725.txt">Rows n = 1..100 of triangle, flattened</a>

%H Rob Arthan, <a href="/A026674/a026674.txt">Comments on A026674, A026725, A026670</a>

%F T(n, k) = number of paths from (0, 0) to (n-k, k) in directed graph having vertices (i, j) and edges (i, j)-to-(i+1, j) and (i, j)-to-(i, j+1) for i, j >= 0 and edges (i, i+1)-to-(i+1, i+2) for i >= 0.

%F Comment from _Rick L. Shepherd_, Aug 05 2002: Probably this should be changed to "and edges (i+1, i)-to-(i+2, i+1) for i >= 0."

%e Triangle begins:

%e 1

%e 1 1

%e 1 2 1

%e 1 4 3 1

%e 1 5 7 4 1

%e 1 6 16 11 5 1

%e 1 7 22 27 16 6 1

%e 1 8 29 65 43 22 7 1

%e 1 9 37 94 108 65 29 8 1

%e 1 10 46 131 267 173 94 37 9 1

%e 1 11 56 177 398 440 267 131 46 10 1

%e 1 12 67 233 575 1105 707 398 177 56 11 1

%e ... - _Philippe Deléham_, Feb 01 2014

%t T[n_, k_]:= T[n, k] = If[k==1 || k==n, 1, If[EvenQ[n] && k==n/2, T[n-1, k -1] + T[n-2, k-1] + T[n-1, k], T[n-1, k-1] + T[n-1, k]]];

%t Table[T[n, k], {n, 15}, {k, n}]//Flatten (* _G. C. Greubel_, Jul 16 2019 *)

%o (PARI) T(n,k) = if(k==n || k==1, 1, if((n%2)==0 && k==n/2, T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), T(n-1, k-1) + T(n-1, k) ));

%o for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, Jul 16 2019

%o (Sage)

%o def T(n, k):

%o if (k==1 or k==n): return 1

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

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

%o [[T(n, k) for k in (1..n)] for n in (1..15)] # _G. C. Greubel_, Jul 16 2019

%o (GAP)

%o T:= function(n,k)

%o if k=1 or k=n then return 1;

%o elif (n mod 2)=0 and k=Int(n/2) then return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k);

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

%o fi;

%o end;

%o Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # _G. C. Greubel_, Jul 16 2019

%Y Cf. A026674.

%K nonn,tabl

%O 1,5

%A _Clark Kimberling_

%E Title corrected by _G. C. Greubel_, Jul 16 2019

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

Last modified October 17 04:09 EDT 2019. Contains 328106 sequences. (Running on oeis4.)