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!)
A146990 Triangle, read by rows, T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + 2^(n-1) * binomial(n-2, k-1) otherwise. 1
1, 1, 1, 1, 4, 1, 1, 12, 12, 1, 1, 68, 134, 68, 1, 1, 630, 1885, 1885, 630, 1, 1, 7782, 31119, 46676, 31119, 7782, 1, 1, 117656, 588266, 1176525, 1176525, 588266, 117656, 1, 1, 2097160, 12582940, 31457336, 41943110, 31457336, 12582940, 2097160, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

Row sums are: {1, 2, 6, 26, 272, 5032, 124480, 3764896, 134217984, 5509980800, 256000001024, ...}.

LINKS

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

FORMULA

T(n, k) = binomial(n, k) for n < 2 and binomial(n, k) + n^(n-1) * binomial(n-2, k-1) otherwise.

EXAMPLE

Triangle begins as:

  1;

  1,    1;

  1,    4,     1;

  1,   12,    12,     1;

  1,   68,   134,    68,     1;

  1,  630,  1885,  1885,   630,    1;

  1, 7782, 31119, 46676, 31119, 7782, 1;

MAPLE

seq(seq( `if`(n<2, binomial(n, k), binomial(n, k) + n^(n-1)*binomial(n-2, k-1)), k=0..n), n=0..10); # G. C. Greubel, Jan 09 2020

MATHEMATICA

Table[If[n <2, Binomial[n, m], Binomial[n, m] + n^(n - 1)*Binomial[n - 2, m - 1]], {n, 0, 10}, {m, 0, n}]; Flatten[%]

PROG

(PARI) T(n, k) = if(n<2, binomial(n, k), binomial(n, k) + n^(n-1)*binomial(n-2, k-1) ); \\ G. C. Greubel, Jan 09 2020

(MAGMA) T:= func< n, k | n lt 2 select Binomial(n, k) else Binomial(n, k) + n^(n-1)*Binomial(n-2, k-1) >;

[T(n, k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jan 09 2020

(Sage)

@CachedFunction

def T(n, k):

    if (n<2): return binomial(n, k)

    else: return binomial(n, k) + n^(n-1)*binomial(n-2, k-1)

[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jan 09 2020

(GAP)

T:= function(n, k)

    if n<2 then return Binomial(n, k);

    else return Binomial(n, k) + n^(n-1)*Binomial(n-2, k-1);

    fi; end;

Flat(List([0..10], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Jan 09 2020

CROSSREFS

Cf. A028262.

Sequence in context: A072590 A111636 A220688 * A051433 A163366 A181145

Adjacent sequences:  A146987 A146988 A146989 * A146991 A146992 A146993

KEYWORD

nonn,tabl

AUTHOR

Roger L. Bagula, Nov 04 2008

EXTENSIONS

Edited by G. C. Greubel, Jan 09 2020

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 September 20 17:04 EDT 2020. Contains 337265 sequences. (Running on oeis4.)