login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157172 Triangle, read by rows, T(n,k,m) = (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1), with m = 2. 2
1, 1, 1, 1, 4, 1, 1, 7, 7, 1, 1, 10, 14, 10, 1, 1, 13, 22, 22, 13, 1, 1, 16, 31, 32, 31, 16, 1, 1, 19, 41, 35, 35, 41, 19, 1, 1, 22, 52, 26, -10, 26, 52, 22, 1, 1, 25, 64, 0, -154, -154, 0, 64, 25, 1, 1, 28, 77, -48, -462, -728, -462, -48, 77, 28, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

Row sums are: {1, 2, 6, 16, 36, 72, 128, 192, 192, -128, -1536, ...}.

LINKS

G. C. Greubel, Rows n = 0..100 of triangle, flattened

FORMULA

T(n,k,m) = (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1), with m = 2.

EXAMPLE

Triangle begins as:

  1;

  1,  1;

  1,  4,  1;

  1,  7,  7,   1;

  1, 10, 14,  10,    1;

  1, 13, 22,  22,   13,    1;

  1, 16, 31,  32,   31,   16,    1;

  1, 19, 41,  35,   35,   41,   19,   1;

  1, 22, 52,  26,  -10,   26,   52,  22,  1;

  1, 25, 64,   0, -154, -154,    0,  64, 25,  1;

  1, 28, 77, -48, -462, -728, -462, -48, 77, 28, 1;

MAPLE

T:= proc(n, k, m) option remember;

      if k=0 and n=0 then 1

    else (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1)

      fi; end:

seq(seq(T(n, k, 2), k=0..n), n=0..10); # G. C. Greubel, Nov 29 2019

MATHEMATICA

T[n_, k_, m_]:= If[n==0 && k==0, 1, (m*(n-k)+1)*Binomial[n-1, k-1] + (m*k+1)*Binomial[n-1, k] +-m*k*(n-k)*Binomial[n-2, k-1]]; Table[T[n, k, 2], {n, 0, 10}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Nov 29 2019 *)

PROG

(PARI) T(n, k, m) = (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1); \\ G. C. Greubel, Nov 29 2019

(MAGMA) m:=2; [(m*(n-k)+1)*Binomial(n-1, k-1) + (m*k+1)* Binomial(n-1, k) - m*k*(n-k)*Binomial(n-2, k-1): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 29 2019

(Sage) m=2; [[(m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1) for k in (0..n)] for n in [0..10]] # G. C. Greubel, Nov 29 2019

(GAP) m:=2;; Flat(List([0..10], n-> List([0..n], k-> (m*(n-k)+1)*Binomial(n-1, k-1) + (m*k+1)* Binomial(n-1, k) - m*k*(n-k)*Binomial(n-2, k-1) ))); # G. C. Greubel, Nov 29 2019

CROSSREFS

Cf. this sequence (m=2), A157174 (m=3).

Sequence in context: A146880 A152236 A296180 * A131060 A124376 A047671

Adjacent sequences:  A157169 A157170 A157171 * A157173 A157174 A157175

KEYWORD

tabl,sign

AUTHOR

Roger L. Bagula and Gary W. Adamson, Feb 24 2009

EXTENSIONS

Edited by G. C. Greubel, Nov 29 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 29 10:34 EST 2020. Contains 331337 sequences. (Running on oeis4.)