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.

User: Aaron O. Schweiger

Aaron O. Schweiger's wiki page.

Aaron O. Schweiger has authored 2 sequences.

A365061 a(n) is the number of endofunctions on an n-set where there is a single element with a preimage of maximum cardinality.

Original entry on oeis.org

1, 2, 21, 196, 2105, 27636, 451003, 8938056, 207358929, 5451691060, 158802143621, 5051104945272, 173783789845861, 6424902913267216, 253983495283150095, 10692693172088104336, 477787129703211313697, 22591854186020941025268, 1127404525137567577764013
Offset: 1

Author

Aaron O. Schweiger, Aug 19 2023

Keywords

Crossrefs

Cf. A000035, A000312 (endofunctions), A351118.

Programs

  • Maple
    a:= proc(m) option remember; m*add(binomial(m, j)*
          b(m-j, min(j-1, m-j), m-1), j=1..m)
        end:
    b:= proc(n, i, t) option remember; `if`(n=0, 1, add(
          b(n-j, i, t-1) *binomial(n-1, j-1)*t, j=1..min(n, i)))
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Aug 25 2023
  • Mathematica
    seriesCoeff[n_, b_] := seriesCoeff[n, b] = SeriesCoefficient[(Exp[z]*Gamma[b, z]/Gamma[b])^(n - 1), {z, 0, n - b}]; a[n_] := n*Total[Table[Binomial[n, b]*(n - b)!*seriesCoeff[n, b], {b, 1, n}]]; Monitor[Table[a[n], {n, 1, 19}], {n - 1, a[n - 1]}] (* Robert P. P. McKone, Aug 26 2023 *)
  • Maxima
    a(n):=n*sum(binomial(n,b)*(n-b)!*coeff(taylor((exp(z)* gamma_incomplete_regularized(b,z))^(n-1),z,0,n),z,n-b),b,1,n);

Formula

a(n) = n*Sum_{b=1..n} binomial(n,b)*(n-b)!*[z^(n-b)](e^z*Gamma(b,z)/Gamma(b))^(n-1).
a(n) mod 2 = A000035(n). - Alois P. Heinz, Aug 25 2023

Extensions

a(16)-a(19) from Alois P. Heinz, Aug 25 2023

A351118 a(n) is the number of endofunctions on an n-set where there is an element with a preimage of cardinality greater than n/2.

Original entry on oeis.org

1, 2, 21, 52, 905, 2436, 58513, 165096, 5053329, 14690260, 546376721, 1621207512, 70973853145, 213746971816, 10765350278145, 32788134075856, 1867372988701217, 5737757882873652, 364586039726904145, 1128184012390456440, 79120980149003612841
Offset: 1

Author

Aaron O. Schweiger, Jan 31 2022

Keywords

Comments

For a random map, f:N->N, |N|=n, the probability of having a preimage of cardinality greater than n/2 is
a(n)/A000312(n) = n*Sum_{k=0..floor((n-1)/2)} binomial(n,k)*(1-1/n)^k*(1/n)^(n-k).
The number of maps g:V->C, |V|=v, |C|=c such that there exists x in C, |g^-1(x)| > v/2, is
b(c,v) = c * Sum_{k=0..floor((v-1)/2)} binomial(v,k)*(c-1)^k;
b(n,n) = a(n), b(2,n) = A202736(n), b(c,1) = b(c,2) = c.

Crossrefs

Cf. A000312 (endofunctions).

Programs

  • Mathematica
    a[1] = 1; a[n_] := n * Sum[(n - 1)^k*Binomial[n, k], {k, 0, Floor[(n - 1)/2]}]; Array[a, 20] (* Amiram Eldar, Feb 01 2022 *)
  • PARI
    a(n) = n*sum(k=0,floor((n-1)/2), binomial(n,k)*(n-1)^k)

Formula

a(n) = n * Sum_{k=0..floor((n-1)/2)} binomial(n,k)*(n-1)^k.