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!)
A026519 Irregular triangular array T read by rows: T(n, k) = T(n-1, k-2) + T(n-1, k) if (n mod 2) = 0, otherwise T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), with T(n, 0) = T(n, 2*n) = 1, T(n, 1) = T(n, 2*n-1) = floor((n+1)/2). 26
1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 4, 4, 2, 1, 1, 2, 5, 6, 8, 6, 5, 2, 1, 1, 3, 8, 13, 19, 20, 19, 13, 8, 3, 1, 1, 3, 9, 16, 27, 33, 38, 33, 27, 16, 9, 3, 1, 1, 4, 13, 28, 52, 76, 98, 104, 98, 76, 52, 28, 13, 4, 1, 1, 4, 14, 32, 65, 104, 150, 180, 196, 180, 150, 104, 65, 32, 14, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
T(n, k) = number of integer strings s(0)..s(n) such that s(0) = 0, s(n) = n-k, |s(i) - s(i-1)| = 1 if i is even, |s(i) - s(i-1)| <= 1 if i is odd.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..10200 (Rows 0..100, flattened) [Offset changed to 0 by Georg Fischer, Mar 01 2022]
Veronika Irvine, Stephen Melczer, and Frank Ruskey, Vertically constrained Motzkin-like paths inspired by bobbin lace, arXiv:1804.08725 [math.CO], 2018.
FORMULA
T(n, k) = T(n-1, k-2) + T(n-1, k) if (n mod 2) = 0, otherwise T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), with T(n, 0) = T(n, 2*n) = 1, T(n, 1) = T(n, 2*n-1) = floor((n+1)/2).
EXAMPLE
First 5 rows:
1
1 ... 1 ... 1
1 ... 1 ... 2 ... 1 ... 1
1 ... 2 ... 4 ... 4 ... 4 ... 2 ... 1
1 ... 2 ... 5 ... 6 ... 8 ... 6 ... 5 ... 2 ... 1
MATHEMATICA
z = 12; t[n_, 0]:= 1; t[n_, k_]:= 1/; k==2n; t[n_, 1]:= Floor[(n+1)/2]; t[n_, k_] := Floor[(n+1)/2] /; k==2n-1; t[n_, k_]:= t[n, k]= If[EvenQ[n], t[n-1, k-2] + t[n-1, k], t[n-1, k-2] + t[n-1, k-1] + t[n-1, k]];
u = Table[t[n, k], {n, 0, z}, {k, 0, 2n}];
TableForm[u] (* A026519 array *)
Flatten[u] (* A026519 sequence *)
PROG
(Sage)
@CachedFunction
def T(n, k): # T = A026552
if (k==0 or k==2*n): return 1
elif (k==1 or k==2*n-1): return (n+1)//2
elif (n%2==0): return T(n-1, k) + T(n-1, k-2)
else: return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
flatten([[T(n, k) for k in (0..2*n)] for n in (0..12)]) # G. C. Greubel, Dec 19 2021
CROSSREFS
Sequence in context: A332648 A272896 A188919 * A025177 A026148 A117211
KEYWORD
nonn,tabf
AUTHOR
EXTENSIONS
Updated by Clark Kimberling, Aug 29 2014
Offset changed to 0 by G. C. Greubel, Dec 19 2021
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 16 05:35 EDT 2024. Contains 371697 sequences. (Running on oeis4.)