cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A026386 #31 Dec 27 2024 18:29:31
%S A026386 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 A026386 75,75,39,10,1,1,11,49,114,150,114,49,11,1,1,13,70,202,339,339,202,70,
%U A026386 13,1,1,14,83,272,541,678,541,272,83,14,1,1,16
%N 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.
%C A026386 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 A026386 Clark Kimberling, <a href="/A026386/b026386.txt">Rows n = 0..100, flattened</a>
%H A026386 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A026386 G.f.: (1 + (1 + y)*x - y*x^2)/(1 - (1 + 3*y + y^2)*x^2). - _Andrew Howroyd_, Dec 27 2024
%e A026386 Rows n=0 through n=7:
%e A026386   1
%e A026386   1 ... 1
%e A026386   1 ... 2 ... 1
%e A026386   1 ... 4 ... 4 ... 1
%e A026386   1 ... 5 ... 8 ... 5 ... 1
%e A026386   1 ... 7 ... 17 .. 17 .. 7 ... 1
%e A026386   1 ... 8 ... 24 .. 34 .. 24 .. 8 ... 1
%e A026386   1 ... 10 .. 39 .. 75 .. 75 .. 39 .. 10 ... 1
%p A026386 A026386 := proc(n,k)
%p A026386     option remember;
%p A026386     if k=0 or k = n then
%p A026386         1;
%p A026386     elif k <0 or k > n then
%p A026386         0 ;
%p A026386     elif type(n,'even') then
%p A026386         procname(n-1,k-1)+procname(n-1,k) ;
%p A026386     else
%p A026386         procname(n-1,k-1)+procname(n-1,k)+procname(n-2,k-1) ;
%p A026386     end if;
%p A026386 end proc: # _R. J. Mathar_, Feb 10 2015
%t A026386 z = 12; t[n_, 0] := 1; t[n_, n_] := 1; t[n_, k_] := t[n, k] =
%t A026386 Which[EvenQ[n], t[n - 1, k - 1] + t[n - 1, k], OddQ[n], t[n - 1, k - 1] +
%t A026386 t[n - 1, k] + t[n - 2, k - 1]]; u = Table[t[n, k], {n, 0, z}, {k, 0, n}];
%t A026386 TableForm[u] (* A026386 array *)
%t A026386 Flatten[u]   (* A026386 sequence *)
%o A026386 (PARI) T(n)={[Vecrev(p) | p<-Vec((1 + (1 + y)*x - y*x^2)/(1 - (1 + 3*y + y^2)*x^2) + O(x*x^n))]}
%o A026386 { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ _Andrew Howroyd_, Dec 27 2024
%Y A026386 Cf. A007318.
%K A026386 nonn,tabl,easy
%O A026386 0,5
%A A026386 _Clark Kimberling_
%E A026386 Updated by _Clark Kimberling_, Aug 28 2014
%E A026386 Offset corrected by _R. J. Mathar_, Feb 10 2015