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

A038720 a(n) = (n+3)*n!/2.

Original entry on oeis.org

2, 5, 18, 84, 480, 3240, 25200, 221760, 2177280, 23587200, 279417600, 3592512000, 49816166400, 741015475200, 11769069312000, 198766503936000, 3556874280960000, 67224923910144000, 1338096104497152000, 27978373094031360000, 613091306060513280000
Offset: 1

Views

Author

N. J. A. Sloane, May 02 2000

Keywords

Comments

Next-to-last diagonal of A038719.
a(n-1) is the sum of the n-th entries in all cycles of all permutations of [n]. a(2) = 5 because the sum of the third entries in all cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 3+2+0+0+0+0 = 5. - Alois P. Heinz, May 03 2017

Crossrefs

Main diagonal of A285793.

Programs

  • Haskell
    import Data.List (transpose)
    a038720 n = a038720_list !! (n-1)
    a038720_list = (transpose $ map reverse a038719_tabl) !! 1
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Magma
    A038720:= func< n | (n+3)*Factorial(n)/2 >; // G. C. Greubel, May 11 2025
    
  • Mathematica
    Array[(# + 3) #!/2 &, 21] (* Michael De Vlieger, Apr 28 2022 *)
  • SageMath
    def A038720(n): return (n+3)*factorial(n)//2 # G. C. Greubel, May 11 2025

Formula

a(n) = A052572(n)/2.
a(n) = A214178(n+3,n). - Reinhard Zumkeller, Jul 08 2012
G.f.: Sum_{n>=1} ( (n+1)*x/(1 + (n+1)*x) )^n. - Paul D. Hanna, Jan 02 2013
E.g.f.: 1/(1-x) + 1/(2*(x-1)^2) - 3/2. - Alois P. Heinz, May 04 2017
From Amiram Eldar, Dec 11 2022: (Start)
Sum_{n>=1} 1/a(n) = 2*e - 14/3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 10/e - 10/3. (End)

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 09 2000.

A180119 a(n) = (n+2)! * Sum_{k = 1..n} 1/((k+1)*(k+2)).

Original entry on oeis.org

0, 1, 6, 36, 240, 1800, 15120, 141120, 1451520, 16329600, 199584000, 2634508800, 37362124800, 566658892800, 9153720576000, 156920924160000, 2845499424768000, 54420176498688000, 1094805903679488000, 23112569077678080000, 510909421717094400000, 11802007641664880640000
Offset: 0

Views

Author

Gary Detlefs, Aug 10 2010

Keywords

Comments

In general, a sequence of the form (n+x+2)! * Sum_{k = 1..n} (k+x)!/(k+x+2)! will have a closed form of (n+x+2)!*n/((x+2)*(n+2+x)).
0 followed by A001286. - R. J. Mathar, Aug 13 2010
Sum of the entries in all cycles of all permutations of [n]. - Alois P. Heinz, Apr 19 2017

Crossrefs

Programs

  • Magma
    [n*Factorial(n+2)/(2*(n+2)): n in [0..25]]; // Vincenzo Librandi, Feb 20 2017
  • Maple
    a:= n-> n*(n+2)!/(2*(n+2)): seq(a(n), n=0..20);
  • Mathematica
    Table[n (n + 2)! / (2 (n + 2)), {n, 0, 30}] (* Vincenzo Librandi, Feb 20 2017 *)
  • PARI
    a(n) = (n+2)! * sum(k=1, n,1/((k+1)*(k+2))); \\ Michel Marcus, Jan 10 2015
    
  • PARI
    apply( A180119(n)=(n+1)!\2*n, [0..20]) \\ M. F. Hasler, Apr 10 2018
    

Formula

a(n) = n*(n+1)!/2. [Simplified by M. F. Hasler, Apr 10 2018]
a(n) = (n+1)! * Sum_{k = 2..n} (1/(k^2+k)), with offset 1. - Gary Detlefs, Sep 15 2011
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*k^(n+1) = (1/(2*x + 1))*Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(x*n + k)^(n+1), for arbitrary x != -1/2. - Peter Bala, Feb 19 2017
From Alois P. Heinz, Apr 19 2017: (Start)
a(n) = A000142(n) * A000217(n) = Sum_{k=1..n} A285439(n,k).
E.g.f.: x/(1-x)^3. (End)
a(n) = A001286(n+1) for n > 0. - M. F. Hasler, Apr 10 2018

A285439 Sum T(n,k) of the entries in the k-th cycles of all permutations of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 4, 2, 21, 12, 3, 132, 76, 28, 4, 960, 545, 235, 55, 5, 7920, 4422, 2064, 612, 96, 6, 73080, 40194, 19607, 6692, 1386, 154, 7, 745920, 405072, 202792, 75944, 18736, 2816, 232, 8, 8346240, 4484808, 2280834, 911637, 254061, 46422, 5256, 333, 9
Offset: 1

Views

Author

Alois P. Heinz, Apr 19 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Examples

			T(3,1) = 21 because the sum of the entries in the first cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 6+6+3+4+1+1 = 21.
Triangle T(n,k) begins:
       1;
       4,      2;
      21,     12,      3;
     132,     76,     28,     4;
     960,    545,    235,    55,     5;
    7920,   4422,   2064,   612,    96,    6;
   73080,  40194,  19607,  6692,  1386,  154,   7;
  745920, 405072, 202792, 75944, 18736, 2816, 232, 8;
  ...
		

Crossrefs

Columns k=1-2 give: A284816, A285489.
Row sums give A000142 * A000217 = A180119.
Main diagonal and first lower diagonal give: A000027, A006000 (for n>0).

Programs

  • Maple
    T:= proc(h) option remember; local b; b:=
          proc(n, l) option remember; `if`(n=0, [mul((i-1)!, i=l), 0],
            (p-> p+[0, (h-n+1)*p[1]*x^(nops(l)+1)])(b(n-1, [l[], 1]))+
             add((p-> p+[0, (h-n+1)*p[1]*x^j])(
             b(n-1, subsop(j=l[j]+1, l))), j=1..nops(l)))
          end: (p-> seq(coeff(p, x, i), i=1..n))(b(h, [])[2])
        end:
    seq(T(n), n=1..10);
  • Mathematica
    T[h_] := T[h] = Module[{b}, b[n_, l_] := b[n, l] = If[n == 0, {Product[(i - 1)!, {i, l}], 0}, # + {0, (h - n + 1)*#[[1]]*x^(Length[l] + 1)}&[b[n - 1, Append[l, 1]]] + Sum[# + {0, (h-n+1)*#[[1]]*x^j}&[b[n - 1, ReplacePart[ l, j -> l[[j]] + 1]]], {j, 1, Length[l]}]]; Table[Coefficient[#, x, i], {i, 1, n}]&[b[h, {}][[2]]]];
    Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, May 25 2018, translated from Maple *)

Formula

Sum_{k=1..n} k * T(n,k) = n^2 * n! = A002775(n).

A285595 Sum T(n,k) of the k-th entries in all blocks of all set partitions of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 4, 2, 17, 10, 3, 76, 52, 18, 4, 362, 274, 111, 28, 5, 1842, 1500, 675, 200, 40, 6, 9991, 8614, 4185, 1380, 325, 54, 7, 57568, 51992, 26832, 9568, 2510, 492, 70, 8, 351125, 329650, 178755, 67820, 19255, 4206, 707, 88, 9, 2259302, 2192434, 1239351, 494828, 149605, 35382, 6629, 976, 108, 10
Offset: 1

Views

Author

Alois P. Heinz, Apr 22 2017

Keywords

Comments

T(n,k) is also k times the number of blocks of size >k in all set partitions of [n+1]. T(3,2) = 10 = 2 * 5 because there are 5 blocks of size >2 in all set partitions of [4], namely in 1234, 123|4, 124|3, 134|2, 1|234.

Examples

			T(3,2) = 10 because the sum of the second entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 2+2+3+3+0  = 10.
Triangle T(n,k) begins:
      1;
      4,     2;
     17,    10,     3;
     76,    52,    18,    4;
    362,   274,   111,   28,    5;
   1842,  1500,   675,  200,   40,   6;
   9991,  8614,  4185, 1380,  325,  54,  7;
  57568, 51992, 26832, 9568, 2510, 492, 70, 8;
  ...
		

Crossrefs

Column k=1 gives A124325(n+1).
Row sums give A000110(n) * A000217(n) = A105488(n+3).
Main diagonal and first lower diagonal give: A000027, A028552.

Programs

  • Maple
    T:= proc(h) option remember; local b; b:=
          proc(n, l) option remember; `if`(n=0, [1, 0],
            (p-> p+[0, (h-n+1)*p[1]*x^1])(b(n-1, [l[], 1]))+
             add((p-> p+[0, (h-n+1)*p[1]*x^(l[j]+1)])(b(n-1,
             sort(subsop(j=l[j]+1, l), `>`))), j=1..nops(l)))
          end: (p-> seq(coeff(p, x, i), i=1..n))(b(h, [])[2])
        end:
    seq(T(n), n=1..12);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0],
          add((p-> p+[0, p[1]*add(x^k, k=1..j-1)])(
             b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)*i, i=1..n))(b(n+1)[2]):
    seq(T(n), n=1..12);
  • Mathematica
    b[n_] := b[n] = If[n == 0, {1, 0}, Sum[# + {0, #[[1]]*Sum[x^k, {k, 1, j-1} ]}&[b[n - j]*Binomial[n - 1, j - 1]], {j, 1, n}]];
    T[n_] := Table[Coefficient[#, x, i]*i, {i, 1, n}] &[b[n + 1][[2]]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, May 23 2018, translated from 2nd Maple program *)

Formula

T(n,k) = k * Sum_{j=k+1..n+1} binomial(n+1,j)*A000110(n+1-j).
T(n,k) = k * Sum_{j=k+1..n+1} A175757(n+1,j).
Sum_{k=1..n} T(n,k)/k = A278677(n-1).

A286231 Sum T(n,k) of the entries in the k-th last cycles of all permutations of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 5, 1, 25, 10, 1, 143, 79, 17, 1, 942, 634, 197, 26, 1, 7074, 5462, 2129, 417, 37, 1, 59832, 51214, 23381, 5856, 786, 50, 1, 563688, 523386, 269033, 80053, 13934, 1360, 65, 1, 5858640, 5813892, 3281206, 1111498, 232349, 29728, 2204, 82, 1
Offset: 1

Views

Author

Alois P. Heinz, May 04 2017

Keywords

Examples

			T(3,2) = 10 because the sum of the entries in the second last cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 0+0+3+4+1+2 = 10.
Triangle T(n,k) begins:
       1;
       5,      1;
      25,     10,      1;
     143,     79,     17,     1;
     942,    634,    197,    26,     1;
    7074,   5462,   2129,   417,    37,    1;
   59832,  51214,  23381,  5856,   786,   50,  1;
  563688, 523386, 269033, 80053, 13934, 1360, 65, 1;
  ...
		

Crossrefs

Column k=1 gives A285382.
Main diagonal and first lower diagonal give: A000012, A002522.
Row sums give A000142 * A000217 = A180119.

A285795 Sum of the second entries in all cycles of all permutations of [n].

Original entry on oeis.org

0, 0, 2, 13, 83, 582, 4554, 39672, 382248, 4044240, 46663920, 583554240, 7865622720, 113711230080, 1755484617600, 28828769356800, 501858148377600, 9232213174732800, 178968924600883200, 3646603415927808000, 77916767838981120000, 1742147265551616000000
Offset: 0

Views

Author

Alois P. Heinz, Apr 26 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Examples

			a(3) = 13 because the sum of the second entries in all cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 2+3+2+3+3+0 = 13.
		

Crossrefs

Column k=2 of A285793.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n*(n-1),
         ((2*n^2+3*n-1)*a(n-1)-(n-1)*n*(n+2)*a(n-2))/(n+1))
        end:
    seq(a(n), n=0..25);
  • Mathematica
    Flatten[{0, Table[n! * (2*(n+1)*HarmonicNumber[n] - n - 3)/4, {n, 1, 25}]}] (* Vaclav Kotesovec, Apr 29 2017 *)

A286175 Sum of the n-th entries in all cycles of all permutations of [n+1].

Original entry on oeis.org

4, 13, 43, 192, 1068, 7080, 54360, 473760, 4616640, 49714560, 586051200, 7504358400, 103703846400, 1538074137600, 24366332390400, 410609751552000, 7333437855744000, 138362409529344000, 2749819506610176000, 57416487392968704000, 1256593887223234560000
Offset: 1

Views

Author

Alois P. Heinz, May 03 2017

Keywords

Examples

			a(2) = 13 because the sum of the second entries in all cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 2+3+2+3+3+0 = 13.
		

Crossrefs

Cf. A285793.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [4, 13][n],
          (n-1)*(2*n^2+7*n+4)*a(n-1)/(2*n^2+3*n-1))
        end:
    seq(a(n), n=1..25);
  • Mathematica
    a[n_] := a[n] = If[n < 3, {4, 13}[[n]],
         (n-1)*(2*n^2 + 7*n + 4)*a[n-1]/(2*n^2 + 3*n - 1)];
    Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Apr 21 2022, after Alois P. Heinz *)

Formula

E.g.f.: -2*log(1-x)-(5*x^3-10*x^2+10*x-7)/(2*(1-x)^2)-7/2.
a(n) = A285793(n+1,n).
Showing 1-7 of 7 results.