login
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

%I #43 Mar 01 2022 09:53:29

%S 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,

%T 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,

%U 76,52,28,13,4,1,1,4,14,32,65,104,150,180,196,180,150,104,65,32,14,4,1

%N 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).

%C 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.

%H Clark Kimberling, <a href="/A026519/b026519.txt">Table of n, a(n) for n = 0..10200</a> (Rows 0..100, flattened) [Offset changed to 0 by _Georg Fischer_, Mar 01 2022]

%H Veronika Irvine, <a href="http://hdl.handle.net/1828/7495">Lace Tessellations: A mathematical model for bobbin lace and an exhaustive combinatorial search for patterns</a>, PhD Dissertation, University of Victoria, 2016.

%H Veronika Irvine, Stephen Melczer, and Frank Ruskey, <a href="https://arxiv.org/abs/1804.08725">Vertically constrained Motzkin-like paths inspired by bobbin lace</a>, arXiv:1804.08725 [math.CO], 2018.

%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>

%F 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).

%e First 5 rows:

%e 1

%e 1 ... 1 ... 1

%e 1 ... 1 ... 2 ... 1 ... 1

%e 1 ... 2 ... 4 ... 4 ... 4 ... 2 ... 1

%e 1 ... 2 ... 5 ... 6 ... 8 ... 6 ... 5 ... 2 ... 1

%t 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]];

%t u = Table[t[n, k], {n, 0, z}, {k, 0, 2n}];

%t TableForm[u] (* A026519 array *)

%t Flatten[u] (* A026519 sequence *)

%o (Sage)

%o @CachedFunction

%o def T(n,k): # T = A026552

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

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

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

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

%o flatten([[T(n,k) for k in (0..2*n)] for n in (0..12)]) # _G. C. Greubel_, Dec 19 2021

%Y Cf. A026552, A026536, A026568, A026584, A027926.

%Y Cf. A026520, A026521, A026522, A026523, A026524, A026525, A026526, A026527, A026528, A026529, A026530, A026531, A026533, A026534, A027262, A027263, A027264, A027265, A027266.

%K nonn,tabf

%O 0,7

%A _Clark Kimberling_

%E Updated by _Clark Kimberling_, Aug 29 2014

%E Offset changed to 0 by _G. C. Greubel_, Dec 19 2021