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.

Previous Showing 11-16 of 16 results.

A093345 a(n) = n! * {1 + Sum[i=1..n, 1/i*Sum(j=0..i-1, 1/j!)]}.

Original entry on oeis.org

1, 2, 6, 23, 108, 605, 3956, 29649, 250892, 2367629, 24662700, 281153801, 3482350724, 46572620757, 668943488084, 10271127486065, 167892667249116, 2911049382788189, 53365747562592092, 1031352659792534169
Offset: 0

Views

Author

Ralf Stephan, Apr 26 2004

Keywords

Comments

Number of {12,2*1}-avoiding signed permutations in the hyperoctahedral group B_n.

Crossrefs

Cf. A000774.
Contribution from Johannes W. Meijer, Oct 16 2009: (Start)
Equals row sums of A165675.
(End)

Programs

  • Mathematica
    a[n_] := n! (1+Sum[1/i Sum[1/j!, {j, 0, i-1}], {i, 1, n}])
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Oct 05 2018 *)
  • PARI
    a(n)=n!+n!*sum(i=1,n,1/i*sum(j=0,i-1,1/j!))

Formula

E.g.f.: (exp(1)*(Ei(1, 1-x)-Ei(1, 1))+1)/(1-x). a(n) = n!*(1+Sum(A000522(i-1)/i!, i =1..n)). - Vladeta Jovovic, Apr 27 2004
Conjecture: a(n) -2*n*a(n-1) +(n^2-2)*a(n-2) -(n-2)^2*a(n-3)=0. - R. J. Mathar, May 30 2014

A233744 Numbers p = a(n) such that p divided by (n-1)! is equal to the average number of elements of partition sets of n elements excluding sets with a singleton.

Original entry on oeis.org

1, 2, 8, 36, 200, 1300, 9720, 82180, 775520, 8082180, 92205800, 1143084580, 15302486160, 220019440420, 3381685263320, 55333244924100, 960361672886720, 17622501030879940, 340893902373527880, 6933456765092580580, 147919915357498809200, 3303011756746128625380
Offset: 2

Views

Author

Martin Y. Champel, Dec 15 2013

Keywords

Comments

a(n)/(n-1)! is the average number of loops when n players are randomly taking the name of another player (excluding their own name). This is just referring to a game called the "Guardian angel" proposed by a former colleague at work.
For n>2, a(n) appears to be divisible by 2n-4 and, for n>5, additionally by either 10 or 30. - Ralf Stephan, Dec 17 2013

Examples

			For example, if, among 5 players A,B,C,D,E, A takes C and C takes B and B takes A, one loop would be ACB and the other loop would be DE. No single element loop is allowed.
For n = 2, the only possible loop is a 2 elements loop AB ==> a(2) = 1.
for n = 3, the only possible loop is a 3 elements loop ABC or ACB ==> a(3) = 2 as a(3) / 2! = 1.
for n = 4, there are two types of loop, the ABCD loop and AB + CD loops, there is 2 chances out of 3 to get the ABCD type loop and 1 chance out of 3 to get the "AB + CD" configuration. The average number of loop is therefore 2/3 X 1 + 1/3 X 2 = 4/3 = 8 / 6 =  a(4)/3!.
for n = 5, there are two types of loop, the ABCDE loop and ABC + DE loops, there is 2 chances out of 4 to get the ABCDE type loop and 2 chance out of 4 to get the "ABC + DE" configuration. The average number of loop is therefore 2/4 X 1 + 2/4 X 2 = 6/4 = 36 / 24 =  a(5)/4!.
		

Crossrefs

Programs

  • Mathematica
    S[1] = 1;
    S[n_] := S[n] = 1 + 1/(n-1) (S /@ Range[2, n-2] // Total);
    a[n_] := (n-1)! S[n];
    a /@ Range[2, 99] (* Jean-François Alcover, Sep 19 2020 *)
  • PARI
    S(n)=if(n<2,1,1+sum(i=2,n-2,S(i))/(n-1)); a(n)=(n-1)!*S(n) \\ Ralf Stephan, Dec 17 2013
  • Python
    from sympy import factorial, Integer
    angel=[0,0,1,1]
    A233744=[1,2]
    n = 20
    for i in range(4,n):
        new = 1+sum(angel[:-1])/Integer(i-1)
        angel.append(new)
        A233744.append(new*factorial(i-1))
    print(A233744)
    

Formula

a(n) = (n-1)! * S(n), with S(n) = 1 + 1/(n-1) * sum of previous S(i) with i in (2, n-2).

Extensions

More terms from Ralf Stephan, Dec 17 2013

A360174 Triangle read by rows. T(n, k) = (k + 1) * abs(Stirling1(n, k)).

Original entry on oeis.org

1, 0, 2, 0, 2, 3, 0, 4, 9, 4, 0, 12, 33, 24, 5, 0, 48, 150, 140, 50, 6, 0, 240, 822, 900, 425, 90, 7, 0, 1440, 5292, 6496, 3675, 1050, 147, 8, 0, 10080, 39204, 52528, 33845, 11760, 2254, 224, 9, 0, 80640, 328752, 472496, 336420, 134694, 31752, 4368, 324, 10
Offset: 0

Views

Author

Peter Luschny, Feb 08 2023

Keywords

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0,     2;
[2] 0,     2,     3;
[3] 0,     4,     9,     4;
[4] 0,    12,    33,    24,     5;
[5] 0,    48,   150,   140,    50,     6;
[6] 0,   240,   822,   900,   425,    90,    7;
[7] 0,  1440,  5292,  6496,  3675,  1050,  147,   8;
[8] 0, 10080, 39204, 52528, 33845, 11760, 2254, 224, 9;
		

Crossrefs

Cf. A208529 (column 1), A006002 (subdiagonal), A000774 (row sums).
Cf. A069138 (Stirling2 counterpart), A360205 (Lah counterpart).

Programs

  • Maple
    T := (n, k) -> (k + 1)*abs(Stirling1(n, k)):
    for n from 0 to 8 do seq(T(n, k), k = 0..n) od;

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

Original entry on oeis.org

1, 4, 12, 46, 220, 1268, 8568, 66456, 582048, 5681952, 61174080, 720089280, 9199906560, 126783809280, 1874605662720, 29601115891200, 497155992883200, 8849184886886400, 166399076525875200, 3296032301811916800, 68596838245232640000, 1496490349337948160000
Offset: 0

Views

Author

Keywords

Crossrefs

Similar to A000774.

Programs

  • Mathematica
    Table[n! (n + 1 + 2*Sum[1/k, {k, n}]), {n, 0, 20}] (* T. D. Noe, Jun 20 2012 *)

Formula

E.g.f.: x/(1-x)+log(1-x)^2. - Vladeta Jovovic, Feb 02 2003
a(0)=1, a(n+1) = (n+1)*a(n) + (n+3)*n! for n > 0. - Sean A. Irvine, Jun 10 2011

Extensions

Incorrect formula deleted by Mark van Hoeij, Nov 11 2009

A349782 Triangle read by rows, T(n, k) = Sum_{j=0..k} |Stirling1(n, j)|.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 5, 6, 0, 6, 17, 23, 24, 0, 24, 74, 109, 119, 120, 0, 120, 394, 619, 704, 719, 720, 0, 720, 2484, 4108, 4843, 5018, 5039, 5040, 0, 5040, 18108, 31240, 38009, 39969, 40291, 40319, 40320, 0, 40320, 149904, 268028, 335312, 357761, 362297, 362843, 362879, 362880
Offset: 0

Views

Author

Peter Luschny, Dec 02 2021

Keywords

Comments

T(n, k) is the number of permutations of n objects that contain at most k cycles.

Examples

			Triangle starts:
[0] 1;
[1] 0, 1;
[2] 0, 1,    2;
[3] 0, 2,    5,     6;
[4] 0, 6,    17,    23,    24;
[5] 0, 24,   74,    109,   119,   120;
[6] 0, 120,  394,   619,   704,   719,   720;
[7] 0, 720,  2484,  4108,  4843,  5018,  5039,  5040;
[8] 0, 5040, 18108, 31240, 38009, 39969, 40291, 40319, 40320;
		

Crossrefs

Row sums: A121586, central terms: A349783.

Programs

  • Maple
    T := (n, k) -> add(abs(Stirling1(n,j)), j = 0..k):
    seq(seq(T(n, k), k = 0..n), n = 0..9);
  • Mathematica
    T[n_, k_] := Sum[Abs[StirlingS1[n, j]], {j, 0, k}]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Dec 09 2021 *)
  • PARI
    T(n, k) = sum(j=0, k, abs(stirling(n, j, 1))); \\ Michel Marcus, Dec 09 2021

Formula

T(n,k) = Sum_{j=0..k} A132393(n,j). - Alois P. Heinz, Dec 10 2021

A336746 Triangle read by rows: T(n,k) = (n-k-1+H(k+1))*((k+1)!) for 0 <= k <= n where H(k+1) = Sum_{i=0..k} 1/(i+1) for k >= 0.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 3, 5, 11, 26, 4, 7, 17, 50, 154, 5, 9, 23, 74, 274, 1044, 6, 11, 29, 98, 394, 1764, 8028, 7, 13, 35, 122, 514, 2484, 13068, 69264, 8, 15, 41, 146, 634, 3204, 18108, 109584, 663696, 9, 17, 47, 170, 754, 3924, 23148, 149904, 1026576, 6999840
Offset: 0

Views

Author

Werner Schulte, Aug 02 2020

Keywords

Examples

			The triangle starts:
n\k :  0   1   2    3    4     5      6       7        8        9
=================================================================
  0 :  0
  1 :  1   1
  2 :  2   3   5
  3 :  3   5  11   26
  4 :  4   7  17   50  154
  5 :  5   9  23   74  274  1044
  6 :  6  11  29   98  394  1764   8028
  7 :  7  13  35  122  514  2484  13068   69264
  8 :  8  15  41  146  634  3204  18108  109584   663696
  9 :  9  17  47  170  754  3924  23148  149904  1026576  6999840
...
		

Crossrefs

Cf. A001477 (column 0), A005408 (column 1), A016969 (column 2), A001705 (main diagonal), A000254 (1st subdiagonal), A000774 (2nd subdiagonal).

Formula

T(n,k) = T(n,k-1) + k * T(n-1,k-1) for 0 < k <= n with initial values T(n,0) = n for n >= 0 and T(i,j) = 0 if j < 0 or j > i.
T(n,k) = k! + T(n-1,k-1) * (k+1) for 0 < k <= n.
T(n,k) = (k+1)! + T(n-1,k) for 0 <= k < n.
E.g.f. of main diagonal (case n=0) and n-th subdiagonal (n>0): Sum_{k>=0} T(n+k,k) * x^k / k! = (n - log(1-x)) / (1-x)^2 for n >= 0.
G.f. of column k>=0: Sum_{n>=k} T(n,k) * y^n = (T(k,k) * y^k + ((k+1)! - T(k,k)) * y^(k+1)) / (1-y)^2.
G.f.: Sum_{n>=0, k=0..n} T(n,k)*x^k*y^n/k! = (y - (1-y) * log(1-x*y)) / ((1-y)^2 * (1-x*y)^2).
Previous Showing 11-16 of 16 results.