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

A350452 Number T(n,k) of endofunctions on [n] with exactly k connected components and no fixed points; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

Original entry on oeis.org

1, 0, 0, 1, 0, 8, 0, 78, 3, 0, 944, 80, 0, 13800, 1810, 15, 0, 237432, 41664, 840, 0, 4708144, 1022252, 34300, 105, 0, 105822432, 27098784, 1286432, 10080, 0, 2660215680, 778128336, 47790540, 648900, 945, 0, 73983185000, 24165049920, 1815578160, 36048320, 138600
Offset: 0

Views

Author

Alois P. Heinz, Dec 31 2021

Keywords

Comments

For k >= 2 and p prime, T(p,k) == 0 (mod 4*p*(p-1)). - Mélika Tebni, Jan 20 2023

Examples

			Triangle T(n,k) begins:
  1;
  0;
  0,          1;
  0,          8;
  0,         78,         3;
  0,        944,        80;
  0,      13800,      1810,       15;
  0,     237432,     41664,      840;
  0,    4708144,   1022252,    34300,    105;
  0,  105822432,  27098784,  1286432,  10080;
  0, 2660215680, 778128336, 47790540, 648900, 945;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A000435.
Row sums give A065440.
T(2n,n) gives A001147.

Programs

  • Maple
    c:= proc(n) option remember; add(n!*n^(n-k-1)/(n-k)!, k=2..n) end:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(
          b(n-i)*binomial(n-1, i-1)*x*c(i), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n/2))(b(n)):
    seq(T(n), n=0..12);
  • Mathematica
    c[n_] := c[n] = Sum[n!*n^(n - k - 1)/(n - k)!, {k, 2, n}];
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[
         b[n - i]*Binomial[n - 1, i - 1]*x*c[i], {i, 1, n}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n/2}]][b[n]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Mar 18 2022, after Alois P. Heinz *)
  • PARI
    \\ here AS1(n,k) gives associated Stirling numbers of 1st kind.
    AS1(n,k)={(-1)^(n+k)*sum(i=0, k, (-1)^i * binomial(n, i) * stirling(n-i, k-i, 1) )}
    T(n,k) = {if(n==0, k==0, sum(j=k, n, n^(n-j)*binomial(n-1, j-1)*AS1(j,k)))} \\ Andrew Howroyd, Jan 20 2023

Formula

From Mélika Tebni, Jan 20 2023: (Start)
E.g.f. column k: (LambertW(-x) - log(1 + LambertW(-x)))^k / k!.
-Sum_{k=1..n/2} (-1)^k*T(n,k) = A071720(n+1), for n > 0.
-Sum_{k=1..n/2} (-1)^k*T(n,k) / (n-1) = A007830(n-2), for n > 1.
T(n,k) = Sum_{j=k..n} n^(n-j)*binomial(n-1, j-1)*A106828(j, k) for n > 0. (End)

A369016 Triangle read by rows: T(n, k) = binomial(n - 1, k - 1) * (k - 1)^(k - 1) * (n - k) * (n - k + 1)^(n - k - 1).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 6, 2, 0, 0, 48, 18, 12, 0, 0, 500, 192, 144, 108, 0, 0, 6480, 2500, 1920, 1620, 1280, 0, 0, 100842, 38880, 30000, 25920, 23040, 18750, 0, 0, 1835008, 705894, 544320, 472500, 430080, 393750, 326592, 0
Offset: 0

Views

Author

Peter Luschny, Jan 12 2024

Keywords

Examples

			Triangle starts:
  [0] [0]
  [1] [0,       0]
  [2] [0,       1,      0]
  [3] [0,       6,      2,      0]
  [4] [0,      48,     18,     12,      0]
  [5] [0,     500,    192,    144,    108,      0]
  [6] [0,    6480,   2500,   1920,   1620,   1280,      0]
  [7] [0,  100842,  38880,  30000,  25920,  23040,  18750,      0]
  [8] [0, 1835008, 705894, 544320, 472500, 430080, 393750, 326592, 0]
		

Crossrefs

A368849, A368982 and this sequence are alternative sum representation for A001864 with different normalizations.
T(n, k) = A368849(n, k) / n for n >= 1.
T(n, 1) = A053506(n) for n >= 1.
T(n, n - 1) = A055897(n - 1) for n >= 2.
Sum_{k=0..n} T(n, k) = A000435(n) for n >= 1.
Sum_{k=0..n} (-1)^(k+1)*T(n, k) = A368981(n) / n for n >= 1.

Programs

  • Maple
    T := (n, k) -> binomial(n-1, k-1)*(k-1)^(k-1)*(n-k)*(n-k+1)^(n-k-1):
    seq(seq(T(n, k), k = 0..n), n=0..9);
  • Mathematica
    A369016[n_, k_] := Binomial[n-1, k-1] If[k == 1, 1, (k-1)^(k-1)] (n-k) (n-k+1)^(n-k-1); Table[A369016[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Jan 28 2024 *)
  • SageMath
    def T(n, k): return binomial(n-1, k-1)*(k-1)^(k-1)*(n-k)*(n-k+1)^(n-k-1)
    for n in range(0, 9): print([T(n, k) for k in range(n + 1)])

Formula

T = B066320 - A369017 (where B066320 = A066320 after adding a 0-column to the left and then setting offset to (0, 0)).

A036360 a(n) = Sum_{k=1..n} n! * n^(n-k+1) / (n-k)!.

Original entry on oeis.org

0, 1, 12, 153, 2272, 39225, 776736, 17398969, 435538944, 12058401393, 366021568000, 12090393761721, 431832459644928, 16585599200808937, 681703972229640192, 29858718555221585625, 1388451967046195347456, 68316647610168842824161, 3546179063131198669848576, 193670918442059606406896473
Offset: 0

Views

Author

Keywords

Comments

This formula is given as a solution to Exercise 1.15a in the Harary and Palmer reference on page 30. However, the formula may not be correct and could be a misprint for Sum_{k=2..n} n! * n^(n-k-1) / (n-k)! which is a formula for A000435(n). - Andrew Howroyd, Feb 06 2024
It appears that a(n) * n^-(n+1) is the mean position of the first duplicate in sequences of n elements randomly drawn with replacement. - Brian P Hawkins, Jan 06 2024
Total count over all mappings from [n] to [n] of tail length plus cycle size of all nodes, where mappings are sets of cycles of trees and tail length is the distance to the cycle that eventually traps the iterates of a node of the mapping; cycle size is the size of that cycle. Alternatively, number of elements on the trajectory of iterates of a node until a repeat is seen, summed over all nodes and mappings. - Marko Riedel, Jul 20 2024

Examples

			Example: Consider the map [1,2,3,4] -> [2,3,4,4]. The trajectory of node one is [1,2,3,4]. Hence the tail length is three and the cycle size is one, a fixed point.
		

References

  • F. Harary and E. Palmer, Graphical Enumeration, (1973), p. 30, Exercise 1.15a.
  • P. Flajolet and A. Odlyzko, Random Mapping Statistics, INRIA RR 1114.

Crossrefs

Programs

  • Maple
    a := proc(n) local k; add(n!*n^(n-k+1)/(n-k)!, k=0..n); end;
    # Alternative, e.g.f.:
    T := -LambertW(-x): egf := (T + T^2)/(1 - T)^4: ser := series(egf, x, 22):
    seq(n!*coeff(ser, x, n), n = 0..19);  # Peter Luschny, Jul 20 2024
  • Mathematica
    Table[Sum[n!*n^(n-k+1)/(n-k)!, {k, 1, n}], {n, 0, 19}] (* James C. McMahon, Feb 07 2024 *)
    a[n_] := n E^n Gamma[n + 1, n] - n^(n + 1);
    Table[a[n], {n, 0, 19}]  (* Peter Luschny, Jul 20 2024 *)
  • PARI
    a(n) = sum(k=1, n, n! * n^(n-k+1) / (n-k)!) \\ Andrew Howroyd, Jan 06 2024
  • Python
    def a(n):
        total_sum = 0
        for k in range(1, n + 1):
            term = (math.factorial(n) / math.factorial(n - k))*(k**2)*(n**(n - k))
            total_sum += term
        return total_sum
    # Brian P Hawkins, Jan 06 2024
    

Formula

a(n) = n^2 * A001865(n). - Gerald McGarvey, Apr 17 2008
a(n) = Sum_{k=1..n} n! * k^2 * n^(n-k) / (n-k)!. - Brian P Hawkins, Jan 06 2024
a(n) = n! * [z^n] (T+T^2)/(1-T)^4 where T is Cayley's tree function T(z) = Sum_{n >= 1} n^(n-1) * z^n/n!. - Marko Riedel, Jul 20 2024
a(n) ~ n^n * ((1/2) * n * sqrt(2 * Pi * n) - (1/3) * n) - Marko Riedel, Jul 20 2024
a(n) = n * e^n * Gamma(n + 1, n) - n^(n + 1) = 2*A262970(n) - A007778(n). - Peter Luschny, Jul 20 2024

Extensions

Offset corrected by Brian P Hawkins, Jan 06 2024
Name edited by Andrew Howroyd, Feb 06 2024
Offset set to 0 and a(0) = 0 prepended by Marko Riedel, Jul 20 2024

A259334 Triangle read by rows: T(n,k) = k*(n-1)!*n^(n-k-1)/(n-k)!, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 3, 4, 2, 16, 24, 18, 6, 125, 200, 180, 96, 24, 1296, 2160, 2160, 1440, 600, 120, 16807, 28812, 30870, 23520, 12600, 4320, 720, 262144, 458752, 516096, 430080, 268800, 120960, 35280, 5040, 4782969, 8503056, 9920232, 8817984, 6123600, 3265920, 1270080, 322560, 40320
Offset: 1

Views

Author

N. J. A. Sloane, Jun 25 2015

Keywords

Examples

			Triangle begins:
     1;
     1,    1;
     3,    4,    2;
    16,   24,   18,    6;
   125,  200,  180,   96,   24;
  1296, 2160, 2160, 1440,  600,  120;
  ...
		

Crossrefs

Diagonals include A000272, A089946, A000142.
Cf. A000435.

Programs

  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(k*(n-1)!*n^(n-k-1)/(n-k)!, ", ");); print(););} \\ Michel Marcus, Jun 26 2015

Formula

A000435(n) = Sum_{k=0..n-1} k*T(n,k). - David desJardins, Jan 22 2017

Extensions

More terms from Michel Marcus, Jun 26 2015

A320064 The number of F_2 graphs on { 1, 2, ..., n } with a unique cycle of weight 1, which corresponds to the number of reflectable bases of the root system of type D_n.

Original entry on oeis.org

0, 1, 16, 312, 7552, 220800, 7597824, 301321216, 13545271296, 681015214080, 37879390720000, 2309968030334976, 153275504883695616, 10995166075754119168, 847974316241667686400, 69971459959477921382400, 6151490510604350965940224, 574035430519008722436489216, 56669921387839814123670994944
Offset: 1

Views

Author

Masaya Tomie, Oct 04 2018

Keywords

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (&+[(&+[j^(j-1)*(2*x)^j/Factorial(j): j in [1..m+2]])^k/(4*k): k in [2..m+1]]) )); [0] cat [Factorial(n+1)*b[n]: n in [1..m-2]]; // G. C. Greubel, Dec 10 2018
    
  • Mathematica
    nmax = 20; Rest[CoefficientList[Series[Sum[1/(4*m)*(Sum[k^(k-1)*(2*x)^k/k!, {k, 1, nmax}])^m, {m, 2, nmax}], {x, 0, nmax}], x] * Range[0, nmax]!] (* Vaclav Kotesovec, Oct 23 2018 *)
  • PARI
    seq(n)={Vec(serlaplace(sum(m=2, n, (sum(k=1, n, k^(k-1)*(2*x)^k/k!) + O(x^n))^m/(4*m))), -n)} \\ Andrew Howroyd, Nov 07 2018
    
  • PARI
    apply( A320064(n)=A001863(n)*(n-1)<<(n-2), [1..20]) \\ Defines the function A320064. The additional apply(...) provides a check and illustration. - M. F. Hasler, Dec 09 2018
    
  • Python
    from math import comb
    def A320064(n): return 0 if n<2 else ((sum(comb(n,k)*(n-k)**(n-k)*k**k for k in range(1,(n+1>>1)))<<1) + (0 if n&1 else comb(n,m:=n>>1)*m**n))//n<Chai Wah Wu, Apr 25-26 2023

Formula

E.g.f.: Sum_{m>=2} (1/(4*m)) (Sum_{k>=1} k^(k-1)*(2*x)^k/k!)^m.
a(n) = (n-1)*2^(n-2)*A001863(n). - M. F. Hasler, Dec 09 2018
a(n) = 2^(n-2)*A000435(n). - Chai Wah Wu, Apr 25 2023

A359628 Triangle read by rows: T(n,k) is the maximum number of connected endofunctions that are spanning subgraphs of a semi-regular loopless digraph on n vertices each with out-degree k.

Original entry on oeis.org

1, 1, 8, 1, 16, 78, 1, 32, 234, 944, 1, 64, 710, 3776, 13800, 1, 128
Offset: 2

Views

Author

Yali Harrary, Jan 08 2023

Keywords

Comments

An endofunction represented as a digraph is one in which every vertex has out-degree 1. Loopless means that there are no fixed points in the function. The digraph of a connected endofunction is unicyclic (contains exactly one cycle).
In the case k = 1, the graphs considered have vertices with out-degree 1 and the entire graph is the only spanning subgraph that is an endofunction. Hence T(n,1) = 1.
In the case k = n-1, the graphs considered are the complete digraphs and every connected endofunction on the vertex set is a subgraph. Hence T(n, n-1) = A000435(n), which gives the total number of connected endofunctions without fixed points.

Examples

			Triangle begins:
  2 | 1;
  3 | 1,  8;
  4 | 1, 16,  78;
  5 | 1, 32, 234,  944;
  6 | 1, 64, 710, 3776, 13800;
  ...
In the following examples, the notation 1->{2,3} is shorthand for the set of arcs {(1,2), (1,3)}.
T(5,2) = 32 is attained with the digraph described by: 1->{2,3}, 2->{1,3}, 3->{1,2}, 4->{1,2}, 5->{1,2}. Regardless of the endofunction chosen, it will contain exactly one cycle and will therefore be connected, so T(5,2) = 2^5 = 32. One such endofunction is 1->2, 2->1, 3->1, 4->1, 5->1 which has the cycle between nodes 1 and 2.
T(5,3) = 234 is attained with the digraph constructed from the complete graph on 4 vertices plus a 5th vertex described by 5->{1,2,3}. The number of endofunctions which are spanning subgraphs is A000435(4)*3 = 78 * 3, since any of the 3 choices for the 5th vertex will not create a new cycle.
T(6,3) = 710 is attained with the digraph described by 1->{2,3,4}, 2->{1,3,4}, 3->{1,2,5}, 4->{3,5,6}, 5->{1,2,6}, 6->{1,2,3}. Up to isomorphism this is the only graph. Just 19 of the possible 3^6 = 729 endofunctions that are subgraphs of this digraph are disconnected. They have cycles described by one of the following permutations written in cycle notation: (13)(2456), (1456)(23), (135)(246), (146)(235), (12)(356), (13)(245), (13)(246), (145)(23), (146)(23). The last 5 of these omit one vertex which does not appear in a cycle.
		

Crossrefs

Cf. A000435 (connected endofunctions without fixed points).

Formula

T(n,1) = 1.
T(n,2) = 2^n.
T(n,n-1) = A000435(n).
Conjecture: T(n,n-2) = A000435(n-1)*(n-2) for n > 2.
From Andrew Howroyd, Jan 08 2023: (Start)
T(n,k) >= k*T(n-1, k) for n >= k + 2.
k^(n-k-1)*A000435(k+1) <= T(n,k) <= k^n for k < n.
(End)

A177453 Partial sums of A001863.

Original entry on oeis.org

0, 1, 5, 31, 267, 3027, 42599, 715191, 13942995, 309522515, 7707841015, 212783127799, 6449579387715, 212939326904131, 7606688596589431, 292321288041079671, 12025358303201356019, 527265684696785414387
Offset: 1

Views

Author

Jonathan Vos Post, May 09 2010

Keywords

Comments

Partial sums of normalized total height of rooted trees with n nodes. The subsequence of primes in the partial sums begins: 5, 31, no more through a(15).

Examples

			a(5) = 0 + 1 + 4 + 26 + 236 = 267 = 3 * 89.
		

Crossrefs

Programs

  • Maple
    A001863 := proc(n) if n = 1 then 0; else add( (n-2)!*n^k/k!,k=0..n-2) ; end if; end proc:
    A177453 := proc(n) add(A001863(i),i=0..n) ; end proc: seq(A177453(n),n=1..20) ; # R. J. Mathar, May 28 2010
  • Mathematica
    Accumulate[Table[Sum[(n-2)! n^k/k!,{k,0,n-2}],{n,20}]] (* Harvey P. Dale, Jun 19 2016 *)
  • Python
    from math import comb
    def A177453(n): return sum(((sum(comb(i,k)*(i-k)**(i-k)*k**k for k in range(1,(i+1>>1)))<<1) + (0 if i&1 else comb(i,m:=i>>1)*m**i))//i//(i-1) for i in range(2,n+1)) # Chai Wah Wu, Apr 25-26 2023

Formula

a(n) = Sum_{i=1..n} A001863(i).

Extensions

Extended by R. J. Mathar, May 28 2010

A321233 a(n) is the number of reflectable bases of the root system of type D_n.

Original entry on oeis.org

0, 4, 128, 4992, 241664, 14131200, 972521472, 77138231296, 6935178903552, 697359579217920, 77576992194560000, 9461629052252061696, 1255632936007234486272, 180144800985155488448512, 27786422394606966747955200, 4585649599904345055716966400, 806288164205933489807717040128
Offset: 1

Views

Author

Masaya Tomie, Nov 01 2018

Keywords

Comments

The root systems of type D_n are only defined for n >= 4. See chapter 3 of the Humphreys reference. Sequence extended to n=1 using formula/recurrence.

References

  • J. E. Humphreys, Introduction to Lie algebras and representation theory, 2nd ed, Springer-Verlag, New York, 1972.

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (&+[ (&+[ j^(j-1)*(4*x)^j/Factorial(j) :j in [1..m+3]])^k/(4*k) :k in [2..m+2]]) )); [0] cat [Factorial(n+1)*b[n]: n in [1..m-2]]; // G. C. Greubel, Dec 09 2018
    
  • Mathematica
    Rest[With[{m = 25}, CoefficientList[Series[Sum[Sum[j^(j - 1)*(4*x)^j/j!, {j, 1, m + 1}]^k/(4*k), {k, 2, m}], {x, 0, m}], x]*Range[0, m]!]] (* G. C. Greubel, Dec 09 2018 *)
  • PARI
    a(n)={n!*polcoef(sum(m=2, n, (sum(k=1, n, k^(k-1)*(4*x)^k/k!) + O(x^(n-m+2)))^m/(4*m)), n)} \\ Andrew Howroyd, Nov 01 2018
    
  • PARI
    A321233(n)=A001863(n)*(n-1)*4^(n-1) \\ M. F. Hasler, Dec 09 2018
    
  • Python
    from math import comb
    def A321233(n): return 0 if n<2 else ((sum(comb(n,k)*(n-k)**(n-k)*k**k for k in range(1,(n+1>>1)))<<1) + (0 if n&1 else comb(n,m:=n>>1)*m**n))//n<<(n-1<<1) # Chai Wah Wu, Apr 26 2023

Formula

E.g.f.: Sum_{m>=2} (1/(4*m)) (Sum_{k>=1} k^(k-1)*(4*x)^k/k!)^m.
a(n) = 2^n*A320064(n).
a(n) = (n-1)*4^(n-1)*A001863(n). - M. F. Hasler, Dec 09 2018

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

Original entry on oeis.org

0, 1, 4, 30, 296, 3720, 56652, 1014832, 20909520, 487198080, 12667470740, 363607605504, 11420819358456, 389646915374080, 14349217119054300, 567315485527234560, 23967624180805666208, 1077568488585047605248, 51369752823292604784420, 2588268388538639982592000
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 23 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! Sum[(-1)^(k + 1) n^(n - k - 2)/(n - k - 1)!, {k, 1, n - 1}], {n, 1, 20}]
    nmax = 20; CoefficientList[Series[-LambertW[-x] - Log[1 - LambertW[-x]], {x, 0, nmax}], x] Range[0, nmax]! // Rest
  • PARI
    a(n) = n! * sum(k=1, n-1, (-1)^(k+1)*n^(n-k-2)/(n-k-1)!); \\ Michel Marcus, Sep 23 2021

Formula

E.g.f.: -LambertW(-x) - log(1 - LambertW(-x)).
a(n) = A134095(n) / n.

A359686 Triangle read by rows: T(n,k) is the minimum number of connected endofunctions that are spanning subgraphs of a semi-regular loopless digraph on n vertices each with out-degree k.

Original entry on oeis.org

1, 1, 8, 0, 14, 78, 0, 22, 213, 944, 0, 0, 529, 3400, 13800, 0, 0
Offset: 2

Views

Author

Yali Harrary, Jan 11 2023

Keywords

Comments

An endofunction represented as a digraph is one in which every vertex has out-degree 1. Loopless means that there are no fixed points in the function. The digraph of a connected endofunction is unicyclic (contains exactly one cycle).
In the case k = 1, the graphs considered have vertices with out-degree 1 and the entire graph is the only spanning subgraph that is an endofunction. Hence T(n,1) = 0. (n > 3 because when n = 2, 3 it still will be unicyclic.)
In the case k = n-1, the graphs considered are the complete digraphs and every connected endofunction on the vertex set is a subgraph. Hence T(n, n-1) = A000435(n), which gives the total number of connected endofunctions without fixed points.

Examples

			Triangle begins:
  2 | 1;
  3 | 1,  8;
  4 | 0, 14,  78;
  5 | 0, 22, 213,  944;
  6 | 0,  0, 529, 3400, 13800;
  ...
In the following examples, the notation 1->{2,3} is shorthand for the set of arcs {(1,2), (1,3)}.
T(5,2) = 22 is attained with the digraph described by: 1->{4,5}, 2->{3,5}, 3->{2,4}, 4->{1,3}, 5->{1,2}.
		

Crossrefs

Formula

T(n,1) = 0 for n > 3, otherwise 1.
T(n,n-1) = A000435(n).
T(n,k) = 0 for 2*k + 2 < n.
Previous Showing 11-20 of 20 results.