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-8 of 8 results.

A215861 Number T(n,k) of simple labeled graphs on n nodes with exactly k connected components that are trees or cycles; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 3, 1, 0, 19, 19, 6, 1, 0, 137, 135, 55, 10, 1, 0, 1356, 1267, 540, 125, 15, 1, 0, 17167, 15029, 6412, 1610, 245, 21, 1, 0, 264664, 218627, 90734, 23597, 3990, 434, 28, 1, 0, 4803129, 3783582, 1515097, 394506, 70707, 8694, 714, 36, 1
Offset: 0

Views

Author

Alois P. Heinz, Aug 25 2012

Keywords

Comments

Also the Bell transform of A215851(n+1). For the definition of the Bell transform see A264428 and the links given there. - Peter Luschny, Jan 21 2016

Examples

			T(4,2) = 19:
  .1 2.  .1 2.  .1-2.  .1-2.  .1 2.  .1 2.  .1 2.  .1 2.  .1 2.  .1 2.
  . /|.  .|\ .  .|/ .  . \|.  . /|.  .  |.  . / .  .|\ .  . \ .  .|  .
  .4-3.  .4-3.  .4 3.  .4 3.  .4 3.  .4-3.  .4-3.  .4 3.  .4-3.  .4-3.
  .
  .1-2.  .1-2.  .1 2.  .1-2.  .1-2.  .1 2.  .1-2.  .1 2.  .1 2.
  .|  .  . / .  .|/ .  . \ .  .  |.  . \|.  .   .  .| |.  . X .
  .4 3.  .4 3.  .4 3.  .4 3.  .4 3.  .4 3.  .4-3.  .4 3.  .4 3.
Triangle T(n,k) begins:
  1;
  0,     1;
  0,     1,     1;
  0,     4,     3,    1;
  0,    19,    19,    6,    1;
  0,   137,   135,   55,   10,   1;
  0,  1356,  1267,  540,  125,  15,   1;
  0, 17167, 15029, 6412, 1610, 245,  21,  1;
  ...
		

Crossrefs

Diagonal and lower diagonals give: A000012, A000217, A215862, A215863, A215864, A215865.
Row sums give: A144164.
T(2n,n) gives A309313.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
          `if`(n=0, 1, add(binomial(n-1, i)*T(n-1-i, k-1)*
          `if`(i<2, 1, i!/2 +(i+1)^(i-1)), i=0..n-k)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);
    # Alternatively, with the function BellMatrix defined in A264428:
    BellMatrix(n -> `if`(n<2, 1, n!/2+(n+1)^(n-1)), 8); # Peter Luschny, Jan 21 2016
  • Mathematica
    t[0, 0] = 1; t[n_, k_] /; k < 0 || k > n = 0; t[n_, k_] := t[n, k] =Sum[ Binomial[n-1, i]*t[n-1-i, k-1]* If[i < 2, 1, i!/2 + (i+1)^(i-1)], {i, 0, n-k}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 07 2013 *)
    (* Alternatively, with the function BellMatrix defined in A264428: *)
    g[n_] =  If[n < 2, 1, n!/2 + (n+1)^(n-1)]; BellMatrix[g, 8] (* Peter Luschny, Jan 21 2016 *)
    rows = 11;
    t = Table[If[n<2, 1, n!/2 + (n+1)^(n-1)], {n, 0, rows}];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 0, rows}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018, after Peter Luschny *)
  • Sage
    # uses[bell_matrix from A264428]
    bell_matrix(lambda n: factorial(n)//2 + (n+1)^(n-1) if n>=2 else 1, 8) # Peter Luschny, Jan 21 2016

Formula

T(0,0) = 1, T(n,k) = 0 for k<0 or k>n, and otherwise T(n,k) = Sum_{i=0..n-k} C(n-1,i)*T(n-1-i,k-1)*h(i) with h(i) = 1 for i<2 and h(i) = i!/2 + (i+1)^(i-1) else.

A241765 a(n) = n*(n + 1)*(n + 2)*(3*n + 17)/24.

Original entry on oeis.org

0, 5, 23, 65, 145, 280, 490, 798, 1230, 1815, 2585, 3575, 4823, 6370, 8260, 10540, 13260, 16473, 20235, 24605, 29645, 35420, 41998, 49450, 57850, 67275, 77805, 89523, 102515, 116870, 132680, 150040, 169048, 189805, 212415, 236985, 263625, 292448
Offset: 0

Views

Author

Bruno Berselli, Apr 28 2014

Keywords

Comments

Equivalently, Sum_{i=0..n} (i+4)*A000217(i).
Sequences of the type Sum_{i=0..n} (i+k)*A000217(i):
k = 0, A001296: 0, 1, 7, 25, 65, 140, 266, 462, ...
k = 1, A000914: 0, 2, 11, 35, 85, 175, 322, 546, ...
k = 2, A050534: 0, 3, 15, 45, 105, 210, 378, 630, ... (deleting two 0)
k = 3, A215862: 0, 4, 19, 55, 125, 245, 434, 714, ...
k = 4, a(n): 0, 5, 23, 65, 145, 280, 490, 798, ...
k = 5, A239568: 0, 6, 27, 75, 165, 315, 546, 882, ...
Antidiagonal sums (without 0) give A034263: 1, 9, 39, 119, 294, ...
Diagonal: 1, 11, 45, 125, 280, 546, ... is A051740.
Also: k = -1 gives A050534 deleting a 0; k = -2 gives 0 followed by A059302.
After 0, partial sums of A212343 and third column of A118788.
This sequence is even related to A005286 by a(n) = n*A005286(n) - Sum_{i=0..n-1} A005286(i).

Examples

			a(7) = 4*0 + 5*1 + 6*3 + 7*6 + 8*10 + 9*15 + 10*21 + 11*28 = 798.
		

Crossrefs

Cf. similar sequences A000914, A001296, A050534, A059302, A215862, A239568 (see table in Comments lines).

Programs

  • Magma
    /* By first comment: */ k:=4; A000217:=func; [&+[(i+k)*A000217(i): i in [0..n]]: n in [0..40]];
    
  • Maple
    A241765:=n->n*(n + 1)*(n + 2)*(3*n + 17)/24; seq(A241765(n), n=0..40); # Wesley Ivan Hurt, May 09 2014
  • Mathematica
    Table[n (n + 1) (n + 2) (3 n + 17)/24, {n, 0, 40}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {0, 5, 23, 65, 145}, 40]
    CoefficientList[Series[x (5 - 2 x)/(1 - x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 09 2014 *)
  • Maxima
    makelist(coeff(taylor(x*(5-2*x)/(1-x)^5, x, 0, n), x, n), n, 0, 40);
    
  • PARI
    a(n)=n*(n+1)*(n+2)*(3*n+17)/24 \\ Charles R Greathouse IV, Oct 07 2015
    
  • PARI
    x='x+O('x^99); concat(0, Vec(x*(5-2*x)/(1-x)^5)) \\ Altug Alkan, Apr 10 2016
  • Sage
    [n*(n+1)*(n+2)*(3*n+17)/24 for n in (0..40)]
    

Formula

G.f.: x*(5 - 2*x)/(1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A227342(A055998(n+1)).
a(n) = Sum_{j=0..n+2} (-1)^(n-j)*binomial(-j,-n-2)*S1(j,n), S1 Stirling cycle numbers A132393. - Peter Luschny, Apr 10 2016

A354794 Triangle read by rows. The Bell transform of the sequence {m^m | m >= 0}.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 3, 1, 0, 27, 19, 6, 1, 0, 256, 175, 55, 10, 1, 0, 3125, 2101, 660, 125, 15, 1, 0, 46656, 31031, 9751, 1890, 245, 21, 1, 0, 823543, 543607, 170898, 33621, 4550, 434, 28, 1, 0, 16777216, 11012415, 3463615, 688506, 95781, 9702, 714, 36, 1
Offset: 0

Author

Peter Luschny, Jun 09 2022

Keywords

Comments

For the definition of the Bell transform see A264428. The Bell transform of {(-m)^m | m >= 0} is A039621. The numbers A039621(n, k) are known as the Lehmer-Comtet numbers of 2nd kind. We think it is more natural to use Bell_{n, k}({m^m}) as the basis for the definition (and let the triangle start at (0, 0)).

Examples

			Triangle T(n, k) begins:
[0] 1;
[1] 0,        1;
[2] 0,        1,        1;
[3] 0,        4,        3,       1;
[4] 0,       27,       19,       6,      1;
[5] 0,      256,      175,      55,     10,     1;
[6] 0,     3125,     2101,     660,    125,    15,    1;
[7] 0,    46656,    31031,    9751,   1890,   245,   21,   1;
[8] 0,   823543,   543607,  170898,  33621,  4550,  434,  28,  1;
[9] 0, 16777216, 11012415, 3463615, 688506, 95781, 9702, 714, 36, 1;
		

References

  • Louis Comtet, Advanced Combinatorics. Reidel, Dordrecht, 1974, p. 139-140.

Crossrefs

Cf. A264428, A039621 (signed variant), A195979 (row sums), A000312 (column 1), A045531 (column 2), A281596 (column 3), A281595 (column 4), A000217 (diagonal 1), A215862 (diagonal 2), A354795 (matrix inverse), A137452 (Abel).

Programs

  • Maple
    T := (n, k) -> if n = k then 1 else
    add((-1)^j*(n-j-1)^(n-1)/(j!*(k-1-j)!), j = 0.. k-1) fi:
    seq(seq(T(n, k), k = 0..n), n = 0..9);
    # Alternatively, using the function BellMatrix from A264428:
    BellMatrix(n -> n^n, 9);
    # Or by recursion:
    R := proc(n, k, m) option remember;
       if k < 0 or n < 0 then 0 elif k = 0 then 1 else
       m*R(n, k-1, m) + R(n-1, k, m+1) fi end:
    A039621 := (n, k) -> ifelse(n = 0, 1, R(k-1, n-k, n-k)):
  • Mathematica
    Unprotect[Power]; Power[0, 0] = 1; pow[n_] := n^n;
    R = Range[0, 9]; T[n_, k_] := BellY[n, k, pow[R]];
    Table[T[n, k], {n, R}, {k, 0, n}] // Flatten
  • Python
    from functools import cache
    @cache
    def t(n, k, m):
        if k < 0 or n < 0: return 0
        if k == 0: return n ** k
        return m * t(n, k - 1, m) + t(n - 1, k, m + 1)
    def A354794(n, k): return t(k - 1, n - k, n - k) if n != k else 1
    for n in range(9): print([A354794(n, k) for k in range(n + 1)])

Formula

T(n, k) = Bell_{n, k}(A000312), where Bell_{n, k} is the partial Bell polynomial evaluated over the powers m^m (with 0^0 = 1). See the Mathematica program.
T(n, k) = Sum_{j=0..k-1} (-1)^j*(n-j-1)^(n - 1)/(j! * (k-1-j)!) for 0 <= k < n and T(n, n) = 1.
T(n, k) = r(k-1, n-k, n-k) for n,k >= 1 and T(0, 0) = 1, where r(n, k, m) = m*r(n, k-1, m) + r(n-1, k, m+1) and r(n, 0, m) = 1. (see Vladimir Kruchinin's formula in A039621).
Sum_{k=1..n} binomial(k + x - 1, k-1)*(k-1)!*T(n, k) = (n + x)^(n - 1) for n >= 1.
Sum_{k=1..n} (-1)^(k+j)*Stirling1(k, j)*T(n, k) = n^(n-j)*binomial(n-1, j-1) for n >= 1, which are, up to sign, the coefficients of the Abel polynomials (A137452).
From Werner Schulte, Jun 14 2022 and Jun 19 2022: (Start)
E.g.f. of column k >= 0: (Sum_{i>0} (i-1)^(i-1) * t^i / i!)^k / k!.
Conjecture: T(n, k) = Sum_{i=0..n-k} A048994(n-k, i) * A048993(n+i-1, n-1) for 0 < k <= n and T(n, 0) = 0^n for n >= 0; proved by Mike Earnest, see link at A354797. (End)

A264750 Number of sequences of 5 throws of an n-sided die (with faces numbered 1, 2, ..., n) in which the sum of the throws first reaches or exceeds n on the 5th throw.

Original entry on oeis.org

5, 29, 99, 259, 574, 1134, 2058, 3498, 5643, 8723, 13013, 18837, 26572, 36652, 49572, 65892, 86241, 111321, 141911, 178871, 223146, 275770, 337870, 410670, 495495, 593775, 707049, 836969, 985304, 1153944, 1344904, 1560328, 1802493, 2073813, 2376843, 2714283
Offset: 5

Author

Louis Rogliano, Nov 23 2015

Keywords

Comments

Sequence gives the second column of A185508. [Bruno Berselli, Nov 24 2015]
Number of 5-tuples (t_1, ..., t_5) with 1 <= t_j <= n, Sum_{j <= 4} t_j < n and Sum_{j<=5} t_j >= n. - Robert Israel, Nov 25 2015

Examples

			From _Jon E. Schoenfield_, Nov 26 2015: (Start)
For n=5, the a(5) = 5 sequences (i.e., quintuples or 5-tuples) are {1,1,1,1,1}, {1,1,1,1,2}, {1,1,1,1,3}, {1,1,1,1,4} and {1,1,1,1,5}. (Each of the first four throws must be a 1; otherwise, the sum of the throws would reach or exceed 5 before the 5th throw.)
For n=6, each of the quintuples must have four throws whose sum is less than 6, followed by a fifth throw that brings the sum to at least 6, so the a(6) = 29 quintuples are the 5 quintuples {1,1,1,1,t_5} where t_5 is any value in 2..6 and the four sets of 6 quintuples {1,1,1,2,t_5}, {1,1,2,1,t_5}, {1,2,1,1,t_5} and {2,1,1,1,t_5} where t_5 is any value in 1..6. (End)
		

Crossrefs

Cf. A000096 (k=2), A051925 (k=3), A215862 (k=4).
Cf. A185508.

Programs

  • Magma
    [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: n in [5..40]]; // Vincenzo Librandi, Nov 24 2015
    
  • Maple
    A264750:=n->(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: seq(A264750(n), n=5..50); # Wesley Ivan Hurt, Nov 24 2015
  • Mathematica
    f[n_, k_] := Module[
    {i, total = 0, part, perm},
    part = IntegerPartitions[n, {k}];
    perm = Flatten[Table[Permutations[part[[i]]], {i, 1, Length[part]}],      1];
    For[i = 1, i <= Length[perm], i++,    total += n + 1 - perm[[i, k]]    ];
    Return[total];   ]
    And the sequences are obtained by:
    h[k_] := Table[f[i, k], {i, k, number_of_terms_wanted}]
    Table[(n - 4) (n - 3) (n - 2) (n - 1) (4 n + 5)/120, {n, 5, 40}] (* Bruno Berselli, Nov 24 2015 *)
  • PARI
    Vec(x^5*(5-x)/(1-x)^6 + O(x^100)) \\ Colin Barker, Nov 23 2015
    
  • PARI
    for(n=5, 40, print1((n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120", ")); \\ Bruno Berselli, Nov 24 2015
    
  • Sage
    [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120 for n in (5..40)] # Bruno Berselli, Nov 24 2015

Formula

From Colin Barker, Nov 23 2015: (Start)
a(n) = (n - 4)*(n - 3)*(n - 2)*(n - 1)*(4*n + 5)/120.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>10.
G.f.: x^5*(5 - x) / (1 - x)^6. (End)

Extensions

Offset changed by Robert Israel, Nov 25 2015
Formulae, b-file adapted to the new offset and definition rephrased by the Editors of the OEIS, Nov 26 2015

A269952 Triangle read by rows, T(n,k) = Sum_{j=0..n} (-1)^(n-j)*C(-j,-n)*S2(j,k), S2 the Stirling set numbers A048993, for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 4, 5, 1, 0, 8, 19, 9, 1, 0, 16, 65, 55, 14, 1, 0, 32, 211, 285, 125, 20, 1, 0, 64, 665, 1351, 910, 245, 27, 1, 0, 128, 2059, 6069, 5901, 2380, 434, 35, 1, 0, 256, 6305, 26335, 35574, 20181, 5418, 714, 44, 1
Offset: 0

Author

Peter Luschny, Apr 10 2016

Keywords

Examples

			1,
0, 1,
0, 2, 1,
0, 4, 5, 1,
0, 8, 19, 9, 1,
0, 16, 65, 55, 14, 1,
0, 32, 211, 285, 125, 20, 1,
0, 64, 665, 1351, 910, 245, 27, 1.
		

Crossrefs

Variant: A143494 (the main entry for this triangle).
A005493 (row sums), A074051 (alt. row sums), A000079 (col. 1), A001047 (col. 2),
A016269 (col. 3), A025211 (col. 4), A000096 (diag. n,n-1), A215862 (diag. n,n-2),
A049444, A136124, A143491 (matrix inverse).

Programs

  • Maple
    A269952 := (n,k) -> Stirling2(n+1, k+1) - Stirling2(n, k+1):
    seq(seq(A269952(n,k), k=0..n), n=0..9);
  • Mathematica
    Flatten[ Table[ Sum[(-1)^(n-j) Binomial[-j,-n] StirlingS2[j,k], {j,0,n}], {n,0,9}, {k,0,n}]]

Formula

T(n, k) = S2(n+1, k+1) - S2(n, k+1).

A125101 T(n,k) = k*binomial(n-1,k-1) + Fibonacci(k)*binomial(n-1,k) (1 <= k <= n).

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 4, 9, 11, 4, 5, 14, 26, 19, 5, 6, 20, 50, 55, 30, 6, 7, 27, 85, 125, 105, 44, 7, 8, 35, 133, 245, 280, 182, 62, 8, 9, 44, 196, 434, 630, 560, 300, 85, 9, 10, 54, 276, 714, 1260, 1428, 1056, 477, 115, 10, 11, 65, 375, 1110, 2310, 3192, 3030, 1905, 745, 155
Offset: 1

Author

Gary W. Adamson, Nov 20 2006

Keywords

Comments

Row sums are s(n) = 1, 4, 11, 28, 69, 167, 400, ...
Binomial transform of the bidiagonal matrix with (1,2,3...) in the main diagonal and the Fibonacci numbers (1,1,2,3,5,8,...) in the subdiagonal.

Examples

			First few rows of the triangle:
  1;
  2,  2;
  3,  5,   3;
  4,  9,  11,   4;
  5, 14,  26,  19,   5;
  6, 20,  50,  55,  30,   6;
  7, 27,  85, 125, 105,  44,  7;
  8, 35, 133, 245, 280, 182, 62, 8;
  ...
		

Crossrefs

Programs

  • Maple
    with(combinat): T:=(n,k)->k*binomial(n-1,k-1)+fibonacci(k)*binomial(n-1,k): for n from 1 to 12 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[k Binomial[n-1,k-1]+Fibonacci[k]Binomial[n-1,k],{n,15},{k,n}]] (* Harvey P. Dale, Nov 03 2014 *)

Formula

T(n,2) = A000096(n-1).
T(n,3) = A051925(n-1).
T(n,4) = A215862(n-3). - R. J. Mathar, Aug 10 2013
Row sums s(n) = 7*s(n-1) -17*s(n-2) +16*s(n-3) -4*s(n-4) with s(n) = A001787(n+1)/4 +A001906(n-1). - R. J. Mathar, Aug 10 2013

Extensions

Edited by N. J. A. Sloane, Nov 29 2006

A217756 Triangular array read by rows: T(n,k) is the number of simple labeled graphs on n nodes with exactly k components where each component has at most one cycle; n>=1, 1<=k<=n.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 31, 19, 6, 1, 347, 195, 55, 10, 1, 4956, 2707, 720, 125, 15, 1, 85102, 46319, 12082, 2030, 245, 21, 1, 1698712, 930947, 242774, 40397, 4830, 434, 28, 1, 38562309, 21372678, 5620177, 938826, 112287, 10206, 714, 36, 1
Offset: 1

Author

Geoffrey Critzer, Mar 23 2013

Keywords

Comments

The Bell transform of A129271(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 18 2016
From Washington Bomfim, May 10 2020: (Start)
The second formula is based on Kolchin's formula (1.4.2) [see the Kolchin reference].
Some special cases of T(n,k) are
Column 2 = n! * Sum_{j=1..floor(n/2)} f(j)/j! * f(n-j)/(n-j)!, odd n.
n!/2 *( (f(n/2)/(n/2)!)^2 + 2 * Sum_{j=1..floor(n/2)-1} f(j)/j! * f(n-j)/(n-j)!), even n.
Diagonal T(n,n-3) = 1/48*n^6 +1/48*n^5 -13/48*n^4 -37/48*n^3 +13/4*n^2 -9/4*n,
Diagonal T(n,n-2) = 1/8*n^4 -1/12*n^3 -5/8*n^2 +7/12*n = A215862(n-2),
Diagonal T(n,n-1) = 1/2*n^2- 1/2*n = A000217(n-1),
and Diagonal T(n,n) = 1. (End)

Examples

			  ... o-o ........... o o ........... o o ..........
  ...     ........... |   ........... |\  ..........
  ... o-o ........... o-o ........... o-o ..........
T(4,2) = 19 because the above graphs on 4 nodes have 2 components with at most one cycle.  They have respectively 3 + 12 + 4 = 19 labelings.
1;
1,     1;
4,     3,     1;
31,    19,    6,     1;
347,   195,   55,    10,   1;
4956,  2707,  720,   125,  15,  1;
85102, 46319, 12082, 2030, 245, 21, 1;
		

References

  • V. F. Kolchin, Random Graphs. Encyclopedia of Mathematics and Its Applications 53. Cambridge Univ. Press, Cambridge, 1999, pp 30-31.

Crossrefs

Row sums = A133686.
Column 1 = A129271.

Programs

  • Mathematica
    nn=10;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];f[list_]:=Select[list,#>0&];Map[f,Drop[Range[0,nn]!CoefficientList[Series[Exp[y(t/2-3t^2/4)]/(1-t)^(y/2),{x,0,nn}],{x,y}],1]]//Grid
  • PARI
    \p 1000  \\ See Peter Luschny formula in A129271.
    f(p) = round(((p-1) * exp(p) * incgam(p-1,p) + p^(p-2) * (3-p)) /2);
    T(n,k) = { my(S=0, D, p, c); forpart(a = n, D = Set(a);
       S += prod(j=1,#D, p=D[j]; c=#select(x-> x==p,Vec(a)); (f(p)/p!)^c /c!)
    , [1, n], [k, k]); n! * S }; \\ Washington Bomfim, Jun 16 2020
  • Sage
    # uses[bell_matrix from A264428]
    # Adds a column 1,0,0,0, ... at the left side of the triangle.
    bell_matrix(lambda n: A129271(n+1), 10) # Peter Luschny, Jan 18 2016
    

Formula

E.g.f.: exp(y*A(x)) where A(x) is the e.g.f. for A133686.
T(n,k) = n!/k! * Sum_{compositions p_1 + ... + p_k = n, p_i >= 1} Product_{j=1..k} f(p_j)/p_j!, where f(p)=A129271(p) = ((p-1)*e^p*GAMMA(p-1,p)+p^(p-2)*(3-p))/2.

A264751 Triangle read by rows: T(n,k) is the number of sequences of k <= n throws of an n-sided die (with faces numbered 1, 2, ..., n) in which the sum of the throws first reaches or exceeds n on the k-th throw.

Original entry on oeis.org

1, 1, 2, 1, 5, 3, 1, 9, 11, 4, 1, 14, 26, 19, 5, 1, 20, 50, 55, 29, 6, 1, 27, 85, 125, 99, 41, 7, 1, 35, 133, 245, 259, 161, 55, 8, 1, 44, 196, 434, 574, 476, 244, 71, 9, 1, 54, 276, 714, 1134, 1176, 804, 351, 89, 10, 1, 65, 375, 1110, 2058, 2562, 2190, 1275, 485, 109, 11
Offset: 1

Author

Louis Rogliano, Nov 26 2015

Keywords

Comments

By empirical observation: Sum of rows is A002064.

Examples

			Triangle begins:
  1
  1    2
  1    5    3
  1    9   11    4
  1   14   26   19    5
  1   20   50   55   29    6
  1   27   85  125   99   41    7
  1   35  133  245  259  161   55    8
  1   44  196  434  574  476  244   71    9
  1   54  276  714 1134 1176  804  351   89   10
  1   65  375 1110 2058 2562 2190 1275  485  109   11
		

Crossrefs

Columns are: A000012 (k=1), A000096 (k=2), A051925 (k=3), A215862 (k=4), A264750 (k=5).
Cf. A007318 (binomial(n-1,k-1) = number of sequences of k throws of an n-sided die in which the sum of the throws equals n).
See also A002064.

Programs

  • Mathematica
    T[n_, k_] := Module[
    {i, total = 0, part, perm},
    part = IntegerPartitions[n, {k}];
    perm = Flatten[Table[Permutations[part[[i]]], {i, 1, Length[part]}],      1];
    For[i = 1, i <= Length[perm], i++,    total += n + 1 - perm[[i, k]]    ];
    Return[total];   ]
    (* The rows are obtained by: *)
    g[n_] := Table[T[n,k], {k,1,n}]
    (* And the triangle is obtained by: *)
    Table[g[n],{n,1,number_of_rows_wanted}]

Formula

Sum_{k = 1..n} T(n,k)*k/n^k = ((n+1)/n)^(n-1) = expected value of k.
Lim_{n->infinity} (expected value of k) = e = 2.71828182845... - Jon E. Schoenfield, Nov 26 2015
T(n,k) = Sum_{i=k..n} i*binomial(i-2,k-2). - Danny Rorabaugh, Mar 04 2016
T(n,n-1) = 2*T(n-1,n-1) + T(n-1,n-2).
By empirical observation, g.f. for column k: (x-k)/(x-1)^(k+1).
Showing 1-8 of 8 results.