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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A026703 Triangular array T read by rows: T(n,1) = T(n,n) = 1, T(n,k) = T(n-1, k-1) + T(n-2,k-1) + T(n-1,k) if k=(n/2) or k=((n+1)/2), otherwise T(n,k) = T(n-1,k-1) + T(n-1,k). 16
 1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 6, 13, 6, 1, 1, 7, 24, 24, 7, 1, 1, 8, 31, 61, 31, 8, 1, 1, 9, 39, 116, 116, 39, 9, 1, 1, 10, 48, 155, 293, 155, 48, 10, 1, 1, 11, 58, 203, 564, 564, 203, 58, 11, 1, 1, 12, 69, 261, 767, 1421, 767, 261, 69, 12, 1 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 LINKS G. C. Greubel, Rows n = 1..100 of triangle, flattened 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|<=1. EXAMPLE Triangle begins: 1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 6, 13, 6, 1, 1, 7, 24, 24, 7, 1, 1, 8, 31, 61, 31, 8, 1, 1, 9, 39, 116, 116, 39, 9, 1, ... MATHEMATICA T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, If[k==n/2 || k==(n+1)/2 || k== (n+2)/2, T[n-1, k-1] +T[n-2, k-1] +T[n-1, k], T[n-1, k-1] +T[n-1, k]]]; Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jul 17 2019 *) PROG (PARI) T(n, k) = if(k==1 || k==n, 1, if(k==n/2 || k==(n+1)/2 || k==(n+2)/2 , T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), T(n-1, k-1) + T(n-1, k) )); for(n=1, 12, for(k=1, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Jul 17 2019 (Sage) def T(n, k): if (k==1 or k==n): return 1 elif (k==n/2 or k==(n+1)/2 or k==(n+2)/2): return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k) else: return T(n-1, k-1) + T(n-1, k) [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 17 2019 (GAP) T:= function(n, k) if (k=1 or k=n) then return 1; elif (k=Int(n/2) and k=Int((n+1)/2) or k=Int((n+2)/2)) then return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k); else return T(n-1, k-1) + T(n-1, k); fi; end; Flat(List([1..12], n-> List([1..n], k-> T(n, k) ))); # G. C. Greubel, Jul 17 2019 CROSSREFS Sequence in context: A275421 A243576 A211314 * A122917 A211315 A096583 Adjacent sequences: A026700 A026701 A026702 * A026704 A026705 A026706 KEYWORD nonn,tabl AUTHOR Clark Kimberling 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.

Last modified September 23 02:06 EDT 2023. Contains 365532 sequences. (Running on oeis4.)