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.

Previous Showing 61-70 of 77 results. Next

A037959 a(n) = n^2*(n+1)*(n+2)!/48.

Original entry on oeis.org

6, 90, 1200, 15750, 211680, 2963520, 43545600, 673596000, 10977120000, 188367379200, 3399953356800, 64457449056000, 1281520880640000, 26676557107200000, 580481882652672000, 13183287756807168000
Offset: 2

Views

Author

Keywords

References

  • Identity (1.19)/(n+3) in H. W. Gould, Combinatorial Identities, Morgantown, 1972, page 3.

Crossrefs

Programs

  • Magma
    [Factorial(n)*StirlingSecond(n+3,n)/(n+3): n in [2..30]]; // G. C. Greubel, Jun 20 2022
    
  • Mathematica
    Table[(n+2)!n^2(n+1)/48,{n,2,20}] (* Harvey P. Dale, Jul 29 2021 *)
  • SageMath
    [factorial(n)*stirling_number2(n+3, n)/(n+3) for n in (2..30)] # G. C. Greubel, Jun 20 2022

Formula

(n-1)^2*a(n) = n*(n+2)*(n+1)*a(n-1). - R. J. Mathar, Jul 26 2015
From G. C. Greubel, Jun 20 2022: (Start)
a(n) = (1/(n+3))*Sum_{j=0..n} (-1)^(n+j)*binomial(n,j)*j^(n+3).
a(n) = n!*StirlingS2(n+3, n)/(n+3).
a(n) = A037961(n)/(n+3).
a(n) = A131689(n+3, n).
a(n) = A019538(n+3, n).
E.g.f.: x*(1 + 6*x + 3*x^2)/(4*(1-x)^6). (End)

A344116 Triangle read by rows: T(n,k) is the number of relations from an n-element set to a k-element set that are not onto functions.

Original entry on oeis.org

1, 3, 14, 7, 58, 506, 15, 242, 4060, 65512, 31, 994, 32618, 1048336, 33554312, 63, 4034, 261604, 16775656, 1073740024, 68719476016, 127, 16258, 2095346, 268427056, 34359721568, 4398046495984, 562949953416272, 255, 65282, 16771420, 4294926472, 1099511501776, 281474976519136, 72057594037786816, 18446744073709511296
Offset: 1

Views

Author

Mohammad K. Azarian, Jun 07 2021

Keywords

Examples

			For T(2,2), the number of relations is 2^4 and the number of onto functions is 2, so 2^4 - 2 = 14.
Triangle T(n,k) begins:
   1
   3     14
   7     58      506
  15    242     4060      65512
  31    994    32618    1048336    33554312
		

Crossrefs

Programs

  • Mathematica
    TableForm[Table[2^(n*k) - Sum[Binomial[k, k - i] (k - i)^n*(-1)^i, {i, 0, k}], {n, 5}, {k, n}]]
  • PARI
    T(n,k) = 2^(n*k) - k!*stirling(n, k, 2); \\ Michel Marcus, Jun 26 2021

Formula

T(n,k) = 2^(n*k) - k!*Stirling2(n,k).
T(n,k) = A344110(n,k) - A131689(n,k).

A371568 Array read by ascending antidiagonals: A(n, k) is the number of paths of length k in Z^n from the origin to points such that x1+x2+...+xn = k with x1,...,xn > 0.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 0, 6, 1, 0, 0, 6, 14, 1, 0, 0, 0, 36, 30, 1, 0, 0, 0, 24, 150, 62, 1, 0, 0, 0, 0, 240, 540, 126, 1, 0, 0, 0, 0, 120, 1560, 1806, 254, 1, 0, 0, 0, 0, 1800, 8400, 5796, 510, 1
Offset: 1

Views

Author

Shel Kaphan, Mar 28 2024

Keywords

Comments

T(n, k) can also be seen as the number of ordered partitions of k items into n nonempty buckets.
T(n, n) = n!, which is readily seen because to go from the origin to a point in Z^n a distance n away, with at least one step taken in each dimension, the first step can be in any of n dimensions, the second step in any of n-1 dimensions, and so on.
This array is the image of Pascal's triangle A007318 under the Akiyama-Tanigawa transformation. See the Python program. - Peter Luschny, Apr 19 2024

Examples

			 n\k 1 2 3  4   5    6     7      8       9       10
  --------------------------------------------------
 1|  1 1 1  1   1    1     1      1       1        1
 2|  0 2 6 14  30   62   126    254     510     1022
 3|  0 0 6 36 150  540  1806   5796   18150    55980
 4|  0 0 0 24 240 1560  8400  40824  186480   818520
 5|  0 0 0  0 120 1800 16800 126000  834120  5103000
 6|  0 0 0  0   0  720 15120 191520 1905120 16435440
 7|  0 0 0  0   0    0  5040 141120 2328480 29635200
 8|  0 0 0  0   0    0     0  40320 1451520 30240000
 9|  0 0 0  0   0    0     0      0  362880 16329600
10|  0 0 0  0   0    0     0      0       0  3628800
		

Crossrefs

Cf. A000918 (n=2), A001117 (n=3), A000919 (n=4), A001118 (n=5), A000920 (n=6).
Cf. A135456 (n=7), A133068 (n=8), A133360 (n=9), A133132 (n=10).
See A019538 and A131689 for other versions.

Programs

  • Mathematica
    A[n_,k_] := Sum[(-1)^(n-i) * i^k * Binomial[n,i], {i,1,n}]
  • Python
    # The Akiyama-Tanigawa algorithm for the binomial generates the rows.
    # Adds row(0) = 0^k and column(0) = 0^n.
    from math import comb as binomial
    def ATBinomial(n, len):
        A = [0] * len
        R = [0] * len
        for k in range(len):
            R[k] = binomial(k, n)
            for j in range(k, 0, -1):
                R[j - 1] = j * (R[j] - R[j - 1])
            A[k] = R[0]
        return A
    for n in range(11): print([n], ATBinomial(n, 11))  # Peter Luschny, Apr 19 2024

Formula

A(n,k) = Sum_{i=1..n} (-1)^(n-i) * binomial(n,i) * i^k

A372346 a(n) = Sum_{j=0..n} p(n - j, j) where p(n, x) = Sum_{k=0..n} k! * Stirling2(n, k) * x^k. Row sums of A344499.

Original entry on oeis.org

1, 1, 2, 6, 27, 175, 1532, 17276, 243093, 4165261, 85133686, 2039546786, 56447550543, 1783865468187, 63766726231792, 2558290237404920, 114418196763735113, 5670168958036693977, 309630356618418661738, 18536683645526372648446, 1211038603734731649106307, 85983731724631359047504967
Offset: 0

Views

Author

Peter Luschny, Apr 28 2024

Keywords

Crossrefs

Programs

  • Maple
    p := n -> local k; add(k!*Stirling2(n, k)*x^k, k = 0..n):
    a := n -> local j; add(subs(x = j, p(n - j)),  j = 0..n):
    seq(a(n), n = 0..21);

Formula

a(n) = A094422(n - 1) + 1.

A105797 "Stirling-Bernoulli transform" of Pell numbers.

Original entry on oeis.org

0, 1, 3, 19, 135, 1291, 14343, 188539, 2815095, 47412811, 886239783, 18231365659, 409053408855, 9943622273131, 260300948527623, 7300927107288379, 218426614502831415, 6943261704033434251, 233692323131307301863
Offset: 0

Views

Author

Paul Barry, Apr 20 2005

Keywords

Crossrefs

Cf. A050946.

Programs

  • Mathematica
    CoefficientList[Series[E^x*(1-E^x)/(1-4*E^x+2*E^(2*x)), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Sep 26 2013 *)

Formula

E.g.f.: e^x*(1-e^x)/(1-4*e^x+2*e^(2*x)).
a(n) = Sum_{k = 0..n} (-1)^(n-k) * k! * S2(n, k) * A000129(k).
a(n) ~ n!/(4*log(1+1/sqrt(2))^(n+1)). - Vaclav Kotesovec, Sep 26 2013
a(n) = Sum_{k = 0..n} (-1)^(n-k) * A131689(n,k) * A000129(k). - Philippe Deléham, May 25 2015

A225476 Triangle read by rows, k!*2^k*S_2(n, k) where S_m(n, k) are the Stirling-Frobenius subset numbers of order m; n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 13, 18, 6, 1, 40, 116, 96, 24, 1, 121, 660, 1020, 600, 120, 1, 364, 3542, 9120, 9480, 4320, 720, 1, 1093, 18438, 74466, 121800, 94920, 35280, 5040, 1, 3280, 94376, 576576, 1394064, 1653120, 1028160, 322560, 40320, 1, 9841, 478440, 4319160
Offset: 0

Views

Author

Peter Luschny, May 19 2013

Keywords

Comments

The Stirling-Frobenius subset numbers are defined in A225468 (see also the Sage program).

Examples

			[n\k][0,   1,   2,    3,   4,   5 ]
[0]   1,
[1]   1,   1,
[2]   1,   4,   2,
[3]   1,  13,  18,    6,
[4]   1,  40, 116,   96,  24,
[5]   1, 121, 660, 1020, 600, 120.
		

Crossrefs

T(n, 0) ~ A000012; T(n, 1) ~ A003462; T(n, 2) ~ A007798.
T(n, n) ~ A000142; T(n, n-1) ~ A001563.
Alternating row sum ~ A000364 (Euler secant numbers).
Cf. A225468, A131689 (m=1).

Programs

  • Maple
    SF_SSO := proc(n, k, m) option remember;
    if n = 0 and k = 0 then return(1) fi;
    if k > n or k < 0 then return(0) fi;
    k*SF_SSO(n-1, k-1, m) + (m*(k+1)-1)*SF_SSO(n-1, k, m) end:
    seq(print(seq(SF_SSO(n, k, 2), k=0..n)), n = 0..5);
  • Mathematica
    EulerianNumber[n_, k_, m_] := EulerianNumber[n, k, m] = (If[ n == 0, Return[If[k == 0, 1, 0]]]; Return[(m*(n - k) + m - 1)*EulerianNumber[n - 1, k - 1, m] + (m*k + 1)*EulerianNumber[n - 1, k, m]]); SFSSO[n_, k_, m_] := Sum[ EulerianNumber[n, j, m]*Binomial[j, n - k], {j, 0, n}]/m^k; Table[ SFSSO[n, k, 2], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 29 2013, translated from Sage *)
  • Sage
    @CachedFunction
    def EulerianNumber(n, k, m) :
        if n == 0: return 1 if k == 0 else 0
        return (m*(n-k)+m-1)*EulerianNumber(n-1, k-1, m)+(m*k+1)*EulerianNumber(n-1, k, m)
    def SF_SSO(n, k, m):
        return add(EulerianNumber(n, j, m)*binomial(j, n - k) for j in (0..n))/m^k
    for n in (0..6): [SF_SSO(n, k, 2) for k in (0..n)]

Formula

T(n, k) = sum_{j=0..n} A_2(n, j)*binomial(j, n-k), where A_2(n, j) are the generalized Eulerian numbers of order m=2.
For a recurrence see the Maple program.

A285867 Triangle T(n, k) read by rows: T(n, k) = S2(n, k)*k! + S2(n, k-1)*(k-1)! with the Stirling2 triangle S2 = A048993.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 1, 7, 12, 0, 1, 15, 50, 60, 0, 1, 31, 180, 390, 360, 0, 1, 63, 602, 2100, 3360, 2520, 0, 1, 127, 1932, 10206, 25200, 31920, 20160, 0, 1, 255, 6050, 46620, 166824, 317520, 332640, 181440, 0, 1, 511, 18660, 204630, 1020600, 2739240, 4233600, 3780000, 1814400, 0, 1, 1023, 57002, 874500, 5921520, 21538440, 46070640, 59875200, 46569600, 19958400
Offset: 0

Views

Author

Wolfdieter Lang, May 03 2017

Keywords

Comments

This triangle T(n, k) appears in the e.g.f. of the sum of powers SP(n, m) = Sum_{j=0..m} j^n, n >= 0, m >= 0 with 0^0:=1 as ESP(n, t) = exp(t)*(Sum_{k=0..n} T(n, k)*t^k/k! + t^(n+1)/(n+1)), n >= 0.
The sub-triangle T(n, k) for 1 <= k <=n, see A028246(n+1,k) (diagonal not needed).
For S2(n, m)*m! see A131689.
The columns (starting sometimes with n=k) are A000007, A000012, A000225, A028243(n-1), A028244(n-1), A028245(n-1), A032180(n-1), A228909, A228910, A228911, A228912, A228913. See below for the e.g.f.s and o.g.f.s.
The row sums are 1 for n=1 and A000629(n) - n! for n >= 1, See A285868.

Examples

			The triangle T(n, k) begins:
n\k 0  1    2     3      4       5        6        7        8        9  ...
0:  1
1:  0  1
2:  0  1    3
3:  0  1    7    12
4:  0  1   15    50     60
5:  0  1   31   180    390     360
6:  0  1   63   602   2100    3360     2520
7:  0  1  127  1932  10206   25200    31920    20160
8:  0  1  255  6050  46620  166824   317520   332640   181440
9:  0  1  511 18660 204630 1020600  2739240  4233600  3780000  1814400
...
		

Crossrefs

Programs

  • Mathematica
    Table[If[k == 0, Boole[n == 0], StirlingS2[n, k] k! + StirlingS2[n, k - 1] (k - 1)!], {n, 0, 10}, {k, 0, n}] (* Michael De Vlieger, May 08 2017 *)

Formula

T(n, k) = A131689(n, k) + A131689(n, k-1), 0 <= k <= n, with A131689(n, -1) = 0.
T(0, 0) = 1 and T(n, k) = Stirling2(n+1, k)*(k-1)! for n >= k >= 1. For Stirling2 see A048993. Stirling2(n, k)*(k-1)! = A028246(n, k) for n >= k >= 1.
Recurrence: T(0, 0) = 1, T(n, n) = (n+1)!/2, T(n, -1) = 0, T(n, k) = 0 if n < k, and T(n, k) = (k-1)*T(n-1, k-1) + k*T(n-1, k), for n > k >= 0.
E.g.f. for column k=0 is 1, and for k >= 1: Sum_{j=1..k}((-1)^(k-j) * binomial(k-1, j-1) * exp(j*x)) - x^(k-1).
O.g.f. for column k = 0 is 1, and for k >= 1: ((k-1)!*x^(k-1) / Product_{j=1..k} (1-j*x)) - (k-1)!*x^(k-1).

A344053 a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*Stirling2(n, k)*k!.

Original entry on oeis.org

1, 1, 0, -9, -40, 125, 3444, 18571, -241872, -5796711, -24387220, 1132278191, 25132445832, 8850583573, -10681029498972, -214099676807085, 1643397436986464, 176719161389104817, 2976468247699317468, -71662294521163070153, -4638920054290748840520, -55645074852328083377619
Offset: 0

Views

Author

Peter Luschny, May 10 2021

Keywords

Comments

Inverse binomial convolution of the Fubini numbers (A131689).

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(n - k) * Binomial[n, k] * StirlingS2[n, k] * k!, {k, 0, n}]; Array[a, 22, 0] (* Amiram Eldar, May 10 2021 *)
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*stirling(n, k, 2)*k!); \\ Michel Marcus, May 10 2021

Formula

a(n) = Sum_{k=0..n} (-1)^k * A219859(n,k). - Alois P. Heinz, Jan 24 2022
a(n) = n! * [x^n] (2 - exp(-x))^n. - Fabian Pereyra, Aug 31 2024

A344397 a(n) = Stirling2(n, floor(n/2)) * floor(n/2)!.

Original entry on oeis.org

1, 0, 1, 1, 14, 30, 540, 1806, 40824, 186480, 5103000, 29607600, 953029440, 6711344640, 248619571200, 2060056318320, 86355926616960, 823172919528960, 38528927611574400, 415357755774998400, 21473732319740064000, 258323865658578720000, 14620825330739032204800
Offset: 0

Views

Author

Peter Luschny, May 21 2021

Keywords

Crossrefs

Programs

  • Maple
    a := n -> add((-1)^k*binomial((2*n-1)/4 + (-1)^n/4,k)*((2*n-1)/4 + (-1)^n/4 - k)^n, k = 0..n/2):
    # Alternative, via Fubini recurrence:
    F := proc(n) option remember; if n = 0 then return 1 fi;
    expand(add(binomial(n, k)*F(n - k)*x, k = 1..n)) end:
    a := n -> coeff(F(n), x, iquo(n, 2));
    seq(a(n), n = 0..22);
  • Mathematica
    a[n_] := StirlingS2[n, Floor[n/2]] * Floor[n/2]!; Array[a, 23, 0] (* Amiram Eldar, May 22 2021 *)
  • SageMath
    def a(n): return stirling_number2(n, n//2) * factorial(n//2)
    print([a(n) for n in range(23)])

Formula

a(n) = [x^(floor(n/2))] F(n, x), the middle coefficient of the Fubini polynomial.
a(n) = Sum_{k=0..n/2} (-1)^k*binomial((2*n - 1)/4 + (-1)^n/4, k)*((2*n - 1)/4 + (-1)^n/4 - k)^n.

A348576 Triangle read by rows: T(n,k) is the number of ordered partitions of [n] into k nonempty subsets, in which the first subset has size at least 2, n >= 1 and 1 <= k <= n.

Original entry on oeis.org

0, 1, 0, 1, 3, 0, 1, 10, 12, 0, 1, 25, 80, 60, 0, 1, 56, 360, 660, 360, 0, 1, 119, 1372, 4620, 5880, 2520, 0, 1, 246, 4788, 26376, 58800, 57120, 20160, 0, 1, 501, 15864, 134316, 466704, 771120, 604800, 181440, 0, 1, 1012, 50880, 637020, 3238200, 8094240, 10584000, 6955200, 1814400, 0
Offset: 1

Views

Author

David Galvin, Oct 23 2021

Keywords

Comments

Ordered partitions are also referred to as weak orders.

Examples

			For n=3, the ordered partitions of {1,2,3} in which the first block has size at least 2 are 123, 12/3, 13/2 and 23/1, so T(3,1)=1, T(3,2)=3 and T(3,3)=0.
Triangle begins:
  0;
  1,     0;
  1,     3,     0;
  1,    10,    12,       0;
  1,    25,    80,      60,       0;
  1,    56,   360,     660,     360,       0;
  1,   119,  1372.    4620,    5880,    2520,        0;
  1,   246,  4788,   26376,   58800,   57120,    20160,        0;
  1,   501, 15864,  134316,  466704,  771120,   604800,   181440,       0;
  1,  1012, 50880,  637020, 3238200, 8094240, 10584000,  6955200, 1814400, 0;
  ...
		

Crossrefs

Row sums are A053525.

Programs

  • Maple
    b:= proc(n, t) option remember; expand(`if`(n=0, 1,
          add(x*b(n-j, 1)*binomial(n, j), j=t..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 2)):
    seq(T(n), n=1..10);  # Alois P. Heinz, Oct 24 2021
  • Mathematica
    eulerian[n_,m_] := eulerian[n,m] =
      Sum[((-1)^k)*Binomial[n+1,k]*((m+1-k)^n), {k,0,m+1}] (* eulerian[n, m] is an Eulerian number, counting the permutations of [n] with m descents *);
    op2[n_,k_] := op2[n,k] =
       Sum[(n-j)*eulerian[n-1,j-1]*Binomial[j-1,n-k-1], {j,1,n-1}] (* op2[n,k] counts ordered partitions on [n] with k parts, with first part having size at least 2 *); Table[op2[n, k],{n,1,12},{k,1,n}]
  • PARI
    TE(n, k) = sum(j=0, k, (-1)^j * (k-j)^n * binomial( n+1, j)); \\ A008292
    T(n,k) = sum(j=1, n-1, (n-j)*TE(n-1,j)*binomial(j-1,n-k-1)); \\ Michel Marcus, Oct 24 2021

Formula

T(n,k) = Sum_{j=1..n-1} (n-j)*A173018(n-1, j-1)*binomial(j-1, n-k-1).
Previous Showing 61-70 of 77 results. Next