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

%I #27 Jan 01 2018 04:12:14

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

%T 75,75,39,10,1,1,11,49,114,150,114,49,11,1,1,13,70,202,339,339,202,70,

%U 13,1,1,14,83,272,541,678,541,272,83,14,1,1,16

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

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

%H Clark Kimberling, <a href="/A026386/b026386.txt">Rows n = 0..100, flattened</a>

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

%e Rows n=0 through n=7:

%e 1

%e 1 ... 1

%e 1 ... 2 ... 1

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

%e 1 ... 5 ... 8 ... 5 ... 1

%e 1 ... 7 ... 17 .. 17 .. 7 ... 1

%e 1 ... 8 ... 24 .. 34 .. 24 .. 8 ... 1

%e 1 ... 10 .. 39 .. 75 .. 75 .. 39 .. 10 ... 1

%p A026386 := proc(n,k)

%p option remember;

%p if k=0 or k = n then

%p 1;

%p elif k <0 or k > n then

%p 0 ;

%p elif type(n,'even') then

%p procname(n-1,k-1)+procname(n-1,k) ;

%p else

%p procname(n-1,k-1)+procname(n-1,k)+procname(n-2,k-1) ;

%p end if;

%p end proc: # _R. J. Mathar_, Feb 10 2015

%t z = 12; t[n_, 0] := 1; t[n_, n_] := 1; t[n_, k_] := t[n, k] =

%t Which[EvenQ[n], t[n - 1, k - 1] + t[n - 1, k], OddQ[n], t[n - 1, k - 1] +

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

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

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

%Y Cf. A007318.

%K nonn,tabl,easy

%O 0,5

%A _Clark Kimberling_

%E Updated by _Clark Kimberling_, Aug 28 2014

%E Offset corrected by _R. J. Mathar_, Feb 10 2015

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 23 13:04 EDT 2024. Contains 371913 sequences. (Running on oeis4.)