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.

Showing 1-10 of 13 results. Next

A223718 Number of unimodal functions [1..n]->[0..2].

Original entry on oeis.org

1, 3, 9, 22, 46, 86, 148, 239, 367, 541, 771, 1068, 1444, 1912, 2486, 3181, 4013, 4999, 6157, 7506, 9066, 10858, 12904, 15227, 17851, 20801, 24103, 27784, 31872, 36396, 41386, 46873, 52889, 59467, 66641, 74446, 82918, 92094, 102012, 112711, 124231
Offset: 0

Views

Author

R. H. Hardin, Mar 26 2013

Keywords

Comments

Column 1 of A223725.

Examples

			Some solutions for n=3
..1....2....0....1....0....2....1....2....0....2....0....1....0....1....0....1
..2....1....1....1....0....0....0....1....0....2....2....1....1....2....2....2
..0....1....0....0....1....0....0....0....2....2....1....1....1....2....0....1
From _Joerg Arndt_, Dec 27 2023: (Start)
The a(3) = 22 such functions are (dots for zeros)
   1:  [ . . . ]
   2:  [ . . 1 ]
   3:  [ . . 2 ]
   4:  [ . 1 . ]
   5:  [ . 1 1 ]
   6:  [ . 1 2 ]
   7:  [ . 2 . ]
   8:  [ . 2 1 ]
   9:  [ . 2 2 ]
  10:  [ 1 . . ]
  11:  [ 1 1 . ]
  12:  [ 1 1 1 ]
  13:  [ 1 1 2 ]
  14:  [ 1 2 . ]
  15:  [ 1 2 1 ]
  16:  [ 1 2 2 ]
  17:  [ 2 . . ]
  18:  [ 2 1 . ]
  19:  [ 2 1 1 ]
  20:  [ 2 2 . ]
  21:  [ 2 2 1 ]
  22:  [ 2 2 2 ]
(End)
		

Crossrefs

Column m=3 of A071920.
Cf. A000124 (unimodal functions [1..n]->[0..1]), A088536 ([1..n] -> [1..n]).

Formula

a(n) = A071920(n,3) = 1+n*(n+1)*(n^2+5*n+18)/24.
G.f.: 1-x*(x^2-3*x+3)*(x^2-x+1) / (x-1)^5 . a(n) = 1+A051744(n). - R. J. Mathar, May 17 2014

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 27 2023

A223659 Number of unimodal maps [1..n]->[0..3].

Original entry on oeis.org

1, 4, 16, 50, 130, 296, 610, 1163, 2083, 3544, 5776, 9076, 13820, 20476, 29618, 41941, 58277, 79612, 107104, 142102, 186166, 241088, 308914, 391967, 492871, 614576, 760384, 933976, 1139440, 1381300, 1664546, 1994665, 2377673, 2820148, 3329264
Offset: 0

Views

Author

R. H. Hardin, Mar 25 2013

Keywords

Comments

Column 1 of A223663.
Apparently also column 4 of A071920. - R. J. Mathar, May 17 2014

Examples

			Some solutions for n=3:
  2  2  0  1  1  3  1  0  3  1  2  1  2  1  0  2
  2  2  1  3  3  3  3  2  2  2  2  3  0  1  1  1
  2  0  2  2  0  1  3  3  1  0  3  1  0  1  1  0
		

Crossrefs

Formula

Empirical: a(n) = (1/720)*n^6 + (1/48)*n^5 + (23/144)*n^4 + (9/16)*n^3 + (241/180)*n^2 + (11/12)*n + 1 = 1 + n*(n+1)*(n^4 + 14*n^3 + 101*n^2 + 304*n + 660)/720.
Empirical g.f.: 1-x*(x^2-2*x+2)*(x^4-4*x^3+6*x^2-4*x+2) / (x-1)^7. - R. J. Mathar, May 14 2014

Extensions

a(0)=1 prepended by Alois P. Heinz, Feb 11 2024

A225010 T(n,k) = number of n X k 0..1 arrays with rows unimodal and columns nondecreasing.

Original entry on oeis.org

2, 4, 3, 7, 9, 4, 11, 22, 16, 5, 16, 46, 50, 25, 6, 22, 86, 130, 95, 36, 7, 29, 148, 296, 295, 161, 49, 8, 37, 239, 610, 791, 581, 252, 64, 9, 46, 367, 1163, 1897, 1792, 1036, 372, 81, 10, 56, 541, 2083, 4166, 4900, 3612, 1716, 525, 100, 11, 67, 771, 3544, 8518, 12174, 11088, 6672, 2685, 715, 121, 12
Offset: 1

Views

Author

R. H. Hardin, Apr 23 2013

Keywords

Comments

Table starts
..2...4...7...11....16.....22.....29......37......46.......56.......67
..3...9..22...46....86....148....239.....367.....541......771.....1068
..4..16..50..130...296....610...1163....2083....3544.....5776.....9076
..5..25..95..295...791...1897...4166....8518...16414....30086....52834
..6..36.161..581..1792...4900..12174...27966...60172...122464...237590
..7..49.252.1036..3612..11088..30738...78354..186142...416394...884236
..8..64.372.1716..6672..22716..69498..194634..505912..1233584..2845492
..9..81.525.2685.11517..43065.144111..439791.1241383..3276559..8157227
.10.100.715.4015.18832..76714.278707..920491.2803658..7963384.21280337
.11.121.946.5786.29458.129844.508937.1808521.5911763.17978389.51325352
From Charles A. Lane, Aug 22 2013: (Start)
The first column is also the coefficients of a in y''[x] - a*x^n*y[x] + b*en*y[x] = 0 where n = 0. The recursion yields coefficients of a, a*b*en, a*b^2*en^2 etc.
The second column is obtained when n=1, the third column when n=2. The final column is for n=10.
Example: Write a normal recursion for n=4. For convenience set x to 1. Running the recursion yields
1-(b en)/2+(b^2 en^2)/24+1/30 (a-(b^3 en^3)/24)+(-384 a b en+b^4 en^4)/40320+(2064 a b^2 en^2-b^5 en^5)/3628800+(120960 a^2-7104 a b^3 en^3+b^6 en^6)/479001600+(-4682880 a^2 b en+18984 a b^4 en^4-b^7 en^7)/87178291200+(54268416 a^2 b^2 en^2-43008 a b^5 en^5+b^8 en^8)/20922789888000.
The coefficient of a is 24, the coefficient of a b en is 384 and the coefficient of a b^2 en^2 is 2064. Dividing by 4! yields a sequence of 1,16,86... , the same as column 5 without the leading 1. There is a hint of unity among the oscillators. (End)

Examples

			Some solutions for n=3 k=4
..0..0..0..0....0..1..0..0....0..0..0..0....1..1..1..1....0..0..0..0
..0..0..0..0....0..1..1..0....0..0..0..0....1..1..1..1....1..1..0..0
..0..0..0..1....1..1..1..0....1..1..0..0....1..1..1..1....1..1..1..1
		

Crossrefs

Column 2 is A000290(n+1).
Column 3 is A002412(n+1).
Column 4 is A006324(n+1).
Row 1 is A000124.
Row 2 is A223718.
Row 3 is A223659.
Cf. A071920, A071921 (larger and reflected versions of table). - Alois P. Heinz, Sep 22 2013

Programs

  • Maple
    T:= (n, k)-> add(binomial(k+2*j-1, 2*j), j=0..n):
    seq(seq(T(n, 1+d-n), n=1..d), d=1..12);  # Alois P. Heinz, Sep 22 2013
  • Mathematica
    T[n_, k_] := Sum[Binomial[k + 2*j - 1, 2*j], {j, 0, n}]; Table[T[n - k + 1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Apr 07 2016, after Alois P. Heinz *)

Formula

Empirical: columns k=1..7 are polynomials of degree k.
Empirical: rows n=1..7 are polynomials of degree 2n.
T(n,k) = Sum_{j=0..n} C(k+2*j-1,2*j). - Alois P. Heinz, Sep 22 2013

A071921 Square array giving number of unimodal functions [n]->[m] for n>=0, m>=0, with a(0,m)=1 by definition, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 9, 7, 1, 0, 1, 5, 16, 22, 11, 1, 0, 1, 6, 25, 50, 46, 16, 1, 0, 1, 7, 36, 95, 130, 86, 22, 1, 0, 1, 8, 49, 161, 295, 296, 148, 29, 1, 0, 1, 9, 64, 252, 581, 791, 610, 239, 37, 1, 0
Offset: 0

Views

Author

Michele Dondi (bik.mido(AT)tiscalinet.it), Jun 14 2002

Keywords

Comments

If one uses a definition of unimodality that involves universal quantifiers on the domain of a function then a(0,m)=1 a priori.

Examples

			Square array a(n,m) begins:
  1, 1,  1,   1,    1,    1,     1,     1,      1, ...
  0, 1,  2,   3,    4,    5,     6,     7,      8, ...
  0, 1,  4,   9,   16,   25,    36,    49,     64, ...
  0, 1,  7,  22,   50,   95,   161,   252,    372, ...
  0, 1, 11,  46,  130,  295,   581,  1036,   1716, ...
  0, 1, 16,  86,  296,  791,  1792,  3612,   6672, ...
  0, 1, 22, 148,  610, 1897,  4900, 11088,  22716, ...
  0, 1, 29, 239, 1163, 4166, 12174, 30738,  69498, ...
  0, 1, 37, 367, 2083, 8518, 27966, 78354, 194634, ...
		

Crossrefs

Main diagonal gives A088536 (for n>=1).

Programs

  • Maple
    a:= (n, m)-> `if`(n=0, 1, add(binomial(n+2*j-1, 2*j), j=0..m-1)):
    seq(seq(a(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, Sep 22 2013
  • Mathematica
    a[0, 0] = 1; a[n_, m_] := Sum[Binomial[2k+n-1, 2k], {k, 0, m-1}]; Table[a[n - m, m], {n, 0, 12}, {m, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 11 2015 *)

Formula

a(n,m) = 1 if n=0, m>=0, a(n,m) = Sum_{k=0..m-1} C(2k+n-1,2k) otherwise.

A223725 T(n,k)=Number of nXk 0..2 arrays with rows, antidiagonals and columns unimodal.

Original entry on oeis.org

3, 9, 9, 22, 81, 22, 46, 484, 484, 46, 86, 2116, 5883, 2116, 86, 148, 7396, 46613, 46613, 7396, 148, 239, 21904, 273562, 608855, 273562, 21904, 239, 367, 57121, 1285547, 5537147, 5537147, 1285547, 57121, 367, 541, 134689, 5087912, 38566854, 74140718
Offset: 1

Views

Author

R. H. Hardin Mar 26 2013

Keywords

Comments

Table starts
...3......9........22..........46............86............148..............239
...9.....81.......484........2116..........7396..........21904............57121
..22....484......5883.......46613........273562........1285547..........5087912
..46...2116.....46613......608855.......5537147.......38566854........218619076
..86...7396....273562.....5537147......74140718......733129227.......5733691150
.148..21904...1285547....38566854.....733129227.....9991366555.....105179942478
.239..57121...5087912...218619076....5733691150...105179942478....1461411174370
.367.134689..17557701..1051051942...37151436091...899048082946...16206659678557
.541.292681..54161878..4413826871..206162721823..6467662339564..148957213473086
.771.594441.152154419.16548850432.1004293423046.40225236084575.1167498177877341

Examples

			Some solutions for n=3 k=4
..2..0..0..0....0..0..2..2....0..1..1..2....0..1..1..0....0..1..2..2
..1..1..1..2....0..1..2..0....0..1..2..1....2..2..1..1....1..1..0..0
..1..2..2..1....0..0..2..0....2..2..2..0....1..2..1..1....0..0..0..0
		

Crossrefs

Column 1 is column m=3 of A071920

Formula

Empirical: columns k=1..6 are polynomials of degree 4*k for n>0,0,0,2,5,10

A088536 Number of unimodal functions [1..n]->[1..n].

Original entry on oeis.org

1, 4, 22, 130, 791, 4900, 30738, 194634, 1241383, 7963384, 51325352, 332095816, 2155894508, 14035149748, 91593941402, 599021799242, 3924954250975, 25760310654100, 169322682857430, 1114452091832130, 7344021912458295, 48448974411575280, 319942093205166840, 2114743632331515480
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 16 2003

Keywords

Examples

			From _Joerg Arndt_, May 10 2013: (Start)
The a(3) = 22 unimodal maps [1,2,3]->[1,2,3] are
01:  [ 1 1 1 ]
02:  [ 1 1 2 ]
03:  [ 1 1 3 ]
04:  [ 1 2 1 ]
05:  [ 1 2 2 ]
06:  [ 1 2 3 ]
07:  [ 1 3 1 ]
08:  [ 1 3 2 ]
09:  [ 1 3 3 ]
10:  [ 2 1 1 ]
11:  [ 2 2 1 ]
12:  [ 2 2 2 ]
13:  [ 2 2 3 ]
14:  [ 2 3 1 ]
15:  [ 2 3 2 ]
16:  [ 2 3 3 ]
17:  [ 3 1 1 ]
18:  [ 3 2 1 ]
19:  [ 3 2 2 ]
20:  [ 3 3 1 ]
21:  [ 3 3 2 ]
22:  [ 3 3 3 ]
(End)
		

Crossrefs

Main diagonal of A071920.
Cf. A225006 (unimodal maps [1..n]->[1..n+1]).

Programs

  • Mathematica
    Table[Sum[Binomial[2k+n-1,2k],{k,0,n-1}],{n,1,20}] (* Vaclav Kotesovec, Oct 14 2012 *)
  • PARI
    a(n) = sum(k=0,n-1, binomial(2*k+n-1,2*k)); \\ Joerg Arndt, May 10 2013

Formula

a(n) = Sum_{k=0..n-1} binomial(2k+n-1,2k).
Recurrence: 36*n*(2*n-3)*a(n) = 2*(269*n^2-549*n+235)*a(n-1) - (359*n^2-1062*n+907)*a(n-2) + 6*(3*n-8)*(3*n-7)*a(n-3). - Vaclav Kotesovec, Oct 14 2012
a(n) ~ 27^n/(5*2^(2*n-1)*sqrt(3*Pi*n)). - Vaclav Kotesovec, Oct 14 2012
It appears that a(n) = Sum_{k = 0..2*n-2} (-1)^k*binomial(n+k,k). - Peter Bala, Oct 08 2021

Extensions

More terms from David Wasserman, Aug 09 2005

A227402 Number of unimodal functions f:[n]->[n^2].

Original entry on oeis.org

1, 1, 16, 525, 24616, 1505205, 113772114, 10253539205, 1073769343504, 128165285630637, 17177527372642000, 2554518029816653175, 417444979902876203656, 74358489250362053975095, 14340040595865309129453250, 2976703788777987140216622005
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2013

Keywords

Crossrefs

Main diagonal of A226031.

Programs

  • Maple
    a:= n-> `if`(n=0, 1, add(binomial(n+2*j-1, 2*j), j=0..n^2-1)):
    seq(a(n), n=0..20);
  • Mathematica
    Flatten[{1,Table[Sum[Binomial[n+2*j-1, 2*j], {j,0,n^2-1}],{n,1,20}]}] (* Vaclav Kotesovec, Aug 29 2014 *)

Formula

a(n) = Sum_{j=0..n^2-1} C(n+2*j-1,2*j), a(0) = 1.
a(n) = A071921(n,n^2).
a(n) ~ 2^(n-3/2) * n^(n-1/2) * exp(n+1/4) / sqrt(Pi). - Vaclav Kotesovec, Aug 29 2014

A210219 Triangle of coefficients of polynomials u(n,x) jointly generated with A210220; see the Formula section.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 9, 7, 1, 5, 16, 22, 11, 1, 6, 25, 50, 46, 16, 1, 7, 36, 95, 130, 86, 22, 1, 8, 49, 161, 295, 296, 148, 29, 1, 9, 64, 252, 581, 791, 610, 239, 37, 1, 10, 81, 372, 1036, 1792, 1897, 1163, 367, 46, 1, 11, 100, 525, 1716, 3612, 4900, 4166, 2083, 541, 56, 1
Offset: 1

Views

Author

Clark Kimberling, Mar 19 2012

Keywords

Comments

First two terms in row n: n,(n-1)^2; last term: 1.
Period of alternating row sums: (1,1,0).
For a discussion and guide to related arrays, see A208510.
Apparently this is A071920 without the marginal zeros, read by downwards antidiagonals, or T(n,k) = A071922(n,k). - R. J. Mathar, May 17 2014

Examples

			First five rows:
  1
  2...1
  3...4....1
  4...9....7....1
  5...16...22...11...1
First three polynomials u(n,x): 1, 2 + x, 3 + 4x + x^2.
		

Crossrefs

Cf. A210220, A208510, A001906 (row sums).

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x] + 1;
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]     (* A210219 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]     (* A210220 *)
    (* alternative program *)
    T[n_,k_] := Sum[Binomial[k, 2*j]*Binomial[n-j, k], {j, 0, Floor[k/2]}]; Flatten[Table[T[n, k],{n, 1, 11}, {k, 1, n}]] (* Detlef Meya, Dec 05 2023 *)
  • PARI
    T(n,k) = sum(j=0, k\2, binomial(k,2*j)*binomial(n-j,k)) \\ Andrew Howroyd, Jan 01 2024

Formula

u(n,x) = x*u(n-1,x) + v(n-1,x) + 1, v(n,x) = x*u(n-1,x) + (x+1)*v(n-1,x) + 1, where u(1,x)=1, v(1,x)=1.
T(n,k) = Sum_{j=0..floor(k/2)} binomial(k,2*j)*binomial(n-j,k). - Detlef Meya, Dec 05 2023

A220074 Triangle read by rows giving coefficients T(n,k) of [x^(n-k)] in Sum_{i=0..n} (x-1)^i, 0 <= n <= k.

Original entry on oeis.org

1, 1, 0, 1, -1, 1, 1, -2, 2, 0, 1, -3, 4, -2, 1, 1, -4, 7, -6, 3, 0, 1, -5, 11, -13, 9, -3, 1, 1, -6, 16, -24, 22, -12, 4, 0, 1, -7, 22, -40, 46, -34, 16, -4, 1, 1, -8, 29, -62, 86, -80, 50, -20, 5, 0, 1, -9, 37, -91, 148, -166, 130, -70, 25, -5, 1
Offset: 0

Views

Author

Mokhtar Mohamed, Dec 03 2012

Keywords

Comments

If the triangle is viewed as a square array S(m, k) = T(m+k, k), 0 <= m, 0 <= k, its first row is (1,0,1,0,1,...) with e.g.f. cosh(x), g.f. 1/(1-x^2) and subsequent rows have g.f. 1/((1+x)^n*(1-x^2)) (substitute x for -x in g.f. for A059259).
By column, S(m, k) is the coefficient of [x^m] in the generating function Sum_{i=0..k} (-1)^i/(1-x)^(i+1).
This is a rational generating function down column k with a power of (1-x) in the denominator; therefore column k is a polynomial in m respectively n. - Mathew Englander, May 14 2014
Column k multiplied by k! seems to correspond to row k of A054651, considered as a polynomial and then evaluated on the negative integers. For example, row 5 of A054651 represents the polynomial x^5 - 5*x^4 + 25*x^3 + 5*x^2 + 94*x + 120. Evaluating that for x = -1, x = -2, x = -3, ... gives (0, -360, -1440, -4080, -9600, -19920, -37680, ...) which is 5! times column 5 of this triangle. - Mathew Englander, May 23 2014
This triangle provides a solution to a question in the mathematics of gambling. For 0 < p < 1 and positive integers N and G with N < G, suppose you begin with N dollars and make repeated wagers, each time winning 1 dollar with probability p and losing 1 dollar with probability 1-p. You continue betting 1 dollar at a time until you have either G dollars (your Goal) or 0 (bankrupt). What is the probability of reaching your Goal before going bankrupt, as a function of p, N, and G? (This is a type of one-dimensional random walk.) Answer: Let Q_m_(x) be the polynomial whose coefficients are given by row m-1 of the triangle (e.g., Q_6_(x) = 1 - 4x + 7x^2 - 6x^3 + 3x^4). Then, the probability of reaching G dollars before going bankrupt is p^(G-N)*Q_N_(p)/Q_G_(p). - Mathew Englander, May 23 2014
From Paul Curtz, Mar 17 2017: (Start)
Consider the triangle Ja(n+1,k) (here, but generally Ja(n,k)) composed of the triangle a(n) prepended with a column of 0's, i.e.,
0;
0, 1;
0, 1, 0;
0, 1, -1, 1;
0, 1, -2, 2, 0;
0, 1, -3, 4, -2, 1;
0, 1, -4, 7, -6, 3, 0;
0, 1, -5, 11, -13, 9, -3, 1;
... .
The row sums are 0, 1, 1, ... = A057427(n), the most elementary autosequence of the first kind (a sequence of the first kind has 0's as main diagonal of its array of successive differences).
The row sums of the absolute values are A001045(n).
Ja applied to a sequence written in its reluctant form yields an autosequence of the first kind. Example: the reluctant form of A001045(n) is 0, 0, 1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 1, 3, 5, ... = Jl.
Jl multiplied by Ja gives the triangle Jal:
0;
0, 1;
0, 1, 0;
0, 1, -1, 3;
0, 1, -2, 6, 0;
0, 1, -3, 12, -10, 11;
0, 1, -4, 21, -30, 33, 0;
0, 1, -5, 33, -65, 99, -63, 43;
... .
The row sums are A001045(n). (End)

Examples

			Triangle begins:
  1;
  1,   0;
  1,  -1,   1;
  1,  -2,   2,    0;
  1,  -3,   4,   -2,    1;
  1,  -4,   7,   -6,    3,    0;
  1,  -5,  11,  -13,    9,   -3,    1;
  1,  -6,  16,  -24,   22,  -12,    4,    0;
  1,  -7,  22,  -40,   46,  -34,   16,   -4,   1;
  1,  -8,  29,  -62,   86,  -80,   50,  -20,   5,   0;
  1,  -9,  37,  -91,  148, -166,  130,  -70,  25,  -5, 1;
  1, -10,  46, -128,  239, -314,  296, -200,  95, -30, 6, 0;
  ...
		

Crossrefs

Similar to the triangles A080242, A108561, A112555, A071920.
Cf. A000124 (column 2), A003600 (column 3), A223718 (column 4, conjectured), A257890 (column 5).

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Sum([0..k], j-> (-1)^j*Binomial(n-k+j, j))))); # G. C. Greubel, Feb 18 2019
  • Magma
    [[(&+[(-1)^j*Binomial(n-k+j, j): j in [0..k]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Feb 18 2019
    
  • Maple
    A059259A := proc(n,k)
        1/(1+y)/(1-x-y) ;
        coeftayl(%,x=0,n) ;
        coeftayl(%,y=0,k) ;
    end proc:
    A059259 := proc(n,k)
        A059259A(n-k,k) ;
    end proc:
    A220074 := proc(i,j)
        (-1)^j*A059259(i,j) ;
    end proc: # R. J. Mathar, May 14 2014
  • Mathematica
    Table[Sum[(-1)^i*Binomial[n-k+i,i], {i, 0, k}], {n, 0, 12}, {k, 0, n} ]//Flatten (* Michael De Vlieger, Jan 27 2016 *)
  • PARI
    {T(n,k) = sum(j=0,k, (-1)^j*binomial(n-k+j,j))};
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Feb 18 2019
    
  • Sage
    [[sum((-1)^j*binomial(n-k+j,j) for j in (0..k)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Feb 18 2019
    

Formula

Sum_{k=0..n} T(n,k) = 1.
T(n,k) = Sum_{i=0..k} (-1)^i*binomial(n-k+i, i).
T(2*n,n) = (-1)^n*A026641(n).
T(n,k) = (-1)^k*A059259(n,k).
T(n,0) = 1, T(n,n) = (1+(-1)^n)/2, and T(n,k) = T(n-1,k) - T(n-1,k-1) for 0 < k < n. - Mathew Englander, May 24 2014

Extensions

Definition and comments clarified by Li-yao Xia, May 15 2014

A226031 Number A(n,k) of unimodal functions f:[n]->[k*n]; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 4, 0, 1, 3, 16, 22, 0, 1, 4, 36, 161, 130, 0, 1, 5, 64, 525, 1716, 791, 0, 1, 6, 100, 1222, 8086, 18832, 4900, 0, 1, 7, 144, 2360, 24616, 128248, 210574, 30738, 0, 1, 8, 196, 4047, 58730, 510664, 2072862, 2385644, 194634, 0
Offset: 0

Views

Author

Alois P. Heinz, May 23 2013

Keywords

Examples

			Square array A(n,k) begins:
  1,   1,     1,      1,      1,       1, ...
  0,   1,     2,      3,      4,       5, ...
  0,   4,    16,     36,     64,     100, ...
  0,  22,   161,    525,   1222,    2360, ...
  0, 130,  1716,   8086,  24616,   58730, ...
  0, 791, 18832, 128248, 510664, 1505205, ...
		

Crossrefs

Columns k=0-2 give: A000007, A088536, A226012.
Rows n=0-2 give: A000012, A001477, A016742.
Main diagonal gives: A227402.
Cf. A071920.

Programs

  • Maple
    A:= (n, k)-> `if`(n=0, 1, add(binomial(n+2*j-1, 2*j), j=0..k*n-1)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    A[n_, k_] := If[n==0, 1, Sum[Binomial[n + 2j - 1, 2j], {j, 0, k n - 1}]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k*n-1} C(n+2*j-1,2*j), A(0,k) = 1.
A(n,k) = A071921(n,k*n).
Showing 1-10 of 13 results. Next