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!)
A026714 Triangular array T read by rows: T(n,0)=T(n,n)=1 for n >= 0; 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 k=[ (n-1)/2 ] or k=[ n/2 ] or k=[ (n+2)/2 ], else T(n,k)=T(n-1,k-1)+T(n-1,k). 16
1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 8, 25, 25, 8, 1, 1, 9, 40, 63, 40, 9, 1, 1, 10, 49, 128, 128, 49, 10, 1, 1, 11, 59, 217, 319, 217, 59, 11, 1, 1, 12, 70, 276, 664, 664, 276, 70, 12, 1, 1, 13, 82, 346, 1157, 1647, 1157, 346, 82, 13, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
T(n, k) = number of paths from (0, 0) to (n-k, k) in the 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, j)-to-(i+1, j+1) if |i-j|<=2.
EXAMPLE
1
1 1
1 3 1
1 5 5 1
1 7 13 7 1
1 8 25 25 8 1
1 9 40 63 40 9 1
1 10 49 128 128 49 10 1
1 11 59 217 319 217 59 11 1
1 12 70 276 664 664 276 70 12 1
1 13 82 346 1157 1647 1157 346 82 13 1
1 14 95 428 1503 3468 3468 1503 428 95 14 1
1 15 109 523 1931 6128 8583 6128 1931 523 109 15 1
MAPLE
A026714 := proc(n, k)
option remember;
if n < 0 or k < 0 then
0;
elif n =0 or n= k then
1;
elif k = floor((n-1)/2) or k = floor(n/2) or k = floor(n/2+1) then
procname(n-1, k-1)+procname(n-2, k-1)+procname(n-1, k) ;
else
procname(n-1, k-1)+procname(n-1, k) ;
end if;
end proc: # R. J. Mathar, Oct 21 2019
MATHEMATICA
T[n_, k_] := T[n, k] = Which[n < 0 || k < 0, 0, n == 0 || n == k, 1, k == Floor[(n - 1)/2] || k == Floor[n/2] || k == Floor[n/2 + 1], T[n - 1, k - 1] + T[n - 2, k - 1] + T[n - 1, k], True, T[n - 1, k - 1] + T[n - 1, k]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 23 2020 *)
CROSSREFS
Cf. A026721 (row sums).
Sequence in context: A103450 A128254 A277930 * A008288 A238339 A302997
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved

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 April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)