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

A011971 Aitken's array: triangle of numbers {a(n,k), n >= 0, 0 <= k <= n} read by rows, defined by a(0,0)=1, a(n,0) = a(n-1,n-1), a(n,k) = a(n,k-1) + a(n-1,k-1).

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 5, 7, 10, 15, 15, 20, 27, 37, 52, 52, 67, 87, 114, 151, 203, 203, 255, 322, 409, 523, 674, 877, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147, 21147, 25287, 30304, 36401, 43833, 52922, 64077, 77821, 94828, 115975
Offset: 0

Views

Author

Keywords

Comments

Also called the Bell triangle or the Peirce triangle.
a(n,k) is the number of equivalence relations on {0, ..., n} such that k is not equivalent to n, k+1 is not equivalent to n, ..., n-1 is not equivalent to n. - Don Knuth, Sep 21 2002 [Comment revised by Thijs van Ommen (thijsvanommen(AT)gmail.com), Jul 13 2008]
Named after the New Zealand mathematician Alexander Craig Aitken (1895-1967). - Amiram Eldar, Jun 11 2021

Examples

			Triangle begins:
00:       1
01:       1      2
02:       2      3      5
03:       5      7     10     15
04:      15     20     27     37     52
05:      52     67     87    114    151    203
06:     203    255    322    409    523    674    877
07:     877   1080   1335   1657   2066   2589   3263   4140
08:    4140   5017   6097   7432   9089  11155  13744  17007  21147
09:   21147  25287  30304  36401  43833  52922  64077  77821  94828 115975
10:  115975 137122 162409 192713 229114 272947 325869 389946 467767 562595 678570
...
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 205.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 212.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).
  • Charles Sanders Peirce, On the Algebra of Logic, American Journal of Mathematics, Vol. 3, pages 15-57, 1880. Reprinted in Collected Papers (1935-1958) and in Writings of Charles S. Peirce: A Chronological Edition (Indiana University Press, Bloomington, IN, 1986).
  • Jeffrey Shallit, A triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.

Crossrefs

Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, etc., A011968, A011969. Cf. A046934, A011972 (duplicates removed).
Main diagonal is in A094577. Mirror image is in A123346.

Programs

  • GAP
    T:=Flat(List([0..9],n->List([0..n],k->Sum([0..k],i->Binomial(k,i)*Bell(n-k+i))))); # Muniru A Asiru, Oct 26 2018
  • Haskell
    a011971 n k = a011971_tabl !! n !! k
    a011971_row n = a011971_tabl !! n
    a011971_tabl = iterate (\row -> scanl (+) (last row) row) [1]
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Maple
    A011971 := proc(n,k) option remember; if n=0 and k=0 then 1 elif k=0 then A011971(n-1,n-1) else A011971(n,k-1)+A011971(n-1,k-1); fi: end;
    for n from 0 to 12 do lprint([ seq(A011971(n,k),k=0..n) ]); od:
    # Compare the analogue algorithm for the Catalan numbers in A030237.
    BellTriangle := proc(len) local P, T, n; P := [1]; T := [[1]];
    for n from 1 to len - 1 do P := ListTools:-PartialSums([P[-1], op(P)]);
    T := [op(T), P] od; T end:
    BellTriangle(6); ListTools:-Flatten(%); # Peter Luschny, Mar 26 2022
  • Mathematica
    a[0, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Flatten[ Table[ a[n, k], {n, 0, 9}, {k, 0, n}]] (* Robert G. Wilson v, Mar 27 2004 *)
    Flatten[Table[Sum[Binomial[k, i]*BellB[n-k+i], {i, 0, k}], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, May 24 2016, after Vladeta Jovovic *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011971 = blist = [1]
    for _ in range(10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A011971 += blist # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 19 2014
    

Formula

Double-exponential generating function: Sum_{n, k} a(n-k, k) x^n y^k / n! k! = exp(e^{x+y}-1+x). - Don Knuth, Sep 21 2002 [U coordinates, reversed]
a(n,k) = Sum_{i=0..k} binomial(k,i)*Bell(n-k+i). - Vladeta Jovovic, Oct 15 2006

Extensions

Peirce reference from Jon Awbrey, Mar 11 2002
Reference to my paper from Jeffrey Shallit, Jan 23 2015
Moved a comment to A056857 where it belonged. - N. J. A. Sloane, May 02 2015.

A020556 Number of oriented multigraphs on n labeled arcs (without loops).

Original entry on oeis.org

1, 1, 7, 87, 1657, 43833, 1515903, 65766991, 3473600465, 218310229201, 16035686850327, 1356791248984295, 130660110400259849, 14177605780945123273, 1718558016836289502159, 230999008481288064430879, 34208659263890939390952225, 5549763869122023099520756513
Offset: 0

Views

Author

Gilbert Labelle (gilbert(AT)lacim.uqam.ca) and Simon Plouffe

Keywords

Comments

Generalized Bell numbers: a(n) = Sum_{k=2..2*n} A078739(n,k), n >= 1.
Let B_{m}(x) = Sum_{j>=0} exp(j!/(j-m)!*x-1)/j! then
a(n) = n! [x^n] taylor(B_{2}(x)), where [x^n] denotes the coefficient of x^n in the Taylor series for B_{2}(x). a(n) is row 2 of the square array representation of A090210. - Peter Luschny, Mar 27 2011
Also the number of set partitions of {1,2,...,2n+1} such that the block |n+1| is a part but no block |m| with m < n+1. - Peter Luschny, Apr 03 2011

Examples

			Example: For n = 2 the a(2) = 7 are the number of set partitions of 5 such that the block |3| is a part but no block |m| with m < 3: 3|1245, 3|4|125, 3|5|124, 3|12|45, 3|14|25, 3|15|24, 3|4|5|12. - _Peter Luschny_, Apr 05 2011
		

References

  • G. Paquin, Dénombrement de multigraphes enrichis, Mémoire, Math. Dept., Univ. Québec à Montréal, 2004.

Crossrefs

Programs

  • Maple
    A020556 := proc(n) local k;
    add((-1)^(n+k)*binomial(n,k)*combinat[bell](n+k),k=0..n) end:
    seq(A020556(n),n=0..17); # Peter Luschny, Mar 27 2011
    # Uses floating point arithmetic, increase working precision for large n.
    A020556 := proc(n) local r,s,i;
    if n=0 then 1 else r := [seq(3,i=1..n-1)]; s := [seq(1,i=1..n-1)];
    exp(-x)*2^(n-1)*hypergeom(r,s,x); round(evalf(subs(x=1,%),99)) fi end:
    seq(A020556(n),n=0..15); # Peter Luschny, Mar 30 2011
    T := proc(n, k) option remember;
      if n = 1 then 1
    elif n = k then T(n-1,1) - T(n-1,n-1)
    else T(n-1,k) + T(n, k+1) fi end:
    A020556 := n -> T(2*n+1,n+1);
    seq(A020556(n), n = 0..99); # Peter Luschny, Apr 03 2011
  • Mathematica
    f[n_] := f[n] = Sum[(k + 2)!^n/((k + 2)!*(k!^n)*E), {k, 0, Infinity}]; Table[ f[n], {n, 1, 16}]
    (* Second program: *)
    a[n_] := Sum[(-1)^k*Binomial[n, k]*BellB[2n-k], {k, 0, n}]; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Jul 11 2017, after Vladeta Jovovic *)
  • PARI
    a(n)={my(bell=serlaplace(exp(exp(x + O(x^(2*n+1)))-1))); sum(k=0, n, (-1)^k*binomial(n,k)*polcoef(bell, 2*n-k))} \\ Andrew Howroyd, Jan 13 2020

Formula

a(n) = e*Sum_{k>=0} ((k+2)!^n/(k+2)!)*(k!^n), n>=1.
a(n) = (1/e)*Sum_{k>=2} (k*(k-1))^n/k!, n >= 1. a(0) := 1. (From eq.(26) with r=2 of the Schork reference.)
E.g.f.: (1/e)*(2 + Sum_{k>=2} ((exp(k*(k-1)*x))/k!)) (from top of p. 4656 of the Schork reference).
a(n) = Sum_{k=0..n} (-1)^k*binomial(n, k)*Bell(2*n-k). - Vladeta Jovovic, May 02 2004
a(n) = A095149(2n,n). - Alois P. Heinz, Dec 20 2018
a(n) = A106436(2n,n) = A182930(2n+1,n+1). - Alois P. Heinz, Jan 29 2019

Extensions

Edited by Robert G. Wilson v, Apr 30 2002

A008278 Reflected triangle of Stirling numbers of 2nd kind, S(n,n-k+1), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 25, 15, 1, 1, 15, 65, 90, 31, 1, 1, 21, 140, 350, 301, 63, 1, 1, 28, 266, 1050, 1701, 966, 127, 1, 1, 36, 462, 2646, 6951, 7770, 3025, 255, 1, 1, 45, 750, 5880, 22827, 42525, 34105, 9330, 511, 1
Offset: 1

Views

Author

Keywords

Comments

The n-th row also gives the coefficients of the sigma polynomial of the empty graph \bar K_n. - Eric W. Weisstein, Apr 07 2017
The n-th row also gives the coefficients of the independence polynomial of the (n-1)-triangular honeycomb bishop graph. - Eric W. Weisstein, Apr 03 2018
From Gus Wiseman, Aug 11 2020: (Start)
Conjecture: also the number of divisors of the superprimorial A006939(n - 1) that have 0 <= k <= n distinct prime factors, all appearing with distinct multiplicities. For example, row n = 4 counts the following divisors of 360:
1 2 12 360
3 18
4 20
5 24
8 40
9 45
72
Equivalently, T(n,k) is the number of length-n vectors 0 <= v_i <= i with k nonzero values, all of which are distinct.
Crossrefs:
A006939 lists superprimorials or Chernoff numbers.
A022915 counts permutations of prime indices of superprimorials.
A076954 can be used instead of A006939.
A130091 lists numbers with distinct prime multiplicities.
A181796 counts divisors with distinct prime multiplicities.
A336420 is the version counting all prime factors, not just distinct ones.
(End)
From Leonidas Liponis, Aug 26 2024: (Start)
It appears that this sequence is related to the combinatorial form of Faà di Bruno's formula. Specifically, the number of terms for the n-th derivative of a composite function y = f(g(x)) matches the number of partitions of n.
For example, consider the case where g(x) = e^x, in which all derivatives of g(x) are equal. The first 5 rows of A008278 appear as the factors of derivatives of f(x), highlighted here in brackets:
dy/dx = [ 1 ] * f'(e^x) * e^x
d^2y/dx^2 = [ 1 ] * f''(e^x) * e^{2x} + [ 1 ] * f'(e^x) * e^x
d^3y/dx^3 = [ 1 ] * f'''(e^x) * e^{3x} + [ 3 ] * f''(e^x) * e^{2x} + [ 1 ] * f'(e^x) * e^x
d^4y/dx^4 = [ 1 ] * f''''(e^x) * e^{4x} + [ 6 ] * f'''(e^x) * e^{3x} + [ 7 ] * f''(e^x) * e^{2x} + [ 1 ] * f'(e^x) * e^x
d^5y/dx^5 = [ 1 ] * f'''''(e^x) * e^{5x} + [ 10 ] * f''''(e^x) * e^{4x} + [ 25 ] * f'''(e^x) * e^{3x} + [ 15 ] * f''(e^x) * e^{2x} + [ 1 ] * f'(e^x) * e^x
This pattern is observed in Mathematica for the first 10 cases, using the code below.
(End)

Examples

			The e.g.f. of [0,0,1,7,25,65,...], the k=3 column of A008278, but with offset n=0, is exp(x)*(1*(x^2)/2! + 4*(x^3)/3! + 3*(x^4)/4!).
Triangle starts:
  1;
  1,  1;
  1,  3,   1;
  1,  6,   7,    1;
  1, 10,  25,   15,    1;
  1, 15,  65,   90,   31,    1;
  1, 21, 140,  350,  301,   63,    1;
  1, 28, 266, 1050, 1701,  966,  127,   1;
  1, 36, 462, 2646, 6951, 7770, 3025, 255, 1;
  ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., 1994.

Crossrefs

See A008277 and A048993, which are the main entries for this triangle of numbers.

Programs

  • Haskell
    a008278 n k = a008278_tabl !! (n-1) !! (k-1)
    a008278_row n = a008278_tabl !! (n-1)
    a008278_tabl = iterate st2 [1] where
      st2 row = zipWith (+) ([0] ++ row') (row ++ [0])
                where row' = reverse $ zipWith (*) [1..] $ reverse row
    -- Reinhard Zumkeller, Jun 22 2013
    
  • Mathematica
    rows = 10; Flatten[Table[StirlingS2[n, k], {n, 1, rows}, {k, n, 1, -1}]] (* Jean-François Alcover, Nov 17 2011, *)
    Table[CoefficientList[x^n BellB[n, 1/x], x], {n, 10}] // Flatten (* Eric W. Weisstein, Apr 05 2017 *)
    n = 5; Grid[Prepend[Transpose[{Range[1, n], Table[D[f[Exp[x]], {x, i}], {i, 1, n}]}], {"Order","Derivative"}], Frame -> All, Spacings -> {2, 1}] (* Leonidas Liponis, Aug 27 2024 *)
  • PARI
    for(n=1,10,for(k=1,n,print1(stirling(n,n-k+1,2),", "))) \\ Hugo Pfoertner, Aug 30 2020

Formula

T(n, k)=0 if n < k, T(n, 0)=0, T(1, 1)=1, T(n, k) = (n-k+1)*T(n-1, k-1) + T(n-1, k) otherwise.
O.g.f. for the k-th column: 1/(1-x) if k=1 and A(k,x):=((x^k)/(1-x)^(2*k+1))*Sum_{m=0..k-1} A008517(k,m+1)*x^m if k >= 2. A008517 is the second-order Eulerian triangle. Cf. p. 257, eq. (6.43) of the R. L. Graham et al. book. - Wolfdieter Lang, Oct 14 2005
E.g.f. for the k-th column (with offset n=0): E(k,x):=exp(x)*Sum_{m=0..k-1} A112493(k-1,m)*(x^(k-1+m))/(k-1+m)! if k >= 1. - Wolfdieter Lang, Oct 14 2005
a(n) = abs(A213735(n-1)). - Hugo Pfoertner, Sep 07 2020

Extensions

Name edited by Gus Wiseman, Aug 11 2020

A271466 Number T(n,k) of set partitions of [n] such that k is the largest element of the last block; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 1, 4, 10, 0, 1, 6, 15, 30, 0, 1, 10, 29, 59, 104, 0, 1, 18, 63, 139, 250, 406, 0, 1, 34, 149, 365, 692, 1145, 1754, 0, 1, 66, 375, 1039, 2110, 3627, 5649, 8280, 0, 1, 130, 989, 3149, 6932, 12521, 20085, 29874, 42294, 0, 1, 258, 2703, 10039, 24190, 46299, 77133, 117488, 168509, 231950
Offset: 1

Views

Author

Alois P. Heinz, Apr 08 2016

Keywords

Comments

Each set partition is written as a sequence of blocks, ordered by the smallest elements in the blocks.

Examples

			T(1,1) = 1: 1.
T(2,2) = 2: 12, 1|2.
T(3,2) = 1: 13|2.
T(3,3) = 4: 123, 12|3, 1|23, 1|2|3.
T(4,2) = 1: 134|2.
T(4,3) = 4: 124|3, 14|23, 14|2|3, 1|24|3.
T(4,4) = 10: 1234, 123|4, 12|34, 12|3|4, 13|24, 13|2|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
T(5,2) = 1: 1345|2.
T(5,3) = 6: 1245|3, 145|23, 145|2|3, 14|25|3, 15|24|3, 1|245|3.
T(5,4) = 15: 1235|4, 125|34, 125|3|4, 12|35|4, 135|24, 135|2|4, 13|25|4, 15|234, 15|23|4, 1|235|4, 15|2|34, 1|25|34, 15|2|3|4, 1|25|3|4, 1|2|35|4.
Triangle T(n,k) begins:
  1;
  0, 2;
  0, 1,   4;
  0, 1,   4,  10;
  0, 1,   6,  15,   30;
  0, 1,  10,  29,   59,  104;
  0, 1,  18,  63,  139,  250,   406;
  0, 1,  34, 149,  365,  692,  1145,  1754;
  0, 1,  66, 375, 1039, 2110,  3627,  5649,  8280;
  0, 1, 130, 989, 3149, 6932, 12521, 20085, 29874, 42294;
  ...
		

Crossrefs

Columns k=1-10 give: A000007(n-1), A054977(n-2), A052548(n-3) for n>3, A271743, A271744, A271745, A271746, A271747, A271748, A271749.
Main diagonal gives A186021(n-1).
Lower diagonals d=1-10 give: A271752, A271753, A271754, A271755, A271756, A271757, A271758, A271759, A271760, A271761.
Row sums give A000110.
T(2n,n) gives A271467.
T(2n+1,n+1) gives A271607.
Cf. A095149 (k is maximum of the first block), A113547 (k is minimum of the last block).

Programs

  • Maple
    b:= proc(n, m, c) option remember; `if`(n=0, x^c, add(
          b(n-1, max(m, j), `if`(j>=m, n, c)), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, n-i), i=0..n-1))(b(n, 0$2)):
    seq(T(n), n=1..12);
  • Mathematica
    b[n_, m_, c_] := b[n, m, c] = If[n == 0, x^c, Sum[b[n-1, Max[m, j], If[j >= m, n, c]], {j, 1, m+1}]];
    T[n_] := Function[p, Table[Coefficient[p, x, n-i], {i, 0, n-1}]][b[n, 0, 0]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 24 2016, translated from Maple *)

Formula

T(n,n) = 2 * A000110(n-1) = 2 * Sum_{j=0..n-1} T(n-1,j) for n>1.

A095151 a(n+3) = 3*a(n+2) - 2*a(n+1) + 1 with a(0)=0, a(1)=2.

Original entry on oeis.org

0, 2, 7, 18, 41, 88, 183, 374, 757, 1524, 3059, 6130, 12273, 24560, 49135, 98286, 196589, 393196, 786411, 1572842, 3145705, 6291432, 12582887, 25165798, 50331621, 100663268, 201326563, 402653154, 805306337, 1610612704, 3221225439
Offset: 0

Views

Author

Gary W. Adamson, May 30 2004

Keywords

Comments

A sequence generated from a Bell difference row matrix, companion to A095150.
A095150 uses the same recursion rule but the multiplier [1 1 1] instead of [1 0 0].
For n>0, (a(n)) is row 2 of the convolution array A213568. - Clark Kimberling, Jun 20 2012
For n>0, (a(n)) is row 2 of the convolution array A213568. - Clark Kimberling, Jun 20 2012

Examples

			a(6) = 183 = 3*88 -2*41 + 1.
		

Crossrefs

Programs

  • GAP
    List([0..30], n-> 3*2^n -(n+3)); # G. C. Greubel, Jul 26 2019
  • Magma
    [3*2^n -(n+3): n in [0..30]]; // G. C. Greubel, Jul 26 2019
    
  • Mathematica
    Table[3*2^n -(n+3), {n,0,30}] (* G. C. Greubel, Jul 26 2019 *)
  • PARI
    vector(30, n, n--; 3*2^n -(n+3)) \\ G. C. Greubel, Jul 26 2019
    
  • Sage
    [3*2^n -(n+3) for n in (0..30)] # G. C. Greubel, Jul 26 2019
    

Formula

Let M = a 3 X 3 matrix having Bell triangle difference terms (A095149 is composed of differences of the Bell triangle A011971): (fill in the 3 X 3 matrix with zeros): [1 0 0 / 1 1 0 / 2 1 2] = M. Then M^n * [1 0 0] = [1 n a(n)]. E.g. a(4) = 41 since M^4 * [1 0 0] = [1 4 41].
a(n) = 3*2^n -(n+3) = 2*a(n-1) + n +1 = A000295(n+2) - A000079(n). For n>0, a(n) = A077802(n). - Henry Bottomley, Oct 25 2004
From Colin Barker, Apr 23 2012: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: x*(2-x)/((1-x)^2*(1-2*x)). (End)
a(n) = A125128(n) + A000225(n). - Miquel Cerda, Aug 07 2016
a(n) = 2*A125128(n) - A000325(n) + 1. - Miquel Cerda, Aug 12 2016
a(n) = A125128(n) + A000325(n) + n - 1. - Miquel Cerda, Aug 27 2016
E.g.f.: 3*exp(2*x) - (3+x)*exp(x). - G. C. Greubel, Jul 26 2019
Let Prod_{i=0..n-1} (1+x^{2^i}+x^{2*2^i}) = Sum_{j=0..d} b_j x^j, where d=2^{n+1}-2. Then a(n) = Sum_{j=0..d-1} b_j/b_{j+1} (proved). - Richard Stanley, Aug 27 2019

Extensions

Edited by Robert G. Wilson v, Jun 05 2004
Deleted a comment and file that were unrelated to this sequence. - N. J. A. Sloane, Aug 17 2025

A048742 a(n) = n! - (n-th Bell number).

Original entry on oeis.org

0, 0, 0, 1, 9, 68, 517, 4163, 36180, 341733, 3512825, 39238230, 474788003, 6199376363, 86987391878, 1306291409455, 20912309745853, 355604563226196, 6401691628921841, 121639267666626943, 2432850284018404628, 51090467301893283249, 1123996221061869232677
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of [n] which have at least one cycle that has at least one inversion when written with its smallest element in the first position. Example: a(4)=9 because we have (1)(243), (1432), (142)(3), (132)(4), (1342), (1423), (1243), (143)(2) and (1324). - Emeric Deutsch, Apr 29 2008
Number of permutations of [n] having consecutive runs of increasing elements with initial elements in increasing order. a(4) = 9: `124`3, `13`24, `134`2, `14`23, `14`3`2, `2`14`3, `24`3`1, `3`14`2, `4`13`2. - Alois P. Heinz, Apr 27 2016
From Gus Wiseman, Aug 11 2020: (Start)
Also the number of divisors of the superfactorial A006939(n - 1) without distinct prime multiplicities. For example, the a(4) = 9 divisors together with their prime signatures are the following. Note that A076954 can be used here instead of A006939.
6: (1,1)
10: (1,1)
15: (1,1)
30: (1,1,1)
36: (2,2)
60: (2,1,1)
90: (1,2,1)
120: (3,1,1)
180: (2,2,1)
(End)

Crossrefs

A000110 lists Bell numbers.
A000142 lists factorial numbers.
A006939 lists superprimorials or Chernoff numbers.
A181796 counts divisors with distinct prime multiplicities.
A336414 counts divisors of n! with distinct prime multiplicities.

Programs

Formula

a(n) = A000142(n) - A000110(n).
E.g.f.: 1/(1-x) - exp(exp(x)-1). - Alois P. Heinz, Apr 27 2016

A340598 Number of balanced set partitions of {1..n}.

Original entry on oeis.org

0, 1, 0, 3, 3, 10, 60, 210, 700, 3556, 19845, 105567, 550935, 3120832, 19432413, 127949250, 858963105, 5882733142, 41636699676, 307105857344, 2357523511200, 18694832699907, 152228641035471, 1270386473853510, 10872532998387918, 95531590347525151
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2021

Keywords

Comments

A set partition is balanced if it has exactly as many blocks as the greatest size of a block.

Examples

			The a(1) = 1 through a(5) = 10 balanced set partitions (empty column indicated by dot):
  {{1}}  .  {{1},{2,3}}  {{1,2},{3,4}}  {{1},{2},{3,4,5}}
            {{1,2},{3}}  {{1,3},{2,4}}  {{1},{2,3,4},{5}}
            {{1,3},{2}}  {{1,4},{2,3}}  {{1,2,3},{4},{5}}
                                        {{1},{2,3,5},{4}}
                                        {{1,2,4},{3},{5}}
                                        {{1},{2,4,5},{3}}
                                        {{1,2,5},{3},{4}}
                                        {{1,3,4},{2},{5}}
                                        {{1,3,5},{2},{4}}
                                        {{1,4,5},{2},{3}}
		

Crossrefs

The unlabeled version is A047993 (A106529).
A000110 counts set partitions.
A000670 counts ordered set partitions.
A113547 counts set partitions by maximin.
Other balance-related sequences:
- A010054 counts balanced strict integer partitions (A002110).
- A098124 counts balanced integer compositions.
- A340596 counts co-balanced factorizations.
- A340599 counts alt-balanced factorizations.
- A340600 counts unlabeled balanced multiset partitions.
- A340653 counts balanced factorizations.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Length[#]==Max@@Length/@#&]],{n,0,8}]
  • PARI
    \\ D(n,k) counts balanced set partitions with k blocks.
    D(n,k)={my(t=sum(i=1, k, x^i/i!) + O(x*x^n)); n!*polcoef(t^k - (t-x^k/k!)^k, n)/k!}
    a(n)={sum(k=sqrtint(n), (n+1)\2, D(n,k))} \\ Andrew Howroyd, Mar 14 2021

Extensions

Terms a(12) and beyond from Andrew Howroyd, Mar 14 2021

A094002 a(n+3) = 3*a(n+2) - 2*a(n+1) + 1 with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 14, 33, 72, 151, 310, 629, 1268, 2547, 5106, 10225, 20464, 40943, 81902, 163821, 327660, 655339, 1310698, 2621417, 5242856, 10485735, 20971494, 41943013, 83886052, 167772131, 335544290, 671088609, 1342177248, 2684354527
Offset: 0

Views

Author

Gary W. Adamson, May 30 2004

Keywords

Comments

A sequence generated from the Bell difference row triangle (as a matrix).
Companion sequence A095151 has the same recursion rule but is generated from the multiplier [1 0 0] instead of [1 1 1].
a(n) is the sum of the terms in row n of a triangle with first column T(n,0) = (n+1)*(n+2)/2 and diagonal T(n,n) = n+1; T(i,j) = T(i-1,j-1) + T(i-1,j). - J. M. Bergot, Jun 26 2018

Examples

			a(9) = 2547 = 3*a(8) - 2*a(7) + 1 = 3*1268 - 2*629 + 1 = 3804 - 1258 + 1.
		

Crossrefs

Programs

  • Magma
    [5*2^n -(n+4): n in [0..35]]; // G. C. Greubel, Dec 27 2021
    
  • Mathematica
    a[n_]:= (MatrixPower[{{1,0,0}, {1,1,0}, {2,1,2}}, n].{{1}, {1}, {1}})[[3, 1]]; Table[a[n], {n, 35}] (* Robert G. Wilson v, Jun 01 2004 *)
    LinearRecurrence[{4,-5,2},{1,5,14},40] (* Harvey P. Dale, Jan 20 2021 *)
  • PARI
    vector(35, n, 5*2^(n-1) -(n+3)) \\ Harry J. Smith, Jun 16 2009; edited Dec 27 2021
    
  • Sage
    [5*2^n -(n+4) for n in (0..35)] # G. C. Greubel, Dec 27 2021

Formula

Let M = a 3 X 3 matrix formed from A095149 rows (fill in with zeros): {1, 0, 0 ; 1, 1, 0 ; 2, 1, 2}. Then M^n * {1, 1, 1} = {1, n+1, a(n)}.
a(n) = 5*2^n - n - 4 = 2*a(n-1) + n + 2 = A000247(n) + A000079(n). - Henry Bottomley, Oct 25 2004
From Colin Barker, Apr 23 2012: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: (1+x-x^2)/((1-x)^2*(1-2*x)). (End)

Extensions

More terms from Robert G. Wilson v, Jun 01 2004

A123346 Mirror image of the Bell triangle A011971, which is also called the Pierce triangle or Aitken's array.

Original entry on oeis.org

1, 2, 1, 5, 3, 2, 15, 10, 7, 5, 52, 37, 27, 20, 15, 203, 151, 114, 87, 67, 52, 877, 674, 523, 409, 322, 255, 203, 4140, 3263, 2589, 2066, 1657, 1335, 1080, 877, 21147, 17007, 13744, 11155, 9089, 7432, 6097, 5017, 4140, 115975, 94828, 77821, 64077, 52922, 43833, 36401, 30304, 25287, 21147
Offset: 0

Views

Author

N. J. A. Sloane, Oct 14 2006

Keywords

Comments

a(n,k) is k-th difference of Bell numbers, with a(n,1) = A000110(n) for n>0, a(n,k) = a(n,k-1) - a(n-1, k-1), k<=n, with diagonal (k=n) also equal to Bell numbers (n>=0). - Richard R. Forberg, Jul 13 2013
From Don Knuth, Jan 29 2018: (Start)
If the offset here is changed from 0 to 1, then we can say:
a(n,k) is the number of equivalence classes of [n] in which 1 not equiv to 2, ..., 1 not equiv to k.
In Volume 4A, page 418, I pointed out that a(n,k) is the number of set partitions in which k is the smallest of its block.
And in exercise 7.2.1.5--33, I pointed out that a(n,k) is the number of equivalence relations in which 1 not equiv to 2, 2 not equiv to 3, ..., k-1 not equiv to k. (End)

Examples

			Triangle begins:
    1
    2   1
    5   3   2
   15  10   7  5
   52  37  27 20 15
  203 151 114 87 67 52
  ...
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).

Crossrefs

Cf. A011971. Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, A011968, A011969, A046934, A011972, A094577, A095149, A106436, A108041, A108042, A108043.

Programs

  • Haskell
    a123346 n k = a123346_tabl !! n !! k
    a123346_row n = a123346_tabl !! n
    a123346_tabl = map reverse a011971_tabl
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Mathematica
    a[n_, k_] := Sum[Binomial[n - k, i - k] BellB[i], {i, k, n}];
    Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Aug 03 2018 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A123346_list = blist = [1]
    for _ in range(2*10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A123346_list += reversed(blist)
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

a(n,k) = Sum_{i=k..n} binomial(n-k,i-k)*Bell(i). - Vladeta Jovovic, Oct 14 2006

Extensions

More terms from Alexander Adamchuk and Vladeta Jovovic, Oct 14 2006
Showing 1-9 of 9 results.