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!)
A051631 Triangle formed using Pascal's rule except begin and end n-th row with n-1. 4

%I #31 Oct 27 2023 22:00:44

%S -1,0,0,1,0,1,2,1,1,2,3,3,2,3,3,4,6,5,5,6,4,5,10,11,10,11,10,5,6,15,

%T 21,21,21,21,15,6,7,21,36,42,42,42,36,21,7,8,28,57,78,84,84,78,57,28,

%U 8,9,36,85,135,162,168,162,135,85,36,9

%N Triangle formed using Pascal's rule except begin and end n-th row with n-1.

%C Row sums give A000918(n).

%C Central terms for n>0: T(2*n,n)=A024483(n+1), T(n,[n/2])=A116385(n-1); for n>1: T(n,1) = T(n,n-1) = A000217(n-2). - _Reinhard Zumkeller_, Nov 13 2011

%H Reinhard Zumkeller, <a href="/A051631/b051631.txt">Rows n=0..100 of triangle, flattened</a>

%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) + T(n-1,k-1), 0 < k < n, T(n,0) = T(n,n) = n - 1.

%F T(n,k) = C(n+2,k+1) - 3*C(n,k). - _Charlie Neder_, Jan 10 2019

%e Triangle begins

%e -1;

%e 0, 0;

%e 1, 0, 1;

%e 2, 1, 1, 2;

%e 3, 3, 2, 3, 3;

%e 4, 6, 5, 5, 6, 4; ...

%t Clear[t]; t[n_, k_] := t[n, k] = t[n-1, k] + t[n-1, k-1]; t[n_, 0] := n-1; t[n_, n_] := n-1; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Apr 11 2013 *)

%o (Haskell)

%o a051631 n k = a051631_tabl !! n !! k

%o a051631_row n = a051631_tabl !! n

%o a051631_list = concat a051631_tabl

%o a051631_tabl = iterate (\row -> zipWith (+) ([1] ++ row) (row ++[1])) [-1]

%o -- _Reinhard Zumkeller_, Nov 13 2011

%o (Magma) /* As triangle */ [[Binomial(n+2,k+1) - 3*Binomial(n,k): k in [0..n]]: n in [0.. 10]]; // _Vincenzo Librandi_, Jan 11 2019

%Y Cf. A007318.

%K easy,nice,sign,tabl

%O 0,7

%A _Asher Auel_

%E Definition modified and keyword tabl added by _Reinhard Zumkeller_, Nov 13 2011

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