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 25 results. Next

A036073 Triangle of coefficients arising in calculation of A002872 and A002874 (sorting numbers).

Original entry on oeis.org

1, 2, 1, 5, 1, 6, 15, 1, 11, 30, 52, 1, 20, 80, 150, 203, 1, 37, 210, 525, 780, 877, 1, 70, 560, 1785, 3395, 4263, 4140, 1, 135, 1526, 6125, 14140, 22288, 24556, 21147, 1, 264, 4240, 21420, 58842, 109998, 150402, 149040, 115975, 1, 521, 11970, 76385, 248115
Offset: 0

Views

Author

Keywords

Comments

For connection to A002872, A002874, and other columns of A162663, see the formula in A162663. - Andrey Zabolotskiy, Oct 25 2017

Examples

			Triangle begins:
  1;
  .  2;
  .  1,  5;
  .  1,  6,  15;
  .  1, 11,  30,  52;
  .  1, 20,  80, 150, 203;
  .  1, 37, 210, 525, 780, 877;
  ...
		

References

  • T. S. Motzkin, Sorting numbers for cylinders and other classification numbers, in Combinatorics, Proc. Symp. Pure Math. 19, AMS, 1971, pp. 167-176.

Crossrefs

Row sums give A001861.
Diagonal gives A000110(n+1) - Alois P. Heinz, Mar 27 2013
Cf. A162663.

Programs

  • Maple
    egf:= exp(exp(x*y)+y*(exp(x)-1)-1):
    T:= (n, k)-> n!*coeff(series(coeff(series(egf, y, k+1)
                    , y, k), x, n+1), x, n):
    seq(seq(T(n, k), k=min(n, 1)..n), n=0..10);  # Alois P. Heinz, Mar 28 2013
  • PARI
    T(n, k) = { my(y = 'y + 'y*O('y^k), x = 'x + 'x*O('x^n); ); n!*polcoeff(polcoeff(exp(exp(x*y)+y*(exp(x)-1)-1), n, 'x), k, 'y); }
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print()); /* print triangle */
    \\ Michel Marcus, Mar 27 2013
    
  • PARI
    listpols(n)= {my(z = t + t*O(t^n)); zp = exp(exp(z)-1+(exp(p*z)-1)/p); for (i=0, n, print(i!*polcoeff(zp, i, t)););} \\ Michel Marcus, Mar 27 2013

Formula

E.g.f.: exp(exp(x*y)+y*(exp(x)-1)-1).

Extensions

Edited by Vladeta Jovovic, Sep 17 2003
Name corrected by Andrey Zabolotskiy, Oct 22 2017

A005425 a(n) = 2*a(n-1) + (n-1)*a(n-2).

Original entry on oeis.org

1, 2, 5, 14, 43, 142, 499, 1850, 7193, 29186, 123109, 538078, 2430355, 11317646, 54229907, 266906858, 1347262321, 6965034370, 36833528197, 199037675054, 1097912385851, 6176578272782, 35409316648435, 206703355298074, 1227820993510153, 7416522514174082
Offset: 0

Views

Author

Keywords

Comments

Switchboard problem with n subscribers, where a subscriber who is not talking can be of either of two sexes. Subscribers who are talking cannot be distinguished by sex. See also A000085. - Karol A. Penson, Apr 15 2004
John W. Layman observes that computationally this agrees with the binomial transform of A000085.
Number of self-inverse partial permutations.
Number of '12-3 and 214-3'-avoiding permutations.
Number of matchings of the corona K'(n) of the complete graph K(n) and the complete graph K(1); in other words, K'(n) is the graph constructed from K(n) by adding for each vertex v a new vertex v' and the edge vv'. Example: a(3)=14 because in the graph with vertex set {A,B,C,a,b,c} and edge set {AB,AC,BC,Aa,Bb,Cc} we have the following matchings: (i) the empty set (1); (ii) the edges as singletons (6); (iii) {Aa,BC},{Bb,AC},{Cc,AB},{Aa,Bb},{Aa,Cc}, {Bb,Cc} (6); (iv) {Aa,Bb,Cc} (1). Row sums of A100862. - Emeric Deutsch, Jan 10 2005
Consider finite sequences of positive integers of length n with b(1)=1 and with the constraint that b(m) <= max_{0A111062. - Franklin T. Adams-Watters, Dec 21 2005, corrected Dec 31 2014
Number of n X n symmetric binary matrices with no row sum greater than 1. - R. H. Hardin, Jun 13 2008
Polynomials in A099174 evaluated at x=2 (see also formula by Deutsch below). - Johannes W. Meijer, Feb 04 2010
Equals eigensequence of triangle A128227. Example: a(5) = 142 = (1, 1, 2, 5, 14, 43) dot (1, 2, 3, 4, 5, 1) = (1 + 2 + 6 + 20 + 70 + 43); where (1, 2, 3, 4, 5, 1) = row 5 of triangle A128227. - Gary W. Adamson, Aug 27 2010
Number of words [d(1), d(2), ..., d(n)] where d(k) is either =0, or =k (a fixed point), or the only value repeating a previous fixed point, see example. - Joerg Arndt, Apr 18 2014
From Robert A. Russell, Apr 28 2018: (Start)
Stirling transform of this sequence is A002872;
Stirling transform of A005425(n-1) is A080337. (End)
Number of congruence orbits of upper-triangular n X n matrices on symmetric matrices, or the number of Borel orbits in largest sect of the type CI symmetric space Sp_{2n}(C)/GL_n(C). - Aram Bingham, Oct 10 2019
For a refined enumeration of the switchboard scenario presented by Penson above and in Donaghey and its relation to perfect matchings of simplices and an operator calculus, see A344678. - Tom Copeland, May 29 2021
Write [n] for {1, ..., n} and [n]^(k) for k-tuples without repeated entries. Then C [n]^(k) is naturally a complex S_n-representation, whose length is a(k) provided that n >= 2k. a(k) also gives the length of the countable dimensional Sym(N)-representation C N^(k), as remarked by Sam and Snowden (see link). - Jingjie Yang, Dec 28 2023

Examples

			From _Joerg Arndt_, Apr 18 2014: (Start)
The a(3) = 14 words [d(1), d(2), d(3)] where d(k) is either =0, or =k (a fixed point), or the only value repeating a previous fixed point are (dots for zeros):
# :    word        partial involution
01:  [ . . . ]    ()
02:  [ . . 3 ]    (3)
03:  [ . 2 . ]    (2)
04:  [ . 2 2 ]    (2 3)
05:  [ . 2 3 ]    (2) (3)
06:  [ 1 . . ]    (1)
07:  [ 1 . 1 ]    (1 3)
08:  [ 1 . 3 ]    (1) (3)
09:  [ 1 1 . ]    (1 2)
10:  [ 1 1 3 ]    (1 2) (3)
11:  [ 1 2 . ]    (1) (2)
12:  [ 1 2 1 ]    (1 3) (2)
13:  [ 1 2 2 ]    (1) (2 3)
14:  [ 1 2 3 ]    (1) (2) (3)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections give A093620, A100510.
Row sums of A344678.

Programs

  • Haskell
    a005425 n = a005425_list !! n
    a005425_list = 1 : 2 : zipWith (+)
       (map (* 2) (tail a005425_list)) (zipWith (*) [1..] a005425_list)
    -- Reinhard Zumkeller, Dec 18 2011
    
  • Magma
    a:=[2,5];[1] cat [n le 2 select a[n] else 2*Self(n-1) + (n-1)*Self(n-2):n in [1..30]]; // Marius A. Burtea, Oct 10 2019
    
  • Maple
    with(orthopoly): seq((-I/sqrt(2))^n*H(n,I*sqrt(2)),n=0..25);
  • Mathematica
    a[0] = 1; a[1] = 2; a[n_]:= 2a[n-1] + (n-1)*a[n-2]; Table[ a[n], {n, 0, 25}] (* or *)
    Range[0, 25]!CoefficientList[Series[Exp[2 x + x^2/2], {x, 0, 25}], x] (* or *)
    f[n_] := Sum[2^(n - 3k)n!/((n - 2k)!k!), {k, 0, n}]; Table[ f[n], {n, 0, 25}] (* or *)
    Table[(-I/Sqrt[2])^n*HermiteH[n, I*Sqrt[2]], {n, 0, 25}] (* Robert G. Wilson v, Nov 04 2005 *)
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==2a[n-1]+(n-1)a[n-2]},a,{n,30}] (* Harvey P. Dale, Sep 30 2015 *)
    a[n_] := 2^(n/2) Exp[- I n Pi/2] HypergeometricU[-n/2, 1/2, -2];
    Table[a[n], {n, 0, 22}] (* Peter Luschny, May 30 2021 *)
  • Maxima
    makelist((%i/sqrt(2))^n*hermite(n,-%i*sqrt(2)),n,0,12); /* Emanuele Munarini, Mar 02 2016 */
    
  • PARI
    A005425(n)=sum(k=0,n\2,2^(n-3*k)*n!/(n-2*k)!/k!) \\ M. F. Hasler, Jan 13 2012
    
  • SageMath
    [(-i/sqrt(2))^n*hermite(n, i*sqrt(2)) for n in range(41)] # G. C. Greubel, Nov 19 2022

Formula

E.g.f.: exp( 2*x + x^2/2 ).
a(n) = A027412(n+1)/2. - N. J. A. Sloane, Sep 13 2003
a(n) = Sum_{k=0..n} binomial(n, k)*A000085(n-k). - Philippe Deléham, Mar 07 2004
a(n) = (-i/sqrt(2))^n*H(n, i*sqrt(2)), where H(n, x) is the n-th Hermite polynomial and i = sqrt(-1). - Emeric Deutsch, Nov 24 2004
a(n) = Sum_{k=0..floor(n/2)} 2^{n-3*k}*n!/((n-2*k)!*k!). - Huajun Huang (hua_jun(AT)hotmail.com), Oct 10 2005
a(n) = (1/sqrt(2*Pi))*Integral_{x=-infinity..infinity} exp(-x^2/2)*(x+2)^n. - Groux Roland, Mar 14 2011
G.f.: 1/(1-2x-x^2/(1-2x-2x^2/(1-2x-3x^2/(1-2x-4x^2/(1-... (continued fraction).
E.g.f.: G(0) where G(k) = 1 + x*(4+x)/(4*k + 2 - x*(4+x)*(4*k+2)/(x*(4+x) + 4*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 17 2011
a(n) ~ exp(2*sqrt(n) - n/2 - 1)*n^(n/2)/sqrt(2). - Vaclav Kotesovec, Oct 08 2012
a(n) = 2^(n/2)*exp(-i*n*Pi/2)*KummerU(-n/2, 1/2, -2). - Peter Luschny, May 30 2021

Extensions

Recurrence and formula corrected by Olivier Gérard, Oct 15 1997

A162663 Table by antidiagonals, T(n,k) is the number of partitions of {1..(nk)} that are invariant under a permutation consisting of n k-cycles.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 7, 5, 1, 3, 8, 31, 15, 1, 2, 16, 42, 164, 52, 1, 4, 10, 111, 268, 999, 203, 1, 2, 28, 70, 931, 1994, 6841, 877, 1, 4, 12, 258, 602, 9066, 16852, 51790, 4140, 1, 3, 31, 106, 2892, 6078, 99925, 158778, 428131, 21147, 1, 4, 22, 329, 1144, 37778, 70402, 1224579, 1644732, 3827967, 115975
Offset: 0

Views

Author

Keywords

Comments

The upper left corner of the array is T(0,1).
Without loss of generality, the permutation can be taken to be (1 2 ... k) (k+1 k+2 ... 2k) ... ((n-1)k+1 (n-1)k+2 ... nk).
Note that it is the partition that is invariant, not the individual parts. Thus for n=k=2 with permutation (1 2)(3 4), the partition 1,3|2,4 is counted; it maps to 2,4|1,3, which is the same partition.

Examples

			The table starts:
   1,   1,   1,   1,   1
   1,   2,   2,   3,   2
   2,   7,   8,  16,  10
   5,  31,  42, 111,  70
  15, 164, 268, 931, 602
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    A:= proc(n, k) option remember; `if`(n=0, 1, add(binomial(n-1, j-1)
           *add(d^(j-1), d=divisors(k))*A(n-j, k), j=1..n))
        end:
    seq(seq(A(n, 1+d-n), n=0..d), d=0..12);  # Alois P. Heinz, Oct 29 2015
  • Mathematica
    max = 11; ClearAll[col]; col[k_] := col[k] =  CoefficientList[ Series[ Exp[ Sum[ (Exp[d*x] - 1)/d, {d, Divisors[k]}]], {x, 0, max}], x]*Range[0, max]!; t[n_, k_] := col[k][[n]]; Flatten[ Table[ t[n-k+1, k], {n, 1, max}, {k, n, 1, -1}] ] (* Jean-François Alcover, Aug 08 2012, after e.g.f. *)
  • PARI
    amat(n,m)=local(r);r=matrix(n,m,i,j,1);for(k=1,n-1,for(j=1,m,r[k+1,j]=sum (i=1,k,binomial(k-1,i-1)*sumdiv(j,d,r[k-i+1,j]*d^(i-1)))));r
    acol(n,k)=local(fn);fn=exp(sumdiv(k,d,(exp(d*x+x*O(x^n))-1)/d));vector(n+ 1,i,polcoeff(fn,i-1)*(i-1)!)

Formula

E.g.f. for column k: exp(Sum_{d|k} (exp(d*x) - 1) / d).
Equivalently, column k is the exponential transform of a(n) = Sum_{d|k} d^(n-1); this represents a set of n k-cycles, each repeating the same d elements (parts), but starting in different places.
T(n,k) = Sum_{P a partition of n} SP(P) * Product_( (sigma_{i-1}(k))^(P(i)-1) ), where SP is A036040 or A080575, and P(i) is the number of parts in P of size i.
T(n,k) = Sum_{j=0..n-1} A036073(n,j)*k^(n-1-j). - Andrey Zabolotskiy, Oct 22 2017

Extensions

Offset set to 0 by Alois P. Heinz, Oct 29 2015

A049020 Triangle of numbers a(n,k), 0 <= k <= n: number of set partitions of {1,2,...,n} in which exactly k of the blocks have been distinguished.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 5, 10, 6, 1, 15, 37, 31, 10, 1, 52, 151, 160, 75, 15, 1, 203, 674, 856, 520, 155, 21, 1, 877, 3263, 4802, 3556, 1400, 287, 28, 1, 4140, 17007, 28337, 24626, 11991, 3290, 490, 36, 1, 21147, 94828, 175896, 174805, 101031, 34671, 6972, 786, 45, 1
Offset: 0

Views

Author

Keywords

Comments

Triangle a(n,k) read by rows; given by [1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is Deléham's operator defined in A084938.
Exponential Riordan array [exp(exp(x)-1), exp(x)-1]. - Paul Barry, Jan 12 2009
Equal to A048993*A007318. - Philippe Deléham, Oct 31 2011
This lower unitriangular array is the L factor in the LU decomposition of the Hankel matrix (Bell(i+j-2))A000110(n).%20The%20U%20factor%20is%20A059098%20(see%20Chamberland,%20p.%201672).%20-%20_Peter%20Bala">i,j >= 1, where Bell(n) = A000110(n). The U factor is A059098 (see Chamberland, p. 1672). - _Peter Bala, Oct 15 2023

Examples

			Triangle begins:
   1;
   1,  1;
   2,  3,  1;
   5, 10,  6,  1;
  15, 37, 31, 10,  1;
  ...
From _Paul Barry_, Jan 12 2009: (Start)
Production array begins
  1, 1;
  1, 2, 1;
  0, 2, 3, 1;
  0, 0, 3, 4, 1;
  0, 0, 0, 4, 5, 1;
  ... (End)
		

Crossrefs

First column gives A000110, second column = A005493.
Third column = A003128, row sums = A001861, A059340.
See A244489 for another version of this triangle.

Programs

  • Maple
    a:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
          `if`(n=0, 1, a(n-1, k-1) +(k+1)*(a(n-1, k) +a(n-1, k+1))))
        end:
    seq(seq(a(n, k), k=0..n), n=0..15);  # Alois P. Heinz, Nov 30 2012
  • Mathematica
    a[n_, k_] = Sum[StirlingS2[n, i]*Binomial[i, k], {i, 0, n}]; Flatten[Table[a[n, k], {n, 0, 9}, {k, 0, n}]]
    (* Jean-François Alcover, Aug 29 2011, after Vladeta Jovovic *)
  • PARI
    T(n,k)=if(k<0 || k>n,0,n!*polcoeff(polcoeff(exp((1+y)*(exp(x+x*O(x^n))-1)),n),k))
    
  • Sage
    def A049020_triangle(dim):
        M = matrix(ZZ, dim, dim)
        for n in (0..dim-1): M[n, n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n, k] = M[n-1, k-1]+(k+1)*M[n-1, k]+(k+1)*M[n-1, k+1]
        return M
    A049020_triangle(9) # Peter Luschny, Sep 19 2012

Formula

a(n,k) = a(n-1, k-1) + (k+1)*a(n-1, k) + (k+1)*a(n-1, k+1), n >= 1.
a(n,k) = Sum_{i=0..n} Stirling2(n,i)*binomial(i,k). - Vladeta Jovovic, Jan 27 2001
E.g.f. for the k-th column is (1/k!)*(exp(x)-1)^k*exp(exp(x)-1). - Vladeta Jovovic, Jan 27 2001
G.f.: 1/(1-x-xy-x^2(1+y)/(1-2x-xy-2x^2(1+y)/(1-3x-xy-3x^2(1+y)/(1-4x-xy-4x^2(1+y)/(1-... (continued fraction). - Paul Barry, Apr 29 2009
E.g.f.: exp((y+1)*(exp(x)-1)). - Geoffrey Critzer, Nov 30 2012
Note that A244489 (which is essentially the same triangle) has the formula T(n,k) = Sum_{j=k..n} binomial(n,j)*Stirling_2(j,k)*Bell(n-j), where Bell(n) = A000110(n), for n >= 1, 0 <= k <= n-1. - N. J. A. Sloane, May 17 2016
a(2n,n) = A245109(n). - Alois P. Heinz, Aug 23 2017
Empirical: a(n,k) = p(1^n)[st(1^k)] (see A002872 for notation). - Andrey Zabolotskiy, Oct 17 2017
a(n,k) = Sum_{j=0..k} (-1)^(k-j)*A046716(k, k-j)*Bell(n + j)/k!. - Peter Luschny, Dec 06 2023

Extensions

More terms from James Sellers.
Better definition from Geoffrey Critzer, Nov 30 2012.

A080107 Number of fixed points of permutation of SetPartitions under {1,2,...,n}->{n,n-1,...,1}. Number of symmetric arrangements of non-attacking rooks on upper half of n X n chessboard.

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 31, 59, 164, 339, 999, 2210, 6841, 16033, 51790, 127643, 428131, 1103372, 3827967, 10269643, 36738144, 102225363, 376118747, 1082190554, 4086419601, 12126858113, 46910207114, 143268057587, 566845074703, 1778283994284, 7186474088735
Offset: 0

Views

Author

Wouter Meeussen, Mar 15 2003

Keywords

Comments

Even-numbered terms a(2k) are A002872: 2,7,31,164,999 ("Sorting numbers"); odd-numbered terms are its binomial transform, A080337. The symmetrical set partitions of {-n,...,-1,0,1,...,n} can be classified by the partition containing 0. Thus we get the sum over k of {n choose k} times the number of symmetrical set partitions of 2n-2k elements. - Don Knuth, Nov 23 2003
Number of partitions of n numbers that are symmetrical and cannot be nested (i.e., include a pattern of the form abab). - Douglas Boffey, May 21 2015
Number of achiral color patterns in a row or loop of length n. Two color patterns are equivalent if the colors are permuted. - Robert A. Russell, Apr 23 2018
Also the number of self-complementary set partitions of {1, ..., n}. The complement of a set partition pi of {1, ..., n} is defined as n + 1 - pi (elementwise) on page 3 of Callan. For example, the complement of {{1,5},{2},{3,6},{4}} is {{1,4},{2,6},{3},{5}}. - Gus Wiseman, Feb 13 2019

Examples

			Of the set partitions of 4, the following 7 are invariant under 1->4, 2->3, 3->2, 4->1: {{1,2,3,4}}, {{1,2},{3,4}}, {{1,4},{2,3}}, {{1,3},{2,4}}, {{1},{2,3},{4}}, {{1,4},{2},{3}}, {{1},{2},{3},{4}}, so a(4)=7.
For a(4)=7, the row patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, and ABCD (same as previous example).  The loop patterns are AAAA, AAAB, AABB, AABC, ABAB, ABAC, and ABCD. - _Robert A. Russell_, Apr 23 2018
From _Gus Wiseman_, Feb 13 2019: (Start)
The a(1) = 1 through a(5) = 12 self-complementary set partitions:
  {{1}}  {{12}}    {{123}}      {{1234}}        {{12345}}
         {{1}{2}}  {{13}{2}}    {{12}{34}}      {{1245}{3}}
                   {{1}{2}{3}}  {{13}{24}}      {{135}{24}}
                                {{14}{23}}      {{15}{234}}
                                {{1}{23}{4}}    {{1}{234}{5}}
                                {{14}{2}{3}}    {{12}{3}{45}}
                                {{1}{2}{3}{4}}  {{135}{2}{4}}
                                                {{14}{25}{3}}
                                                {{15}{24}{3}}
                                                {{1}{24}{3}{5}}
                                                {{15}{2}{3}{4}}
                                                {{1}{2}{3}{4}{5}}
(End)
		

References

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

Crossrefs

Programs

  • Mathematica
    < Range[n, 1, -1]]; t= 1 + RankSetPartition /@ t; t= ToCycles[t]; t= Cases[t, {_Integer}]; Length[t], {n, 7}]
    (* second program: *)
    QB[n_, q_] := QB[n, q] = Sum[QB[j, q] QBinomial[n-1, j, q], {j, 0, n-1}] // FunctionExpand // Simplify; QB[0, q_]=1; QB[1, q_]=1; Table[cc = CoefficientList[QB[n, q], q]; cc.Table[(-1)^(k+1), {k, 1, Length[cc]}], {n, 0, 30}] (* Jean-François Alcover, Feb 29 2016, after Paul D. Hanna *)
    (* Ach[n, k] is the number of achiral color patterns for a row or loop of n
      colors containing exactly k different colors *)
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0],
      k Ach[n-2, k] + Ach[n-2, k-1] + Ach[n-2, k-2]]
    Table[Sum[Ach[n, k], {k, 0, n}], {n, 0, 30}] (* Robert A. Russell, Apr 23 2018 *)
    x[n_] := x[n] = If[n < 2, n+1, 2x[n-1] + (n-1)x[n-2]]; (* A005425 *)
    Table[Sum[StirlingS2[Ceiling[n/2], k] x[k-Mod[n, 2]], {k, 0, Ceiling[n/2]}],
      {n, 0, 30}] (* Robert A. Russell, Apr 27 2018, after Knuth reference *)

Formula

Knuth gives recurrences and generating functions.
a(n) = Sum_{k=0..t(n)} (-1)^k*A125810(n,k) where A125810 is a triangle of coefficients for a q-analog of the Bell numbers and t(n)=A125811(n)-1. - Paul D. Hanna, Jan 19 2009
From Robert A. Russell, Apr 23 2018: (Start)
a(n) = Sum_{k=0..n} Ach(n,k) where
Ach(n,k) = [n>1]*(k*Ach(n-2,k)+Ach(n-2,k-1)+Ach(n-2,k-2)) + [n<2]*[n==k]*[n>=0].
a(n) = 2*A103293(n+1) - A000110(n). (End)
a(n) = [n==0 mod 2]*Sum_{k=0..n/2} Stirling2(n/2, k)*A005425(k) + [n==1 mod 2] * Sum_{k=1..(n+1)/2} Stirling2((n+1)/2, k) * A005425(k-1). (from Knuth reference)
a(n) = 2*A084708(n) - A084423(n). - Robert A. Russell, Apr 27 2018

Extensions

Offset set to 0 by Alois P. Heinz, May 23 2015

A002874 The number of partitions of {1..3n} that are invariant under a permutation consisting of n 3-cycles.

Original entry on oeis.org

1, 2, 8, 42, 268, 1994, 16852, 158778, 1644732, 18532810, 225256740, 2933174842, 40687193548, 598352302474, 9290859275060, 151779798262202, 2600663778494172, 46609915810749130, 871645673599372868, 16971639450858467002, 343382806080459389676
Offset: 0

Views

Author

Keywords

Comments

Original name: Sorting numbers.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

u[n,j] generates for j=1, A000110; j=2, A002872; j=3, this sequence; j=4, A141003; j=5, A036075; j=6, A141004; j=7, A036077. - Wouter Meeussen, Dec 06 2008
Equals column 3 of A162663. - Michel Marcus, Mar 27 2013
Row sums of A294201.

Programs

  • Maple
    S:= series(exp( (exp(3*x) - 4)/3 + exp(x)), x, 31):
    seq(coeff(S,x,j)*j!, j=0..30); # Robert Israel, Oct 30 2015
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add((1+
          3^(j-1))*binomial(n-1, j-1)*a(n-j), j=1..n))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 17 2017
  • Mathematica
    u[0,j_]:=1;u[k_,j_]:=u[k,j]=Sum[Binomial[k-1,i-1]Plus@@(u[k-i,j]#^(i-1)&/@Divisors[j]),{i,k}]; Table[u[n,3],{n,0,12}] (* Wouter Meeussen, Dec 06 2008 *)
    mx = 16; p = 3; Range[0, mx]! CoefficientList[ Series[ Exp[ (Exp[p*x] - p - 1)/p + Exp[x]], {x, 0, mx}], x] (* Robert G. Wilson v, Dec 12 2012 *)
    Table[Sum[Binomial[n,k] * 3^k * BellB[k, 1/3] * BellB[n-k], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Jun 29 2022 *)

Formula

E.g.f.: exp( (exp(3*x) - 4)/3 + exp(x) ).
a(n) ~ exp(exp(3*r)/3 + exp(r) - 4/3 - n) * (n/r)^(n + 1/2) / sqrt((1 + 3*r)*exp(3*r) + (1 + r)*exp(r)), where r = LambertW(3*n)/3 - 1/(1 + 3/LambertW(3*n) + n^(2/3) * (1 + LambertW(3*n)) * (3/LambertW(3*n))^(5/3)). - Vaclav Kotesovec, Jul 03 2022
a(n) ~ (3*n/LambertW(3*n))^n * exp(n/LambertW(3*n) + (3*n/LambertW(3*n))^(1/3) - n - 4/3) / sqrt(1 + LambertW(3*n)). - Vaclav Kotesovec, Jul 10 2022

Extensions

New name from Danny Rorabaugh, Oct 24 2015

A306024 Number A(n,k) of length-n restricted growth strings (RGS) with growth <= k and first element in [k]; 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, 2, 0, 1, 3, 7, 5, 0, 1, 4, 15, 31, 15, 0, 1, 5, 26, 95, 164, 52, 0, 1, 6, 40, 214, 717, 999, 203, 0, 1, 7, 57, 405, 2096, 6221, 6841, 877, 0, 1, 8, 77, 685, 4875, 23578, 60619, 51790, 4140, 0, 1, 9, 100, 1071, 9780, 67354, 297692, 652595, 428131, 21147, 0
Offset: 0

Views

Author

Alois P. Heinz, Jun 17 2018

Keywords

Comments

A(n,k) counts strings [s_1, ..., s_n] with 1 <= s_i <= k + max(0, max_{j

Examples

			A(2,3) = 15: 11, 12, 13, 14, 21, 22, 23, 24, 25, 31, 32, 33, 34, 35, 36.
A(4,1) = 15: 1111, 1112, 1121, 1122, 1123, 1211, 1212, 1213, 1221, 1222, 1223, 1231, 1232, 1233, 1234.
Square array A(n,k) begins:
  1,   1,    1,     1,      1,       1,       1,       1, ...
  0,   1,    2,     3,      4,       5,       6,       7, ...
  0,   2,    7,    15,     26,      40,      57,      77, ...
  0,   5,   31,    95,    214,     405,     685,    1071, ...
  0,  15,  164,   717,   2096,    4875,    9780,   17689, ...
  0,  52,  999,  6221,  23578,   67354,  160201,  335083, ...
  0, 203, 6841, 60619, 297692, 1044045, 2943277, 7117789, ...
		

Crossrefs

Main diagonal gives A306025.
Antidiagonal sums give A306026.
Cf. A305962.

Programs

  • Maple
    b:= proc(n, k, m) option remember; `if`(n=0, 1,
          add(b(n-1, k, max(m, j)), j=1..m+k))
        end:
    A:= (n, k)-> b(n, k, 0):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= (n, k)-> n!*coeff(series(exp(add(
        (exp(j*x)-1)/j, j=1..k)), x, n+1), x, n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, k_, m_] := b[n, k, m] = If[n==0, 1, Sum[b[n-1, k, Max[m, j]], {j, 1, m+k}]];
    A[n_, k_] := b[n, k, 0];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 27 2019, after Alois P. Heinz *)

Formula

E.g.f. of column k: exp(Sum_{j=1..k} (exp(j*x)-1)/j).

A293181 Irregular triangle read by rows: T(n,k) is the number of k-partitions of {1..2n} that are invariant under a permutation consisting of n 2-cycles (1 <= k <= 2n).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 1, 7, 10, 9, 3, 1, 1, 15, 38, 53, 34, 18, 4, 1, 1, 31, 130, 265, 261, 195, 80, 30, 5, 1, 1, 63, 422, 1221, 1700, 1696, 1016, 515, 155, 45, 6, 1, 1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1
Offset: 1

Author

Andrew Howroyd, Oct 01 2017

Keywords

Comments

See A002872 for detailed description.
T(m,k) is the number of achiral color patterns in a row or loop of length 2m using exactly k different colors. Two color patterns are equivalent if we permute the colors. - Robert A. Russell, Apr 24 2018
T(n,k) = coefficient of x^k for A(2,n)(x) in Gilbert and Riordan's article. - Robert A. Russell, Jun 14 2018

Examples

			Triangle begins:
  1,   1;
  1,   3,    2,    1;
  1,   7,   10,    9,     3,     1;
  1,  15,   38,   53,    34,    18,     4,    1;
  1,  31,  130,  265,   261,   195,    80,   30,    5,    1;
  1,  63,  422, 1221,  1700,  1696,  1016,  515,  155,   45,   6,  1;
  1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1;
  ...
For T(2,2)=3, the row patterns are AABB, ABAB, and ABBA.  The loop patterns are AAAB, AABB, and ABAB. - _Robert A. Russell_, Apr 24 2018
		

Crossrefs

Row sums are A002872.
Maximum row values are A002873.
Number of achiral color patterns of length odd n in A140735.
Column k=3 gives A056182.

Programs

  • Mathematica
    (* Ach[n, k] is the number of achiral color patterns for a row or loop of n
      colors containing k different colors *)
    Ach[n_, k_] := Ach[n, k] = Which[0==k, Boole[0==n], 1==k, Boole[n>0],
      OddQ[n], Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1], {i, 0, (n-1)/2}],
      True, Sum[Binomial[n/2-1, i] (Ach[n-2-2i, k-1]
      + 2^i Ach[n-2-2i, k-2]), {i, 0, n/2-1}]]
    Table[Ach[n, k], {n, 2, 14, 2}, {k, 1, n}] // Flatten
    (* Robert A. Russell, Feb 06 2018 *)
    Table[Drop[MatrixPower[Table[Switch[j-i, 0, i-1, 1, 1, 2, 1, _, 0],
      {i, 1, 2n+1}, {j, 1, 2n+1}], n][[1]], 1], {n, 1, 10}] // Flatten
    (* Robert A. Russell, Apr 14 2018 *)
    Aeven[m_, k_] := Aeven[m, k] = If[m>0, k Aeven[m-1, k] + Aeven[m-1, k-1]
      + Aeven[m-1, k-2], Boole[m == 0 && k == 0]]
    Table[Aeven[m, k], {m, 1, 10}, {k, 1, 2m}] // Flatten (* Robert A. Russell, Apr 24 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k) = 2*NonequivalentStructsExactly(CylinderPerms(2,n),k) - stirling(2*n,k,2);
    
  • PARI
    seq(n)={Vec(serlaplace(exp(y*(exp(x + O(x*x^n))-1)+(1/2)*y^2*(exp(2*x + O(x*x^n))-1))) - 1)}
    {my(T=seq(10)); for(n=1, #T, for(k=1, 2*n, print1(polcoeff(T[n], k), ", ")); print)} \\ Andrew Howroyd, Jan 31 2018

Formula

T(n,k) = coefficient of t^k x^n/n! in exp(t*(exp(x)-1)+(1/2)*t^2*(exp(2*x)-1)). - Ira M. Gessel, Jan 30 2018
T(m,k) = [m>0]*(k*T(m-1,k)+T(m-1,k-1)+T(m-1,k-2)) + [m==0]*[k==0]. - Robert A. Russell, Apr 24 2018
Conjecture: T(n,k) = R(n,k)-R(n,k-1), with R(n,k) = Sum_{m=0..k} m^n*A000085(m)*A038205(k-m)/(m!*(k-m)!). - Mikhail Kurkov, Jun 26 2018

A002873 The maximal number of partitions of {1..2n} that are invariant under a permutation consisting of n 2-cycles, and which have the same number of nonempty parts.

Original entry on oeis.org

1, 1, 3, 10, 53, 265, 1700, 13097, 96796, 829080, 8009815, 75604892, 808861988, 9175286549, 106167118057, 1320388106466, 16950041305210, 233232366601078, 3243603207488124, 47776065074368313, 733990397879859192, 11515503147927664816, 189107783918416912912
Offset: 0

Keywords

Comments

Previous name was: Sorting numbers (see Motzkin article for details).
Since a(n) by definition is the largest among some positive integers, whose sum is A002872(n), we always have the relation a(n) <= A002872(n); and for n > 0 the inequality is strict, since then that sum consists of more than one term. - Jörgen Backelin, Jan 13 2016

Examples

			There are three partitions of {1,2,3,4} into two (nonempty) parts, and which are invariant under the permutation (1,2)(3,4), namely {{1,2}, {3,4}}, {{1,3}, {2,4}}, and {{1,4}, {2,3}}. There are also one such partition with just one part, two with three parts, and one with four parts; but three is the largest of these amounts. Thus, a(2) = 3.
Similarly, there are ten (1,2)(3,4)(5,6) invariant partitions of {1,2,3,4,5,6} into three nonempty parts, and no larger amount into any other given number of parts, whence a(3) = 10.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000262 (the parent sequence of this family), A002872.
Maximum row values of A293181.

Extensions

Name changed and example added by Jörgen Backelin, Jan 13 2016
a(7)-a(8) from Sean A. Irvine, Jun 19 2016
a(9)-a(22) from Andrew Howroyd, Oct 01 2017

A002875 Sorting numbers (see Motzkin article for details).

Original entry on oeis.org

1, 2, 4, 24, 128, 880, 7440
Offset: 0

Keywords

Comments

How is the sequence defined (see the links in A000262)? Also more terms would be welcome.
Based on the Motzkin article, where this sequence appears in the last row of the table on p. 173, one would expect that this sequence is the same as A294202. However, they seem to be unrelated. So the true definition of this sequence is a mystery. - Andrew Howroyd and Andrey Zabolotskiy, Oct 25 2017

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Showing 1-10 of 25 results. Next