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.

A001048 a(n) = n! + (n-1)!.

Original entry on oeis.org

2, 3, 8, 30, 144, 840, 5760, 45360, 403200, 3991680, 43545600, 518918400, 6706022400, 93405312000, 1394852659200, 22230464256000, 376610217984000, 6758061133824000, 128047474114560000, 2554547108585472000, 53523844179886080000, 1175091669949317120000
Offset: 1

Views

Author

Keywords

Comments

Number of {12, 12*, 1*2, 21, 21*}-avoiding signed permutations in the hyperoctahedral group.
a(n) is the hook product of the shape (n, 1). - Emeric Deutsch, May 13 2004
From Jaume Oliver Lafont, Dec 01 2009: (Start)
(1+(x-1)*exp(x))/x = Sum_{k >= 1} x^k/a(k).
Setting x = 1 yields Sum_{k >= 1} 1/a(k) = 1. [Jolley eq 302] (End)
With regard to the comment by Jaume Oliver Lafont: P(n) = 1/a(n) is a probability distribution, with all values given as unit fractions. This distribution is connected to the Irwin-Hall distribution: Consider successively drawn random numbers, uniformly distributed in [0,1]. 1/a(n) is the probability for the sum of the random numbers exceeding 1 exactly with the (n+1)-th summand. P(n) has mean e-1 and variance 3e-e^2. From this we get e as the expected number of summands. - Manfred Boergens, May 20 2024
For n >= 2, a(n) is the size of the largest conjugacy class of the symmetric group on n + 1 letters. Equivalently, the maximum entry in each row of A036039. - Geoffrey Critzer, May 19 2013
In factorial base representation (A007623) the terms are written as: 10, 11, 110, 1100, 11000, 110000, ... From a(2) = 3 = "11" onward each term begins always with two 1's, followed by n-2 zeros. - Antti Karttunen, Sep 24 2016
e is approximately a(n)/A000255(n-1) for large n. - Dale Gerdemann, Jul 26 2019
a(n) is the number of permutations of [n+1] in which all the elements of [n] are cycle-mates, that is, 1,..,n are all in the same cycle. This result is readily shown after noting that the elements of [n] can be members of a n-cycle or an (n+1)-cycle. Hence a(n)=(n-1)!+n!. See an example below. - Dennis P. Walsh, May 24 2020

Examples

			For n=3, a(3) counts the 8 permutations of [4] with 1,2, and 3 all in the same cycle, namely, (1 2 3)(4), (1 3 2)(4), (1 2 3 4), (1 2 4 3), (1 3 2 4), (1 2 4 3), (1 4 2 3), and (1 4 3 2). - _Dennis P. Walsh_, May 24 2020
		

References

  • L. B. W. Jolley, Summation of Series, Dover, 1961.
  • 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

Apart from initial terms, same as A059171.
Equals the square root of the first right hand column of A162990. - Johannes W. Meijer, Jul 21 2009
From a(2)=3 onward the second topmost row of arrays A276588 and A276955.
Cf. sequences with formula (n + k)*n! listed in A282466, A334397.

Programs

Formula

a(n) = (n+1)*(n-1)!.
E.g.f.: x/(1-x) - log(1-x). - Ralf Stephan, Apr 11 2004
The sequence 1, 3, 8, ... has g.f. (1+x-x^2)/(1-x)^2 and a(n) = n!(n + 2 - 0^n) = n!A065475(n) (offset 0). - Paul Barry, May 14 2004
a(n) = (n+1)!/n. - Claude Lenormand (claude.lenormand(AT)free.fr), Aug 24 2003
Factorial expansion of 1: 1 = sum_{n > 0} 1/a(n) [Jolley eq 302]. - Claude Lenormand (claude.lenormand(AT)free.fr), Aug 24 2003
a(1) = 2, a(2) = 3, D-finite recurrence a(n) = (n^2 - n - 2)*a(n-2) for n >= 3. - Jaume Oliver Lafont, Dec 01 2009
a(n) = ((n+2)A052649(n) - A052649(n+1))/2. - Gary Detlefs, Dec 16 2009
G.f.: U(0) where U(k) = 1 + (k+1)/(1 - x/(x + 1/U(k+1))) ; (continued fraction, 3-step). - Sergei N. Gladkovskii, Sep 25 2012
G.f.: 2*(1+x)/x/G(0) - 1/x, where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+2) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
a(n) = (n-1)*a(n-1) + (n-1)!. - Bruno Berselli, Feb 22 2017
a(1)=2, a(2)=3, D-finite recurrence a(n) = (n-1)*a(n-1) + (n-2)*a(n-2). - Dale Gerdemann, Jul 26 2019
a(n) = 2*A000255(n-1) + A096654(n-2). - Dale Gerdemann, Jul 26 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - 2/e (A334397). - Amiram Eldar, Jan 13 2021

Extensions

More terms from James Sellers, Sep 19 2000

A102462 Max{ k!/(a(1)!*a(2)!*..*a(n)!) : a(1) + 2*a(2) + 3*a(3) + ... + n*a(n) = n, a(1) + a(2) + ... + a(n) = k }.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 12, 20, 30, 60, 105, 168, 280, 504, 840, 1512, 2520, 5040, 9240, 15840, 27720, 55440, 102960, 180180, 360360, 675675, 1201200, 2162160, 4084080, 7351344, 12697776, 24504480, 46558512, 84651840, 155195040, 296281440, 543182640, 961015440
Offset: 0

Views

Author

Vladeta Jovovic, Feb 23 2005

Keywords

Comments

a(n) is the greatest number in row n of A048996 and in row n of A072811. Thus a(n) is the greatest number of compositions (permutations) obtainable from some partition of n. Example: a(7)=12 is the greatest number of compositions from some partition of 7, specifically, the partition {3,2,1,1}. - Clark Kimberling, Dec 24 2006
The partition(s) giving this optimum is always one where #{parts equal to i} >= #{parts equal to j} if i <= j. These partitions are counted in A007294. - Franklin T. Adams-Watters, Apr 08 2008
The number of partition(s) giving this optimum is given by A198254. - Olivier Gérard, Nov 17 2011

Crossrefs

Programs

  • Maple
    b:= proc(n,i,p) option remember; `if`(n=0 or i=1, (p+n)!/n!,
           max(seq(b(n-i*j, i-1, p+j)/j!, j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 15 2015
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!/n!, Max[Table[ b[n-i*j, i-1, p+j]/j!, {j, 0, n/i}]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 19 2015, after Alois P. Heinz *)

A181897 Triangle of refined rencontres numbers: T(n,k) is the number of permutations of n elements with cycle type k (k-th integer partition, defined by A194602).

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 8, 3, 6, 1, 10, 20, 15, 30, 20, 24, 1, 15, 40, 45, 90, 120, 144, 15, 90, 40, 120, 1, 21, 70, 105, 210, 420, 504, 105, 630, 280, 840, 210, 504, 420, 720, 1, 28, 112, 210, 420, 1120, 1344, 420, 2520, 1120, 3360, 1680, 4032
Offset: 1

Views

Author

Tilman Piesk, Mar 31 2012

Keywords

Comments

T(n,k) tells how often k appears among the first n! entries of A198380, i.e., how many permutations of n elements have the cycle type denoted by k.
This triangle is a refinement of the rencontres numbers A008290, which tell only how many permutations of n elements actually move a certain number of elements. How many of these permutations have a certain cycle type is a more detailed question, answered by this triangle.
The rows are counted from 1, the columns from 0.
Row lengths: 1, 2, 3, 5, 7, 11, ... (partition numbers A000041).
Row sums: 1, 2, 6, 24, 120, 720, ... (factorial numbers A000142).
Row maxima: 1, 1, 3, 8, 30, 144, ... (A059171).
Distinct entries per row: 1, 1, 3, 4, 6, 7, ... (A073906).
It follows from the formula given by Carlos Mafra that the rows of the triangle correspond to the coefficients of the modified Bell polynomials. - Sela Fried, Dec 08 2021
For k>0, the k-th column of triangle T(n,k) is a scaled copy of binomial coefficients binomial(n,q) where q is the least value for which p(q) exceeds or equals k+1, with p() being the integer partitions counting function, A000041(q). E.g., for column 4, the relevant binomial coefficients have q=4 as p(4)=5; for column 5, we have q=5 as p(5)>6; for column 6, we have q=5 as p(5)=7. The scale factor for column k is given by A385081(k+1). This triangle gives coefficients for expressing the characteristic polynomial and determinant of a matrix solely in terms of traces; see extended comment, below, under "Links". - Gregory Gerard Wojnar, Jun 24 2025

Examples

			Triangle begins:
  1;
  1,  1;
  1,  3,  2;
  1,  6,  8,  3,  6;
  1, 10, 20, 15, 30,  20,  24;
  1, 15, 40, 45, 90, 120, 144, 15, 90, 40, 120;
  ...
		

Crossrefs

Cf. A036039 and references therein for different ordering of terms within each row.

Programs

  • Mathematica
    Table[CoefficientRules[ n! CycleIndex[SymmetricGroup[n], s] // Expand][[All, 2]], {n, 1, 8}] // Grid (* Geoffrey Critzer, Nov 09 2014 *)
    (* Alternative program *)
    partitionMultiplicities[aPartn_]:=Table[Count[aPartn,m],{m,Total[aPartn]}]
    partitionBase[aPartn_]:=Sum[m*aPartn[[m]],{m,Length[aPartn]}]
    partitionFactorial[aPartn_]:=Product[m^aPartn[[m]],{m,partitionBase[aPartn]}]
    partitionParts[aPartn_]:=Sum[aPartn[[m]],{m,Length[aPartn]}]
    A181897[aPartn_]:=Multinomial@@aPartn*partitionBase[aPartn]!/(partitionFactorial[aPartn]*partitionParts[aPartn]!)
    Grid[Table[Map[A181897,ReverseSort[Map[partitionMultiplicities,Partitions[n]],LexicographicOrder]],{n,2,12}]] (* Gregory Gerard Wojnar, Jun 24 2025 *)

Formula

T(n,1) = A000217(n).
T(n,2) = A007290(n).
Let m2, m3, ... count the appearances of 2, 3, ... in the cycle type. E.g., the cycle type 2, 2, 2, 3, 3, 4 implies m2=3, m3=2, m4=1. Then T(n;m2,m3,m4,...) = n!/((2^m2 3^m3 4^m4 ...) m1!m2!m3!m4! ...) where m1 = n - 2m2 - 3m3 - 4m4 - ... . - Carlos Mafra, Nov 25 2014

A349980 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 6, 7, 3, 8, 24, 31, 15, 20, 30, 120, 191, 135, 40, 90, 144, 720, 1331, 945, 280, 420, 504, 840, 5040, 10655, 7077, 4480, 1260, 2688, 3360, 5760, 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360, 362880, 958879, 646965, 395360, 238140, 72576, 151200, 172800, 226800, 403200
Offset: 0

Views

Author

Steven Finch, Dec 07 2021

Keywords

Comments

If the permutation has no second cycle, then its second-longest cycle is defined to have length 0.

Examples

			Triangle begins:
[0]     1;
[1]     1;
[2]     1,     1;
[3]     2,     1,     3;
[4]     6,     7,     3,     8;
[5]    24,    31,    15,    20,    30;
[6]   120,   191,   135,    40,    90,   144;
[7]   720,  1331,   945,   280,   420,   504,   840;
[8]  5040, 10655,  7077,  4480,  1260,  2688,  3360,  5760;
[9] 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360;
    ...
		

Crossrefs

Column 0 gives 1 together with A000142.
Column 1 gives the nonzero terms of A155521.
Row sums give A000142.
T(n,n-1) gives A059171(n) for n>=1.

Programs

  • Maple
    m:= infinity:
    b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[2]=m,
          0, l[2]), add(b(n-j, sort([l[], j])[1..2])
                   *binomial(n-1, j-1)*(j-1)!, j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, n-1)))(b(n, [m$2])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Dec 07 2021
  • Mathematica
    m = Infinity;
    b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[2]] == m, 0, l[[2]]], Sum[b[n-j, Sort[Append[l, j]][[1;;2]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
    T[n_] := With[{p = b[n, {m, m}]}, Table[Coefficient[p, x, i], {i, 0, Max[0, n - 1]}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..max(0,n-1)} k * T(n,k) = A332906(n). - Alois P. Heinz, Dec 07 2021

Extensions

More terms from Alois P. Heinz, Dec 07 2021

A261766 a(n) is the number of partial derangements of an n-set with at least one orbit of size exactly n.

Original entry on oeis.org

1, 0, 3, 8, 30, 144, 840, 5760, 45360, 403200, 3991680, 43545600, 518918400, 6706022400, 93405312000, 1394852659200, 22230464256000, 376610217984000, 6758061133824000, 128047474114560000, 2554547108585472000, 53523844179886080000, 1175091669949317120000
Offset: 0

Views

Author

Samira Stitou, Sep 21 2015

Keywords

Examples

			a(3) = 8 because there are 8 partial derangements on {1,2,3} with at least one orbit of size 3 namely: (1,2) --> (2,3), (1,2)  --> (3,1), (1,3)  --> (2,1), (1,3) --> (3,2), (2,3)  --> (3,1), (2,3)  --> (1,2), (1,2,3) --> (2,3,1), (1,2,3)  --> (3,1,2).
		

References

  • A. Laradji and A. Umar, On the number of subpermutations with fixed orbit size, Ars Combinatoria, 109 (2013), 447-460.

Crossrefs

Formula

a(n) = A261765(n,n) - A261765(n,n-1) for n>0, a(0)=1.

Extensions

More terms from Alois P. Heinz, Nov 04 2015

A100822 Triangle read by rows: T(n,k) is the number of deco polyominoes of height n with k cells in the first column. (A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 8, 9, 1, 24, 30, 32, 33, 1, 120, 144, 150, 152, 153, 1, 720, 840, 864, 870, 872, 873, 1, 5040, 5760, 5880, 5904, 5910, 5912, 5913, 1, 40320, 45360, 46080, 46200, 46224, 46230, 46232, 46233, 1, 362880, 403200, 408240, 408960, 409080, 409104, 409110, 409112, 409113, 1
Offset: 1

Views

Author

Emeric Deutsch, Jan 06 2005, Aug 09 2006

Keywords

Comments

Row n has n terms. Rows are circular permutations of the rows of A054115. Column 1 and row sums yield A000142 (the factorial numbers). Column 2 yields A059171.
T(n+1,n)=A007489(n).

Examples

			Triangle begins:
1;
1,1;
2,3,1;
6,8,9,1;
24,30,32,33,1;
T(2,1)=T(2,2)=1 because the deco polyominoes of height 2 are the horizontal and vertical dominoes, having, respectively, 1 and 2 cells in their first columns.
		

References

  • E. Barcucci, A. del Lungo and R. Pinzani, "Deco" polyominoes, permutations and random generation, Theoretical Computer Science, 159, 1996, 29-42.

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if k=n then 1 elif k
    				

Formula

T(n, k)=sum((n-j)!, j=1..k) for 1<=k
T(n,k)=T(n-1,k-1)+(n-1)! for k

A092824 Farey-factorial numerators.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 18, 24, 30, 40, 48, 60, 72, 80, 90, 96, 120, 144, 180, 240, 288, 360, 432, 480, 540, 576, 600, 720, 840, 1008, 1260, 1440, 1680, 2016, 2160, 2520, 2880, 3024, 3360, 3600, 3780, 4032, 4200, 4320, 5040, 5760, 6720, 8064, 10080
Offset: 1

Author

Clark Kimberling, Mar 06 2004

Keywords

Comments

The last number in the n-th segment is n!. Let f(n) be the first number in segment n; except for initial terms, f is A001048 and A059171. Let g(n) be the second number in segment n; except for initial terms, g is A052747. Except for the initial terms, the number of numbers in segment n is given by A015614.

Examples

			The sequence begins with these segments:
  1
  2
  3 4 6
  8 12 16 18 24
For the next segment, start with these Farey fractions of order 5:
  1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 5/5.
Multiply these by 5! to get
  30 40 48 60 72 80 90 96 120.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n! * Table[a/b, {b, 1, n}, {a, 1, b}] // Flatten // Union // Rest; Flatten[Table[f[n], {n, 1, 8}] /. {} -> {1}][[1 ;; 51]] (* Jean-François Alcover, May 18 2011 *)

Formula

Let S(n) be the set of integers an!/b, where a/b ranges through the positive Farey fractions of order n. A092824 is the increasing sequence of integers in the union of the sets S(n), for n>=1.

A070733 Size of largest conjugacy class in A_n, the alternating group on n symbols.

Original entry on oeis.org

1, 1, 1, 4, 20, 90, 630, 3360, 30240, 226800, 2494800, 23950080, 311351040, 3632428800, 54486432000, 747242496000, 12703122432000, 200074178304000, 3801409387776000, 67580611338240000, 1419192838103040000, 28100018194440192000, 646300418472124416000
Offset: 1

Author

Sharon Sela (sharonsela(AT)hotmail.com), May 14 2002

Keywords

Comments

For n > 5, the largest conjugacy class in A_n corresponds to the cycle type (n-2, 2) if n is even, (n-3, 2, 1) if n is odd. - Eric M. Schmidt, Sep 13 2014

Crossrefs

Programs

  • GAP
    a:=function(n)
    local G,CC,SCC,SCC1;
    G:=AlternatingGroup(n);
    CC:=ConjugacyClasses(G);;
    SCC:=List(CC,Size);
    return Maximum(SCC);
    end;;  #  W. Edwin Clark, Feb 02 2014
    
  • Mathematica
    a[n_] := (n!/2) / If[OddQ[n],  n-3, n-2]; a[1] = a[2] = a[3] = 1; a[4] = 4; a[5] = 20; Array[a, 20] (* Amiram Eldar, Jul 12 2025 *)
  • PARI
    a(n) = if(n < 6, [1, 1, 1, 4, 20][n], (n!/2) / if(n % 2,  n-3, n-2)); \\ Amiram Eldar, Jul 12 2025

Formula

For n > 5, a(n) = n!/(2(n-2)) if n is even, a(n) = n!/(2(n-3)) if n is odd. - Eric M. Schmidt, Sep 13 2014
Sum_{n>=1} 1/a(n) = 111/10 + 1/e - 3*e. - Amiram Eldar, Jul 12 2025

Extensions

More terms from Eric M. Schmidt, Sep 13 2014

A093458 Partial products of A073846.

Original entry on oeis.org

1, 2, 8, 24, 144, 720, 5760, 40320, 362880, 3991680, 39916800, 518918400, 6227020800, 105859353600, 1482030950400, 28158588057600, 422378820864000, 9714712879872000, 155435406077952000, 4507626776260608000
Offset: 0

Author

Amarnath Murthy, Apr 03 2004

Keywords

Comments

a(n-2) is the number of elements in the largest conjugacy class of A_n, the alternating group on n letters. Cf. A059171. [Geoffrey Critzer, Mar 26 2013]

Crossrefs

Programs

  • Mathematica
    g[list_]:=Total[list]! / Apply[Times,list] / Apply[Times,Table[Count[list,n]!,{n,1,20}]];
    f[list_]:=Apply[Plus,Table[Count[list,n],{n,2,20,2}]];
    Drop[Table[Max[Map[g,Select[Partitions[n],EvenQ[f[#]]&]]],{n,1,20}]]
    (* Geoffrey Critzer, Mar 26 2013 *)

Formula

a(n) = prime(1) * composite(1) * prime(2) * composite(2) * ... * prime(n/2) * composite(n/2) if n is even else a(n) = prime(1) * composite(1) * prime(2) * composite(2) * ... * prime((n+1)/2). a(0) = 1.

Extensions

More terms from David Wasserman, Sep 28 2006
Showing 1-9 of 9 results.