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!)
A026386 Triangular array T read by rows: T(n,0) = T(n,n) = 1 for all n >= 0; T(n,k) = T(n-1,k-1) + T(n-1,k) for even n and k = 1..n-1; T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-2,k-1) for odd n and k = 1 ..n-1. 17
1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 5, 8, 5, 1, 1, 7, 17, 17, 7, 1, 1, 8, 24, 34, 24, 8, 1, 1, 10, 39, 75, 75, 39, 10, 1, 1, 11, 49, 114, 150, 114, 49, 11, 1, 1, 13, 70, 202, 339, 339, 202, 70, 13, 1, 1, 14, 83, 272, 541, 678, 541, 272, 83, 14, 1, 1, 16 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
T(n, k) = number of integer strings s(0)..s(n) such that s(0) = 0, s(n) = n - 2k, where, for u = 1..n, s(i) is odd if i is odd and |s(i)-s(i-1)| <=1.
LINKS
Clark Kimberling, Rows n = 0..100, flattened
EXAMPLE
Rows n=0 through n=7:
1
1 ... 1
1 ... 2 ... 1
1 ... 4 ... 4 ... 1
1 ... 5 ... 8 ... 5 ... 1
1 ... 7 ... 17 .. 17 .. 7 ... 1
1 ... 8 ... 24 .. 34 .. 24 .. 8 ... 1
1 ... 10 .. 39 .. 75 .. 75 .. 39 .. 10 ... 1
MAPLE
A026386 := proc(n, k)
option remember;
if k=0 or k = n then
1;
elif k <0 or k > n then
0 ;
elif type(n, 'even') then
procname(n-1, k-1)+procname(n-1, k) ;
else
procname(n-1, k-1)+procname(n-1, k)+procname(n-2, k-1) ;
end if;
end proc: # R. J. Mathar, Feb 10 2015
MATHEMATICA
z = 12; t[n_, 0] := 1; t[n_, n_] := 1; t[n_, k_] := t[n, k] =
Which[EvenQ[n], t[n - 1, k - 1] + t[n - 1, k], OddQ[n], t[n - 1, k - 1] +
t[n - 1, k] + t[n - 2, k - 1]]; u = Table[t[n, k], {n, 0, z}, {k, 0, n}];
TableForm[u] (* A026386 array *)
Flatten[u] (* A026386 sequence *)
CROSSREFS
Cf. A007318.
Sequence in context: A156609 A026637 A026659 * A147532 A283796 A156580
KEYWORD
nonn,tabl,easy
AUTHOR
EXTENSIONS
Updated by Clark Kimberling, Aug 28 2014
Offset corrected by R. J. Mathar, Feb 10 2015
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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)