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

A002866 a(0) = 1; for n > 0, a(n) = 2^(n-1)*n!.

Original entry on oeis.org

1, 1, 4, 24, 192, 1920, 23040, 322560, 5160960, 92897280, 1857945600, 40874803200, 980995276800, 25505877196800, 714164561510400, 21424936845312000, 685597979049984000, 23310331287699456000, 839171926357180416000, 31888533201572855808000, 1275541328062914232320000
Offset: 0

Views

Author

Keywords

Comments

Consider the set of n-1 odd numbers from 3 to 2n-1, i.e., {3, 5, ..., 2n-1}. There are 2^(n-1) subsets from {} to {3, 5, 7, ..., 2n-1}; a(n) = the sum of the products of terms of all the subsets. (Product for empty set = 1.) a(4) = 1 + 3 + 5 + 7 + 3*5 + 3*7 + 5*7 + 3*5*7 = 192. - Amarnath Murthy, Sep 06 2002
Also, a(n-1) is the number of ways to lace a shoe that has n pairs of eyelets such that there is a straight (horizontal) connection between all adjacent eyelet pairs. - Hugo Pfoertner, Jan 27 2003
This is also the denominator of the integral of ((1-x^2)^(n-1/2))/(Pi/4) where x ranges from 0 to 1. The numerator is (2*x)!/(x!*2^x). In both cases n starts at 1. E.g., the denominator when n=3 is 24 and the numerator is 15. - Al Hakanson (hawkuu(AT)excite.com), Oct 17 2003
Number of ways to use the elements of {1,...,n} once each to form a sequence of nonempty lists. - Bob Proctor, Apr 18 2005
Row sums of A131222. - Paul Barry, Jun 18 2007
Number of rotational symmetries of an n-cube. The number of all symmetries of an n-cube is A000165. See Egan for signed cycle notation, other notes, tables and animation. - Jonathan Vos Post, Nov 28 2007
1, 4, 24, 192, 1920, ... is the exponential (or binomial) convolution of 1, 1, 3, 15, 105, ... and 1, 3, 15, 105, 945 (A001147). - David Callan, Jul 25 2008
The n-th term of this sequence is the number of regions into which n-dimensional space is partitioned by the 2n hyperplanes of the form x_i=x_j and x_i=-x_j (for 1 <= i < j <= n). - Edward Scheinerman (ers(AT)jhu.edu), May 04 2008
a(n) is the number of ways to seat n churchgoers into pews and then linearly order the nonempty pews. - Geoffrey Critzer, Mar 16 2009
Equals the row sums of A156992. - Geoffrey Critzer, Mar 05 2010
From Gary W. Adamson, May 17 2010: (Start)
Next term in the series = (1, 3, 5, 7, ...) dot (1, 1, 4, 24, ...);
e.g., a(5) = 1920 = (1, 3, 5, 7, 9) dot (1, 1, 4, 24, 192) = (1 + 3 + 20 + 168 + 1728). (End)
a(n) is the number of ways to represent the permutations of {1,2,...,n} in cycle notation, taking into account that we can permute the order of all cycles and also have k ways to write a length-k cycle.
For positive n, a(n) equals the permanent of the n X n matrix with consecutive integers 1 to n along the main diagonal, consecutive integers 2 to n along the subdiagonal, and 1's everywhere else. - John M. Campbell, Jul 10 2011
From Dennis P. Walsh, Nov 26 2011: (Start)
Number of ways to arrange n books on consecutive bookshelves.
To derive a(n) = n!2^(n-1), we note that there are n! ways to arrange the books in a row. Then there are 2^(n-1) ways to place the arranged books on consecutive shelves since there are 2^(n-1) ordered partitions of n. Hence a(n) = n!2^(n-1).
Also, a(n) is the number of ways to stack n different alphabet blocks in contiguous stacks.
Furthermore, a(n) is the number of labeled, rooted forests that have (i) each root labeled larger than any nonroot, (ii) each root having exactly one child node, (iii) n non-root nodes, and (iv) each node in the forest with at most one child node.
Example: a(3)=24 since there are 24 arrangements of books b1, b2, and b3 on consecutive shelves, namely, |b1 b2 b3|, |b1 b3 b2|, |b2 b1 b3|, |b2 b3 b1|, |b3 b1 b2|, |b3 b2 b1|, |b1 b2||b3|, |b2 b1| |b3|, |b1 b3||b2|, |b3 b1||b2|, |b2 b3||b1|, |b3 b2||b1|, |b1||b2 b3|,|b1||b3 b2|, |b2||b1 b3|, |b2||b3 b1|, |b3||b1 b2|, |b3||b2 b1|, |b1||b2||b3|, |b1||b3||b2|, |b2||b1||b3|, |b2||b3||b1|, |b3||b1||b2|, and |b3||b2||b1|.
(End)
For n > 3, a(n) is the order of the Coxeter group (also called Weyl group) of type D_n. - Tom Edgar, Nov 05 2013

Examples

			For the shoe lacing: with the notation introduced in A078602 the a(3-1) = 4 "straight" lacings for 3 pairs of eyelets are: 125346, 125436, 134526, 143526. Their mirror images 134256, 143256, 152346, 152436 are not counted.
a(3) = 24 because the 24 rotations of a three-dimensional cube fall into four distinct classes:
(i) the identity, which leaves everything fixed;
(ii) 9 rotations which leave the centers of two faces fixed, comprising rotations of 90, 180 and 270 degrees for each of 3 pairs of faces;
(iii) 6 rotations which leave the centers of two edges fixed, comprising rotations of 180 degrees for each of 6 pairs of edges;
(iv) 8 rotations which leave two vertices fixed, comprising rotations of 120 and 240 degrees for each of 4 pairs of vertices. For an n-cube, rotations can be more complex. For example, in 4 dimensions a rotation can either act in a single plane, such as the x-y plane, while leaving any vectors orthogonal to that plane unchanged, or it can act in two orthogonal planes, performing rotations in both and leaving no vectors fixed. In higher dimensions, there will be room for more planes and more choices as to the number of planes in which a given rotation acts.
		

References

  • N. Bourbaki, Groupes et alg. de Lie, Chap. 4, 5, 6, p. 257.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.26)
  • 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

Bisections give A002671 and A274304.
Appears in A167584 (n >= 1); equals the row sums of A167594 (n >= 1). - Johannes W. Meijer, Nov 12 2009

Programs

  • FORTRAN
    See Pfoertner link.
    
  • Magma
    [1] cat [2^(n-1)*Factorial(n): n in [1..25]]; // G. C. Greubel, Jun 13 2019
    
  • Maple
    A002866 := n-> `if`(n=0,1,2^(n-1)*n!):
    with(combstruct); SeqSeqL := [S, {S=Sequence(U,card >= 1), U=Sequence(Z,card >=1)},labeled];
    seq(ceil(count(Subset(n))*count(Permutation(n))/2),n=0..17); # Zerinvary Lajos, Oct 16 2006
    G(x):=(1-x)/(1-2*x): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1],x) od:x:=0:seq(f[n],n=0..17); # Zerinvary Lajos, Apr 04 2009
  • Mathematica
    Join[{1},Table[2^(n-1) n!,{n,25}]] (* Harvey P. Dale, Sep 27 2013 *)
    a[n_] := (-1)^n Hypergeometric2F1Regularized[1, -n, 2 - n, 2];
    Table[a[n], {n, 0, 20}]  (* Peter Luschny, Apr 26 2024 *)
  • PARI
    a(n)=if(n,n!<<(n-1),1) \\ Charles R Greathouse IV, Jan 13 2012
    
  • PARI
    a(n) = if(n == 0, 1, 2^(n-1)*n!);
    vector(25, n, a(n-1)) \\ Altug Alkan, Oct 18 2015
    
  • Sage
    [1] + [2^(n-1)*factorial(n) for n in (1..25)] # G. C. Greubel, Jun 13 2019

Formula

E.g.f.: (1 - x)/(1 - 2*x). - Paul Barry, May 26 2003, corrected Jun 18 2007
a(n) = n! * A011782(n).
For n >= 1, a(n) = Sum_{i=0..m/2} (-1)^i * binomial(n, i) * (n-2*i)^n. - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
a(n) ~ 2^(1/2) * Pi^(1/2) * n^(3/2) * 2^n * e^(-n) * n^n*{1 + 13/12*n^(-1) + ...}. - Joe Keane (jgk(AT)jgk.org), Nov 23 2001
E.g.f. is B(A(x)), where B(x) = 1/(1 - x) and A(x) = x/(1 - x). - Geoffrey Critzer, Mar 16 2009
a(n) = Sum_{k=1..n} A156992(n,k). - Dennis P. Walsh, Nov 26 2011
a(n+1) = Sum_{k=0..n} A132393(n,k)*2^(n+k), n>0. - Philippe Deléham, Nov 28 2011
G.f.: 1 + x/(1 - 4*x/(1 - 2*x/(1 - 6*x/(1 - 4*x/(1 - 8*x/(1 - 6*x/(1 - 10*x/(1 - ... (continued fraction). - Philippe Deléham, Nov 29 2011
a(n) = 2*n*a(n-1) for n >= 2. - Dennis P. Walsh, Nov 29 2011
G.f.: (1 + 1/G(0))/2, where G(k) = 1 + 2*x*k - 2*x*(k + 1)/G(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Aug 02 2012
G.f.: 1 + x/Q(0), m=4, where Q(k) = 1 - m*x*(2*k + 1) - m*x^2*(2*k + 1)*(2*k + 2)/(1 - m*x*(2*k + 2) - m*x^2*(2*k + 2)*(2*k + 3)/Q(k+1)) ; (continued fraction). - Sergei N. Gladkovskii, Sep 23 2013
G.f.: 1 + x/(G(0) - x), where G(k) = 1 + x*(k+1) - 4*x*(k + 1)/(1 - x*(k + 2)/G(k+1)); (continued fraction). - Sergei N. Gladkovskii, Dec 24 2013
a(n) = Sum_{k=0..n} L(n,k)*k!; L(n,k) are the unsigned Lah numbers. - Peter Luschny, Oct 18 2014
a(n) = round(Sum_{k >= 1} log(k)^n/k^(3/2))/4, for n >= 1, which is related to the n-th derivative of zeta(x) evaluated at x = 3/2. - Richard R. Forberg, Jan 02 2015
a(n) = n!*hypergeom([-n+1], [], -1) for n>=1. - Peter Luschny, Apr 08 2015
From Amiram Eldar, Aug 04 2020: (Start)
Sum_{n >= 0} 1/a(n) = 2*sqrt(e) - 1.
Sum_{n >= 0} (-1)^n/a(n) = 2/sqrt(e) - 1. (End)

A256893 Exponential Riordan array [1, 1/(2-e^x)-1].

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 13, 9, 1, 0, 75, 79, 18, 1, 0, 541, 765, 265, 30, 1, 0, 4683, 8311, 3870, 665, 45, 1, 0, 47293, 100989, 59101, 13650, 1400, 63, 1, 0, 545835, 1362439, 960498, 278901, 38430, 2618, 84, 1, 0, 7087261, 20246445, 16700545, 5844510, 1012431, 92610, 4494, 108, 1
Offset: 0

Views

Author

Peter Luschny, Apr 17 2015

Keywords

Comments

This is also the matrix product of the Stirling set numbers and the unsigned Lah numbers.
This is also the Bell transform of A000670(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 29 2016

Examples

			Number triangle starts:
  1;
  0,    1;
  0,    3,     1;
  0,   13,     9,     1;
  0,   75,    79,    18,    1;
  0,  541,   765,   265,   30,   1;
  ...
		

Crossrefs

Cf. A088729 which is a variant based on an (1,1)-offset of the number triangles.
Cf. A131222 which is the matrix product of the unsigned Lah numbers and the Stirling cycle numbers.

Programs

  • Maple
    T:= (n, k)-> n!*coeff(series((1/(2-exp(x))-1)^k/k!, x, n+1), x, n):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Apr 17 2015
    # The function BellMatrix is defined in A264428.
    BellMatrix(n -> polylog(-n-1, 1/2)/2, 9); # Peter Luschny, Jan 29 2016
  • Mathematica
    T[n_, k_] := n!*SeriesCoefficient[(1/(2 - Exp[x]) - 1)^k/k!, {x, 0, n}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 23 2016, after Alois P. Heinz *)
    (* The function BellMatrix is defined in A264428. *)
    BellMatrix[PolyLog[-#-1, 1/2]/2&, 9] (* Jean-François Alcover, May 23 2016, after Peter Luschny *)
    RiordanArray[d_, h_, n_] := RiordanArray[d, h, n, False];
    RiordanArray[d_Function|d_Symbol, h_Function|h_Symbol, n_, exp_:(True | False)] := Module[{M, td, th, k, m},
    M[, ] = 0;
    td = PadRight[CoefficientList[d[x] + O[x]^n, x], n];
    th = PadRight[CoefficientList[h[x] + O[x]^n, x], n];
    For[k = 0, k <= n - 1, k++, M[k, 0] = td[[k + 1]]];
    For[k = 1, k <= n - 1, k++,
      For[m = k, m <= n - 1, m++,
        M[m, k] = Sum[M[j, k - 1]*th[[m - j + 1]], {j, k - 1, m - 1}]]];
    If[exp,
      u = 1;
      For[k = 1, k <= n - 1, k++,
        u *= k;
        For[m = 0, m <= k, m++,
          j = If[m == 0, u, j/m];
          M[k, m] *= j]]];
    Table[M[m, k], {m, 0, n - 1}, {k, 0, m}]];
    RiordanArray[1&, 1/(2 - Exp[#])-1&, 10, True] // Flatten (* Jean-François Alcover, Jul 16 2019, after Sage program *)
  • Sage
    def riordan_array(d, h, n, exp=false):
        def taylor_list(f,n):
            t = SR(f).taylor(x,0,n-1).list()
            return t + [0]*(n-len(t))
        td = taylor_list(d,n)
        th = taylor_list(h,n)
        M = matrix(QQ,n,n)
        for k in (0..n-1): M[k,0] = td[k]
        for k in (1..n-1):
            for m in (k..n-1):
                M[m,k] = add(M[j,k-1]*th[m-j] for j in (k-1..m-1))
        if exp:
            u = 1
            for k in (1..n-1):
                u *= k
                for m in (0..k):
                    j = u if m==0 else j/m
                    M[k,m] *= j
        return M
    riordan_array(1, 1/(2-exp(x)) - 1, 8, exp=true)
    # As a matrix product:
    def Lah(n, k):
        if n == k: return 1
        if k<0 or  k>n: return 0
        return (k*n*gamma(n)^2)/(gamma(k+1)^2*gamma(n-k+1))
    matrix(ZZ, 8, stirling_number2)*matrix(ZZ, 8, Lah)

Formula

Row sums are given by A075729.
T(n,1) = A000670(n) for n>=1.
T(n,k) = n!/k! * [x^n] (1/(2-exp(x))-1)^k. - Alois P. Heinz, Apr 17 2015

A079638 Matrix product of unsigned Lah-triangle |A008297(n,k)| and unsigned Stirling1-triangle |A008275(n,k)|.

Original entry on oeis.org

1, 3, 1, 14, 9, 1, 90, 83, 18, 1, 744, 870, 275, 30, 1, 7560, 10474, 4275, 685, 45, 1, 91440, 143892, 70924, 14805, 1435, 63, 1, 1285200, 2233356, 1274196, 324289, 41160, 2674, 84, 1, 20603520, 38769840, 24870572, 7398972, 1151409, 98280, 4578
Offset: 1

Views

Author

Vladeta Jovovic, Jan 30 2003

Keywords

Comments

Matrix product of unsigned Lah-triangle |A008297(n,k)| and Stirling1-triangle A008275(n,k) is unsigned Stirling1-triangle |A008275(n,k)|.
Also the Bell transform of A029767(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 26 2016
Essentially the same as A131222. - Peter Bala, Feb 12 2022

Examples

			Triangle begins
     1;
     3,     1;
    14,     9,    1;
    90,    83,   18,   1;
   744,   870,  275,  30,  1;
  7560, 10474, 4275, 685, 45, 1;
  ...
		

Crossrefs

Cf. A002866 (row sums), A029767 (first column), A131222.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    # Adds (1, 0, 0, 0, ..) as column 0.
    BellMatrix(n -> n!*(2^(n+1)-1), 9); # Peter Luschny, Jan 26 2016
  • Mathematica
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    B = BellMatrix[Function[n, n! (2^(n + 1) - 1)], rows = 12];
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)

Formula

T(n, k) = Sum_{i=k..n} |A008297(n, i)| * |A008275(i, k)|.
E.g.f.: ((1-x)/(1-2*x))^y. - Vladeta Jovovic, Nov 22 2003

A256892 Triangular array read by rows, the matrix product of the unsigned Lah numbers and the Stirling set numbers, T(n,k) for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 13, 9, 1, 0, 73, 79, 18, 1, 0, 501, 755, 265, 30, 1, 0, 4051, 7981, 3840, 665, 45, 1, 0, 37633, 93135, 57631, 13580, 1400, 63, 1, 0, 394353, 1192591, 911582, 274141, 38290, 2618, 84, 1, 0, 4596553, 16645431, 15285313, 5633922, 999831, 92358, 4494, 108, 1
Offset: 0

Views

Author

Peter Luschny, Apr 12 2015

Keywords

Comments

Also the Bell transform of A000262(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 29 2016

Examples

			Triangle starts:
1;
0,    1;
0,    3,    1;
0,   13,    9,    1;
0,   73,   79,   18,   1;
0,  501,  755,  265,  30,  1;
0, 4051, 7981, 3840, 665, 45, 1;
		

Crossrefs

See also A088814 and A088729 for variants based on an (1,1)-offset of the number triangles. See A131222 for the product Lah * Stirling-cycle.
A079640 is an unsigned matrix inverse reduced to an (1,1)-offset.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    BellMatrix(n -> simplify(hypergeom([-n, -n-1], [], 1)), 9); # Peter Luschny, Jan 29 2016
  • Mathematica
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    B = BellMatrix[Function[n, HypergeometricPFQ[{-n, -n-1}, {}, 1]], rows = 12];
    Table[B[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)
  • SageMath
    def Lah(n, k):
        if n == k: return 1
        if k<0 or  k>n: return 0
        return (k*n*gamma(n)^2)/(gamma(k+1)^2*gamma(n-k+1))
    matrix(ZZ, 8, Lah) * matrix(ZZ, 8, stirling_number2)  # as a square matrix

Formula

T(n+1,1) = A000262(n).
T(n+1,n) = A045943(n).
Row sums are A084357.
Showing 1-4 of 4 results.