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.

A001563 a(n) = n*n! = (n+1)! - n!.

Original entry on oeis.org

0, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, 36288000, 439084800, 5748019200, 80951270400, 1220496076800, 19615115520000, 334764638208000, 6046686277632000, 115242726703104000, 2311256907767808000, 48658040163532800000, 1072909785605898240000
Offset: 0

Views

Author

Keywords

Comments

A similar sequence, with the initial 0 replaced by 1, namely A094258, is defined by the recurrence a(2) = 1, a(n) = a(n-1)*(n-1)^2/(n-2). - Andrey Ryshevich (ryshevich(AT)notes.idlab.net), May 21 2002
Denominators in power series expansion of E_1(x) + gamma + log(x), x > 0. - Michael Somos, Dec 11 2002
If all the permutations of any length k are arranged in lexicographic order, the n-th term in this sequence (n <= k) gives the index of the permutation that rotates the last n elements one position to the right. E.g., there are 24 permutations of 4 items. In lexicographic order they are (0,1,2,3), (0,1,3,2), (0,2,1,3), ... (3,2,0,1), (3,2,1,0). Permutation 0 is (0,1,2,3), which rotates the last 1 element, i.e., it makes no change. Permutation 1 is (0,1,3,2), which rotates the last 2 elements. Permutation 4 is (0,3,1,2), which rotates the last 3 elements. Permutation 18 is (3,0,1,2), which rotates the last 4 elements. The same numbers work for permutations of any length. - Henry H. Rich (glasss(AT)bellsouth.net), Sep 27 2003
Stirling transform of a(n+1)=[4,18,96,600,...] is A083140(n+1)=[4,22,154,...]. - Michael Somos, Mar 04 2004
From Michael Somos, Apr 27 2012: (Start)
Stirling transform of a(n)=[1,4,18,96,...] is A069321(n)=[1,5,31,233,...].
Partial sums of a(n)=[0,1,4,18,...] is A033312(n+1)=[0,1,5,23,...].
Binomial transform of A000166(n+1)=[0,1,2,9,...] is a(n)=[0,1,4,18,...].
Binomial transform of A000255(n+1)=[1,3,11,53,...] is a(n+1)=[1,4,18,96,...].
Binomial transform of a(n)=[0,1,4,18,...] is A093964(n)=[0,1,6,33,...].
Partial sums of A001564(n)=[1,3,4,14,...] is a(n+1)=[1,4,18,96,...].
(End)
Number of small descents in all permutations of [n+1]. A small descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) =1. Example: a(2)=4 because there are 4 small descents in the permutations 123, 13\2, 2\13, 231, 312, 3\2\1 of {1,2,3} (shown by \). a(n)=Sum_{k=0..n-1}k*A123513(n,k). - Emeric Deutsch, Oct 02 2006
Equivalently, in the notation of David, Kendall and Barton, p. 263, this is the total number of consecutive ascending pairs in all permutations on n+1 letters (cf. A010027). - N. J. A. Sloane, Apr 12 2014
a(n-1) is the number of permutations of n in which n is not fixed; equivalently, the number of permutations of the positive integers in which n is the largest element that is not fixed. - Franklin T. Adams-Watters, Nov 29 2006
Number of factors in a determinant when writing down all multiplication permutations. - Mats Granvik, Sep 12 2008
a(n) is also the sum of the positions of the left-to-right maxima in all permutations of [n]. Example: a(3)=18 because the positions of the left-to-right maxima in the permutations 123,132,213,231,312 and 321 of [3] are 123, 12, 13, 12, 1 and 1, respectively and 1+2+3+1+2+1+3+1+2+1+1=18. - Emeric Deutsch, Sep 21 2008
Equals eigensequence of triangle A002024 ("n appears n times"). - Gary W. Adamson, Dec 29 2008
Preface the series with another 1: (1, 1, 4, 18, ...); then the next term = dot product of the latter with "n occurs n times". Example: 96 = (1, 1, 4, 8) dot (4, 4, 4, 4) = (4 + 4 + 16 + 72). - Gary W. Adamson, Apr 17 2009
Row lengths of the triangle in A030298. - Reinhard Zumkeller, Mar 29 2012
a(n) is also the number of minimum (n-)distinguishing labelings of the star graph S_{n+1} on n+1 nodes. - Eric W. Weisstein, Oct 14 2014
When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the right, i.e., a(n) is the permutation with the cycle notation (0 1 ... n-1 n). Compare array A051683 for circular shifts to the right in a broader sense. Compare sequence A007489 for circular shifts to the left. - Tilman Piesk, Apr 29 2017
a(n-1) is the number of permutations on n elements with no cycles of length n. - Dennis P. Walsh, Oct 02 2017
The number of pandigital numbers in base n+1, such that each digit appears exactly once. For example, there are a(9) = 9*9! = 3265920 pandigital numbers in base 10 (A050278). - Amiram Eldar, Apr 13 2020

Examples

			E_1(x) + gamma + log(x) = x/1 - x^2/4 + x^3/18 - x^4/96 + ..., x > 0. - _Michael Somos_, Dec 11 2002
G.f. = x + 4*x^2 + 18*x^3 + 96*x^4 + 600*x^5 + 4320*x^6 + 35280*x^7 + 322560*x^8 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 218.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 336.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • 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).
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 37, equation 37:6:1 at page 354.

Crossrefs

Cf. A163931 (E(x,m,n)), A002775 (n^2*n!), A091363 (n^3*n!), A091364 (n^4*n!).
Cf. sequences with formula (n + k)*n! listed in A282466.
Row sums of A185105, A322383, A322384, A094485.

Programs

  • GAP
    List([0..20], n-> n*Factorial(n) ); # G. C. Greubel, Dec 30 2019
  • Haskell
    a001563 n = a001563_list !! n
    a001563_list = zipWith (-) (tail a000142_list) a000142_list
    -- Reinhard Zumkeller, Aug 05 2013
    
  • Magma
    [Factorial(n+1)-Factorial(n): n in [0..20]]; // Vincenzo Librandi, Aug 08 2014
    
  • Maple
    A001563 := n->n*n!;
  • Mathematica
    Table[n!n,{n,0,25}] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    {a(n) = if( n<0, 0, n * n!)} /* Michael Somos, Dec 11 2002 */
    
  • Sage
    [n*factorial(n) for n in (0..20)] # G. C. Greubel, Dec 30 2019
    

Formula

From Michael Somos, Dec 11 2002: (Start)
E.g.f.: x / (1 - x)^2.
a(n) = -A021009(n, 1), n >= 0. (End)
The coefficient of y^(n-1) in expansion of (y+n!)^n, n >= 1, gives the sequence 1, 4, 18, 96, 600, 4320, 35280, ... - Artur Jasinski, Oct 22 2007
Integral representation as n-th moment of a function on a positive half-axis: a(n) = Integral_{x=0..oo} x^n*(x*(x-1)*exp(-x)) dx, for n>=0. This representation may not be unique. - Karol A. Penson, Sep 27 2001
a(0)=0, a(n) = n*a(n-1) + n!. - Benoit Cloitre, Feb 16 2003
a(0) = 0, a(n) = (n - 1) * (1 + Sum_{i=1..n-1} a(i)) for i > 0. - Gerald McGarvey, Jun 11 2004
Arises in the denominators of the following identities: Sum_{n>=1} 1/(n*(n+1)*(n+2)) = 1/4, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)) = 1/18, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)*(n+4)) = 1/96, etc. The general expression is Sum_{n>=k} 1/C(n, k) = k/(k-1). - Dick Boland, Jun 06 2005 [And the general expression implies that Sum_{n>=1} 1/(n*(n+1)*...*(n+k-1)) = (Sum_{n>=k} 1/C(n, k))/k! = 1/((k-1)*(k-1)!) = 1/a(k-1), k >= 2. - Jianing Song, May 07 2023]
a(n) = Sum_{m=2..n+1} |Stirling1(n+1, m)|, n >= 1 and a(0):=0, where Stirling1(n, m) = A048994(n, m), n >= m = 0.
a(n) = 1/(Sum_{k>=0} k!/(n+k+1)!), n > 0. - Vladeta Jovovic, Sep 13 2006
a(n) = Sum_{k=1..n(n+1)/2} k*A143946(n,k). - Emeric Deutsch, Sep 21 2008
The reciprocals of a(n) are the lead coefficients in the factored form of the polynomials obtained by summing the binomial coefficients with a fixed lower term up to n as the upper term, divided by the term index, for n >= 1: Sum_{k = i..n} C(k, i)/k = (1/a(n))*n*(n-1)*..*(n-i+1). The first few such polynomials are Sum_{k = 1..n} C(k, 1)/k = (1/1)*n, Sum_{k = 2..n} C(k, 2)/k = (1/4)*n*(n-1), Sum_{k = 3..n} C(k, 3)/k = (1/18)*n*(n-1)*(n-2), Sum_{k = 4..n} C(k, 4)/k = (1/96)*n*(n-1)*(n-2)*(n-3), etc. - Peter Breznay (breznayp(AT)uwgb.edu), Sep 28 2008
If we define f(n,i,x) = Sum_{k=i..n} Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)* Stirling2(j,i)*x^(k-j) then a(n) = (-1)^(n-1)*f(n,1,-2), (n >= 1). - Milan Janjic, Mar 01 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = 0.796599599... [Jolley eq. 289]
G.f.: 2*x*Q(0), where Q(k) = 1 - 1/(k+2 - x*(k+2)^2*(k+3)/(x*(k+2)*(k+3)-1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 19 2013
G.f.: W(0)*(1-sqrt(x)) - 1, where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+2)/(sqrt(x)*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 18 2013
G.f.: T(0)/x - 1/x, where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013
G.f.: Q(0)*(1-x)/x - 1/x, where Q(k) = 1 - x*(k+1)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013
D-finite with recurrence: a(n) +(-n-2)*a(n-1) +(n-1)*a(n-2)=0. - R. J. Mathar, Jan 14 2020
a(n) = (-1)^(n+1)*(n+1)*Sum_{k=1..n} A094485(n,k)*Bernoulli(k). The inverse of the Worpitzky representation of the Bernoulli numbers. - Peter Luschny, May 28 2020
From Amiram Eldar, Aug 04 2020: (Start)
Sum_{n>=1} 1/a(n) = Ei(1) - gamma = A229837.
Sum_{n>=1} (-1)^(n+1)/a(n) = gamma - Ei(-1) = A239069. (End)
a(n) = Gamma(n)*A000290(n) for n > 0. - Jacob Szlachetka, Jan 01 2022

A210472 Number A(n,k) of paths starting at {n}^k to a border position where one component equals 0 using steps that decrement one component by 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 6, 1, 0, 1, 4, 33, 20, 1, 0, 1, 5, 196, 543, 70, 1, 0, 1, 6, 1305, 22096, 10497, 252, 1, 0, 1, 7, 9786, 1304045, 3323092, 220503, 924, 1, 0, 1, 8, 82201, 106478916, 1971644785, 574346824, 4870401, 3432, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jan 22 2013

Keywords

Examples

			A(0,3) = 1: [(0,0,0)].
A(1,1) = 1: [(1), (0)].
A(1,2) = 2: [(1,1), (0,1)], [(1,1), (1,0)].
A(1,3) = 3: [(1,1,1), (0,1,1)], [(1,1,1), (1,0,1)], [(1,1,1), (1,1,0)].
A(2,1) = 1: [(2), (1), (0)].
A(2,2) = 6: [(2,2), (1,2), (0,2)], [(2,2), (1,2), (1,1), (0,1)], [(2,2), (1,2), (1,1), (1,0)], [(2,2), (2,1), (1,1), (0,1)], [(2,2), (2,1), (1,1), (1,0)], [(2,2), (2,1), (2,0)].
Square array A(n,k) begins:
  0, 1,   1,      1,         1,             1, ...
  0, 1,   2,      3,         4,             5, ...
  0, 1,   6,     33,       196,          1305, ...
  0, 1,  20,    543,     22096,       1304045, ...
  0, 1,  70,  10497,   3323092,    1971644785, ...
  0, 1, 252, 220503, 574346824, 3617739047205, ...
		

Crossrefs

Columns k=0-4 give: A000004, A000012, A000984, A209245, A209288.
Rows n=0-3 give: A057427, A001477, A093964, A210486.
Main diagonal gives A276490.
Cf. A089759 (unrestricted paths), A225094, A262809, A263159.

Programs

  • Maple
    b:= proc() option remember; `if`(nargs=0, 0, `if`(args[1]=0, 1,
          add(b(sort(subsop(i=args[i]-1, [args]))[]), i=1..nargs)))
        end:
    A:= (n, k)-> b(n$k):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[] = 0; b[args__] := b[args] = If[First[{args}] == 0, 1, Sum[b @@ Sort[ReplacePart[{args}, i -> {args}[[i]] - 1]], {i, 1, Length[{args}]}]]; a[n_, k_] := b @@ Array[n&, k]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)

A326659 T(n,k) = [0=0]; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 15, 18, 6, 1, 64, 132, 96, 24, 1, 325, 980, 1140, 600, 120, 1, 1956, 7830, 12720, 10440, 4320, 720, 1, 13699, 68502, 143850, 162120, 103320, 35280, 5040, 1, 109600, 657608, 1698816, 2447760, 2123520, 1108800, 322560, 40320
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2019

Keywords

Comments

[] is an Iverson bracket.

Examples

			Triangle T(n,k) begins:
  1;
  1,     1;
  1,     4,     2;
  1,    15,    18,      6;
  1,    64,   132,     96,     24;
  1,   325,   980,   1140,    600,    120;
  1,  1956,  7830,  12720,  10440,   4320,   720;
  1, 13699, 68502, 143850, 162120, 103320, 35280, 5040;
  ...
		

Crossrefs

Columns k=0-2 give: A000012, A007526, 2*A134432(n-1).
Main diagonal gives A000142.
Row sums give A308876.

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(0=0, 1, 0)
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    T[n_ /; n >= 0, k_ /; k >= 0] := T[n, k] = Boole[0 < k <= n]*n*(T[n-1, k-1] + T[n-1, k]) + Boole[k == 0 && n >= 0];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 09 2021 *)

Formula

E.g.f. of column k: exp(x)*(x/(1-x))^k.
T(n,k) = k! * A271705(n,k).
T(n,k) = n * A073474(n-1,k-1) for n,k >= 1.
T(n,1) = n * A000522(n-1) for n >= 1.
T(n,2) = n * A093964(n-1) for n >= 1.
Sum_{k=1..n} k * T(n,k) = A327606(n).

A093966 Array read by antidiagonals: number of {112,221}-avoiding words.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 6, 9, 4, 1, 6, 21, 16, 5, 1, 6, 33, 52, 25, 6, 1, 6, 33, 124, 105, 36, 7, 1, 6, 33, 196, 345, 186, 49, 8, 1, 6, 33, 196, 825, 786, 301, 64, 9, 1, 6, 33, 196, 1305, 2586, 1561, 456, 81, 10, 1, 6, 33, 196, 1305, 6186, 6601, 2808, 657, 100, 11
Offset: 1

Views

Author

Ralf Stephan, Apr 20 2004

Keywords

Comments

A(n,k) is the number of n-long k-ary words that simultaneously avoid the patterns 112 and 221.

Examples

			Array, A(n, k), begins as:
  1,  1,   1,    1,    1,     1,     1 ... 1*A000012(k);
  2,  4,   6,    6,    6,     6,     6 ... 2*A158799(k-1);
  3,  9,  21,   33,   33,    33,    33 ... ;
  4, 16,  52,  124,  196,   196,   196 ... ;
  5, 25, 105,  345,  825,  1305,  1305 ... ;
  6, 36, 186,  786, 2586,  6186,  9786 ... ;
  7, 49, 301, 1561, 6601, 21721, 51961 ... ;
Antidiagonal triangle, T(n, k), begins as:
  1;
  1, 2;
  1, 4,  3;
  1, 6,  9,   4;
  1, 6, 21,  16,    5;
  1, 6, 33,  52,   25,    6;
  1, 6, 33, 124,  105,   36,    7;
  1, 6, 33, 196,  345,  186,   49,   8;
  1, 6, 33, 196,  825,  786,  301,  64,  9;
  1, 6, 33, 196, 1305, 2586, 1561, 456, 81, 10;
		

Crossrefs

Cf. A069778, A093963 (antidiagonal sums), A093964, A093965 (main diagonal).

Programs

  • Mathematica
    A[n_, k_]:= A[n, k]= If[n==1, 1, If[k==1, n, If[2<=kG. C. Greubel, Dec 29 2021 *)
  • PARI
    A(n,k) = if(n >= k+1, sum(j=1, k, j*j!*binomial(k,j)), if(n<2, if(n<1, 0, k), n!*binomial(k,n) + sum(j=1, n-1, j*j!*binomial(k,j))));
    T(n,k) = A(n-k+1, k);
    for(n=1, 15, for(k=1, n, print1(T(n, k), ", ") ) )
    
  • Sage
    @CachedFunction
    def A(n,k):
        if (n==1): return 1
        elif (k==1): return n
        elif (2 <= k < n+1): return factorial(k)*binomial(n,k) + sum( j*factorial(j)*binomial(n,j) for j in (1..k-1) )
        else: return sum( j*factorial(j)*binomial(n,j) for j in (1..n) )
    def T(n,k): return A(k, n-k+1)
    flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Dec 29 2021

Formula

A(n, k) = k!*binomial(n, k) + Sum_{j=1..k-1} j*j!*binomial(n, j), for 2 <= k <= n, otherwise Sum_{j=1..n} j*j!*binomial(n, j), with A(1, k) = 1 and A(n, 1) = n.
From G. C. Greubel, Dec 29 2021: (Start)
T(n, k) = A(k, n-k+1).
Sum_{k=1..n} T(n, k) = A093963(n).
T(n, 1) = 1.
T(n, n) = n.
T(n, n-1) = (n-1)^2.
T(n, n-2) = A069778(n).
T(2*n-1, n) = A093965(n).
T(2*n, n) = A093964(n), for n >= 1. (End)

A281912 Number of sequences of balls colored with at most n colors such that exactly one ball is of a color seen earlier in the sequence.

Original entry on oeis.org

1, 8, 57, 424, 3425, 30336, 294553, 3123632, 36003969, 448816600, 6022033721, 86587079448, 1328753602657, 21683227579664, 375013198304025, 6853321766162656, 131976208783240193, 2671430511854158632, 56709161712552286009, 1259836187316759240200
Offset: 1

Views

Author

Jeremy Dover, Feb 01 2017

Keywords

Comments

Note that any such sequence has at least 2 balls, and at most n+1
Number of sequences of balls colored with at most n colors such that exactly two balls are the same color as some other ball in the sequence (necessarily each other). - Jeremy Dover, Sep 26 2017

Examples

			n=1 => AA -> a(1) = 1.
n=2 => AA,BB,AAB,ABA,BAA,BBA,BAB,ABB -> a(2) = 8.
		

Crossrefs

Cf. A093964.
Row sums of triangle A281881. - Jeremy Dover, Sep 26 2017

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<2, 1, a(n-1)*(n+2)/(n-1)-a(n-2))*n
        end:
    seq(a(n), n=1..25);  # Alois P. Heinz, Feb 02 2017
  • Mathematica
    Table[n!*Sum[Binomial[k, 2]/(n + 1 - k)!, {k, 2, n + 1}], {n, 20}] (* Michael De Vlieger, Feb 02 2017 *)

Formula

a(n) = n! * Sum_{k=2..n+1} binomial(k,2)/(n+1-k)!.
a(n) = n if n < 2, a(n) = n*((n+2)/(n-1)*a(n-1) - a(n-2)) for n >= 2. - Alois P. Heinz, Feb 02 2017
a(n)/n! ~ e*n^2/2. - Vaclav Kotesovec, Feb 03 2017

A093963 Antidiagonal sums of array in A093966.

Original entry on oeis.org

1, 3, 8, 20, 49, 123, 312, 824, 2221, 6235, 17904, 53348, 162545, 511747, 1645776, 5448600, 18404189, 63794611, 225353368, 814801812, 2999022641, 11274044075, 43100574472, 167987074584, 665229445293, 2681607587627, 10973746015456
Offset: 1

Views

Author

Ralf Stephan, Apr 20 2004

Keywords

Crossrefs

Programs

  • Mathematica
    A[n_, k_]:= A[n, k]= If[n==1, 1, If[k==1, n, If[2<=kG. C. Greubel, Dec 29 2021 *)
  • Sage
    @CachedFunction
    def A(n, k):
        if (n==1): return 1
        elif (k==1): return n
        elif (2 <= k < n+1): return factorial(k)*binomial(n, k) + sum( j*factorial(j)*binomial(n, j) for j in (1..k-1) )
        else: return sum( j*factorial(j)*binomial(n, j) for j in (1..n) )
    @CachedFunction
    def a(n): return sum( A(k, n-k+1) for k in (1..n) )
    [a(n) for n in (1..30)] # G. C. Greubel, Dec 29 2021

Formula

Conjecture: 2*a(n) -5*a(n-1) -(n+2)*a(n-2) +2*(n+6)*a(n-3) +(n-13)*a(n-4) -4*(n-3)*a(n-5) +2*(n-3)*a(n-6) = 0. - R. J. Mathar, Nov 10 2013

A334156 Triangle read by rows: T(n,m) is the number of length n decorated permutations avoiding the word 0^m = 0...0 of m 0's, where 1 <= m <= n.

Original entry on oeis.org

1, 2, 4, 6, 12, 15, 24, 48, 60, 64, 120, 240, 300, 320, 325, 720, 1440, 1800, 1920, 1950, 1956, 5040, 10080, 12600, 13440, 13650, 13692, 13699, 40320, 80640, 100800, 107520, 109200, 109536, 109592, 109600, 362880, 725760, 907200, 967680, 982800, 985824, 986328, 986400, 986409
Offset: 1

Views

Author

Jordan Weaver, Apr 16 2020

Keywords

Comments

A length n decorated permutation is a word w = w_1....w_n on the letters {0,...,n} such that the restriction of w to its nonzero entries is an ordinary permutation in one-line notation. Then w avoids 0^m if w contains at most m-1 0's as letters, and w contains 0^m if w contains m 0's among its letters (not necessarily consecutive).

Examples

			For (n,m) = (3,2), the T(3,2) = 12 length 3 decorated permutations avoiding 0^2 = 00 are 012, 102, 120, 021, 201, 210, 123, 132, 213, 231, 312, and 321.
Triangle begins:
    1
    2,   4
    6,  12,  15
   24,  48,  60,  64
  120, 240, 300, 320, 325
		

Crossrefs

Cf. A000142 (1st column), A007526 (right diagonal).
Row sums are A093964.

Programs

  • Mathematica
    Array[Accumulate[#!/Range[0,#-1]!]&,10] (* Paolo Xausa, Jan 08 2024 *)
  • PARI
    T(n,m)={sum(j=0, m-1, n!/j!)} \\ Andrew Howroyd, May 11 2020

Formula

T(n,m) = Sum_{j=0..m-1} n!/j!.

Extensions

Terms a(37) and beyond from Andrew Howroyd, Jan 07 2024

A343276 a(n) = n! * [x^n] -x*(x + 1)*exp(x)/(x - 1)^3.

Original entry on oeis.org

0, 1, 10, 81, 652, 5545, 50886, 506905, 5480056, 64116657, 808856290, 10959016321, 158851484100, 2454385635481, 40285778016862, 700261611998985, 12853532939027056, 248482678808005345, 5047002269952482106, 107466341437781300017, 2394019421567804960380
Offset: 0

Views

Author

Peter Luschny, Apr 20 2021

Keywords

Crossrefs

Programs

  • Maple
    egf := -x*(x + 1)*exp(x)/(x - 1)^3: ser := series(egf, x, 32):
    seq(n!*coeff(ser, x, n), n = 0..20);
  • Mathematica
    a[n_] := Sum[Pochhammer[n - k + 1, k]*k^2, {k, 0, n}];
    Table[a[n], {n, 0, 20}]
  • Python
    def a():
        a, b, n = 0, 1, 2
        yield 0
        while True:
            yield b
            a, b = b, -(n + 1)*a + ((2 + n*(n + 2))*b)//(n - 1)
            n += 1
    A343276 = a(); print([next(A343276) for _ in range(21)])
  • SageMath
    def a(n): return sum(rising_factorial(n - k + 1, k)*k^2 for k in (0..n))
    print([a(n) for n in (0..20)])
    

Formula

a(n) = Sum_{k=0..n} rf(n - k + 1, k)*k^2, where rf is the rising factorial.
a(n) = (2 + n*(n + 2))*a(n - 1)/(n - 1) - (n + 1)*a(n - 2) for n >= 3.
A002775(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(k).
a(n) = Sum_{k=1..n} k^2*k!*binomial(n,k). - Ridouane Oudra, Jun 15 2025
Showing 1-8 of 8 results.