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: Benjamin Otto

Benjamin Otto's wiki page.

Benjamin Otto has authored 12 sequences. Here are the ten most recent ones:

A325208 a(n) is the number of labeled rooted trees on a set of size n where each node has at most 9 neighbors that are further away from the root than the node itself.

Original entry on oeis.org

0, 1, 2, 9, 64, 625, 7776, 117649, 2097152, 43046721, 1000000000, 25937424590, 743008369224, 23298084997044, 793714764270428, 29192925433321650, 1152921466989795360, 48661189511753527280, 2185911410555033096364, 104127340753401006230046, 5242879377215160617336400
Offset: 0

Author

Benjamin Otto, Jul 05 2019

Keywords

Comments

A preimage constraint on a function is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set. View a labeled rooted tree as an endofunction on the set {1,2,...,n} by sending every non-root node to its neighbor that is closer to the root and sending the root to itself. Thus, a(n) is the number of endofunctions on a set of size n with exactly one cyclic point and such that each preimage has at most 9 entries.

Crossrefs

Column k=9 of A325201; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Mathematica
    e[k_][x_] := Sum[x^j/j!, {j, 0, k}];
    a[0] = 0; a[n_] := (n - 1)! Coefficient[e[9][x]^n, x, n - 1];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jul 06 2019 *)
  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=9; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [0,1]; curr_pow = eP
    for term in range(1,num_entries-1):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = (n-1)! * [x^(n-1)] e_9(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_9 * n^(-3/2) * r_9^-n.

A325207 a(n) is the number of labeled rooted trees on a set of size n where each node has at most 8 neighbors that are further away from the root than the node itself.

Original entry on oeis.org

0, 1, 2, 9, 64, 625, 7776, 117649, 2097152, 43046721, 999999990, 25937423490, 743008289364, 23298080054964, 793714478374818, 29192909282466930, 1152920554828545360, 48661137306426044400, 2185908358103092063584, 104127157513055758393026, 5242868049702388548952080
Offset: 0

Author

Benjamin Otto, Apr 11 2019

Keywords

Comments

A preimage constraint on a function is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set. View a labeled rooted tree as an endofunction on the set {1,2,...,n} by sending every non-root node to its neighbor that is closer to the root and sending the root to itself. Thus, a(n) is the number of endofunctions on a set of size n with exactly one cyclic point and such that each preimage has at most 8 entries.

Crossrefs

Column k=8 of A325201; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=8; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [0,1]; curr_pow = eP
    for term in range(1,num_entries-1):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = (n-1)! * [x^(n-1)] e_8(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_8 * n^(-3/2) * r_8^-n.

A325206 a(n) is the number of labeled rooted trees on a set of size n where each node has at most 7 neighbors that are further away from the root than the node itself.

Original entry on oeis.org

0, 1, 2, 9, 64, 625, 7776, 117649, 2097152, 43046712, 999999180, 25937373990, 743005653984, 23297946618804, 793707788417544, 29192570114517810, 1152902963147295360, 48660197610533102880, 2185856466420637543104, 104124189019562479248624, 5242691958381764070687360
Offset: 0

Author

Benjamin Otto, Apr 11 2019

Keywords

Comments

A preimage constraint on a function is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set. View a labeled rooted tree as an endofunction on the set {1,2,...,n} by sending every non-root node to its neighbor that is closer to the root and sending the root to itself. Thus, a(n) is the number of endofunctions on a set of size n with exactly one cyclic point and such that each preimage has at most 7 entries.

Crossrefs

Column k=7 of A325201; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=7; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [0,1]; curr_pow = eP
    for term in range(1,num_entries-1):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = (n-1)! * [x^(n-1)] e_7(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_7 * n^(-3/2) * r_7^-n.

A325205 a(n) is the number of labeled rooted trees on a set of size n where each node has at most 6 neighbors that are further away from the root than the node itself.

Original entry on oeis.org

0, 1, 2, 9, 64, 625, 7776, 117649, 2097144, 43046136, 999970020, 25936053990, 742947675624, 23295384644532, 793591829158128, 29187143427692250, 1152639088016576160, 48646833059722978080, 2185150741063924810176, 104085328898784937079376, 5240461483486301616704160
Offset: 0

Author

Benjamin Otto, Apr 11 2019

Keywords

Comments

A preimage constraint on a function is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set. View a labeled rooted tree as an endofunction on the set {1,2,...,n} by sending every non-root node to its neighbor that is closer to the root and sending the root to itself. Thus, a(n) is the number of endofunctions on a set of size n with exactly one cyclic point and such that each preimage has at most 6 entries.

Crossrefs

Column k=6 of A325201; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=6; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [0,1]; curr_pow = eP
    for term in range(1,num_entries-1):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = (n-1)! * [x^(n-1)] e_6(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_6 * n^(-3/2) * r_6^-n.

A325201 Square array whose entry A(n,k) is the number of labeled rooted trees on a set of size n where each node has at most k neighbors that are further away from the root than the node itself, for n >= 0, k >= 0, read by descending antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 2, 6, 0, 0, 1, 2, 9, 24, 0, 0, 1, 2, 9, 60, 120, 0, 0, 1, 2, 9, 64, 540, 720, 0, 0, 1, 2, 9, 64, 620, 6120, 5040, 0, 0, 1, 2, 9, 64, 625, 7620, 83790, 40320, 0, 0, 1, 2, 9, 64, 625, 7770, 113610, 1345680, 362880, 0, 0, 1, 2, 9, 64, 625, 7776, 117390, 1992480, 24811920, 3628800, 0
Offset: 1

Author

Benjamin Otto, Apr 08 2019

Keywords

Comments

A preimage constraint on a function is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set. View a labeled rooted tree as an endofunction on the set {1,2,...,n} by sending every non-root node to its neighbor that is closer to the root and sending the root to itself.
Thus, A(n,k) is the number of endofunctions on a set of size n with exactly one cyclic point and such that each preimage has at most k entries.

Examples

			Array begins:
           0           0           0           0           0 ...
           0           1           1           1           1 ...
           0           2           2           2           2 ...
           0           6           9           9           9 ...
           0          24          60          64          64 ...
           0         120         540         620         625 ...
           0         720        6120        7620        7770 ...
           0        5040       83790      113610      117390 ...
           0       40320     1345680     1992480     2088520 ...
           0      362880    24811920    40194000    42771960 ...
           0     3628800   516650400   916927200   991090800 ...
           0    39916800 11992503600 23341071600 25635767850 ...
         ...
		

Crossrefs

Column 0: A000004.
Column 1 is A000142, except at n=0 term.
A(n,n) gives A152917.
Similar array for arbitrary endofunctions (without limitation on the number of cyclic points) with the same preimage condition {i>=0 | i<=k}: A306800.

Programs

  • Mathematica
    e[k_][x_] := Sum[x^j/j!, {j, 0, k}];
    A[0, ] = A[, 0] = 0; A[n_, k_] := (n-1)! Coefficient[e[k][x]^n, x, n-1];
    Table[A[n-k, k], {n, 0, 11}, {k, n, 0, -1}] (* Jean-François Alcover, Jul 06 2019 *)
  • Python
    # print first num_entries entries in column k
    import math, sympy; x=sympy.symbols('x')
    k=5; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [0,1]; curr_pow = eP
    for term in range(1, num_entries-1):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

A(n,k) = (n-1)! * [x^(n-1)] e_k(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. When k>1, the link above yields explicit constants c_k, r_k so that the columns are asymptotically c_k * n^(-3/2) * r_k^-n. Stirling's approximation gives column k=1, and column k=0 is 0.

A306800 Square array whose entry A(n,k) is the number of endofunctions on a set of size n with preimage constraint {0,1,...,k}, for n >= 0, k >= 0, read by descending antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 6, 0, 1, 1, 4, 24, 24, 0, 1, 1, 4, 27, 204, 120, 0, 1, 1, 4, 27, 252, 2220, 720, 0, 1, 1, 4, 27, 256, 3020, 29520, 5040, 0, 1, 1, 4, 27, 256, 3120, 44220, 463680, 40320, 0, 1, 1, 4, 27, 256, 3125, 46470, 765030, 8401680, 362880, 0
Offset: 0

Author

Benjamin Otto, Mar 10 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, A(n,k) is the number of endofunctions on a set of size n such that each preimage has at most k entries. Equivalently, A(n,k) is the number of n-letter words from an n-letter alphabet such that no letter appears more than k times.

Examples

			Array begins:
  1    1     1     1     1 ...
  0    1     1     1     1 ...
  0    2     4     4     4 ...
  0    6    24    27    27 ...
  0   24   204   252   256 ...
  0  120  2220  3020  3120 ...
  0  720 29520 44220 46470 ...
  ...
		

Crossrefs

A(n,n) gives A000312.
Similar array for preimage condition {i>=0 | i!=k}: A245413.
Number of functions with preimage condition given by the even nonnegative integers: A209289.
Sum over all k of the number of functions with preimage condition {0,k}: A231812.
Cf. A019575.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1, k)*binomial(n, j), j=0..min(k, n))))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Apr 05 2019
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0 && i==0, 1, If[i<1, 0, Sum[b[n-j, i-1, k] Binomial[n, j], {j, 0, Min[k, n]}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 29 2019, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in column k
    import math, sympy; x=sympy.symbols('x')
    k=5; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
       curr_pow=(curr_pow*eP).expand()
       r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

A(n,k) = n! * [x^n] e_k(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. When k>1, the link above yields explicit constants c_k, r_k so that the columns are asymptotically c_k * n^(-1/2) * r_k^-n. Stirling's approximation gives column k=1, and column k=0 is 0.
A(n,k) = Sum_{j=1..min(k,n)} A019575(n,j) for n>=1. - Alois P. Heinz, Jun 28 2023

Extensions

Offset changed to 0 by Alois P. Heinz, Jun 28 2023

A324807 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5, 6, 7}.

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777208, 387419832, 9999962640, 285309793890, 8916009869448, 302870744070180, 11111793078586200, 437883125030581230, 18446183535139520160, 827209994815650320160, 39344710668752223656064, 1978320731100920186439888
Offset: 0

Author

Benjamin Otto, Mar 25 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, the n-th term of the sequence is the number of endofunctions on a set of size n such that each preimage has at most 7 elements. Equivalently, it is the number of n-letter words from an n-letter alphabet such that no letter appears more than 7 times.

Crossrefs

Column k=7 of A306800; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1)*binomial(n, j), j=0..min(7, n))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 05 2019
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 && i == 0, 1, If[i<1, 0, Sum[b[n-j, i-1]* Binomial[n, j], {j, 0, Min[7, n]}]]];
    a[n_] := b[n, n];
    a /@ Range[0, 20] (* Jean-François Alcover, Feb 29 2020, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=7; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = n! * [x^n] e_7(x)^n, where e_k(x) is the truncated exponential 1 + x+ x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_7 * n^(-1/2) * r_7^-n.

A324806 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5, 6}.

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823536, 16776760, 387399096, 9999087840, 285273493890, 8914479240744, 302804132739108, 11108778138153696, 437740674563572380, 18439146872674688160, 826846479804875930400, 39325078741869629444736, 1977213223548343109320992
Offset: 0

Author

Benjamin Otto, Mar 25 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, the n-th term of the sequence is the number of endofunctions on a set of size n such that each preimage has at most 6 elements. Equivalently, it is the number of n-letter words from an n-letter alphabet such that no letter appears more than 6 times.

Crossrefs

Column k=6 of A306800; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1)*binomial(n, j), j=0..min(6, n))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 01 2019
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 && i == 0, 1, If[i<1, 0, Sum[b[n-j, i-1]* Binomial[n, j], {j, 0, Min[6, n]}]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 31 2019, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=6; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
        curr_pow=(curr_pow*eP).expand()
        r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = n! * [x^n] e_6(x)^n, where e_k(x) is the truncated exponential 1 + x+ x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_6 * n^(-1/2) * r_6^-n.

A324808 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5, 6, 7, 8}.

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420480, 9999999090, 285311608890, 8916096836988, 302874907278372, 11111996007290178, 437893300069054830, 18446711285575475760, 827238394513348062960, 39346298554172667026112, 1978413024254468818876002
Offset: 0

Author

Benjamin Otto, Mar 25 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, a(n) is the number of endofunctions on a set of size n such that each preimage has at most 8 elements. Equivalently, it is the number of n-letter words from an n-letter alphabet such that no letter appears more than 8 times.

Crossrefs

Column k=8 of A306800; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1)*binomial(n, j), j=0..min(8, n))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 01 2019
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 && i == 0, 1, If[i<1, 0, Sum[b[n-j, i-1]*  Binomial[n, j], {j, 0, Min[8, n]}]]];
    a[n_] := b[n, n];
    a /@ Range[0, 19] (* Jean-François Alcover, Feb 29 2020, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=8; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
       curr_pow=(curr_pow*eP).expand()
       r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = n! * [x^n] e_8(x)^n, where e_k(x) is the truncated exponential 1 + x+ x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_8 * n^(-1/2) * r_8^-n.

A324809 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 9999999990, 285311669390, 8916100350828, 302875100019492, 11112006413890382, 437893865348970030, 18446742559675475760, 827240169494482480880, 39346402337538654701772, 1978419291074273862219834
Offset: 0

Author

Benjamin Otto, Mar 25 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, the n-th term of the sequence is the number of endofunctions on a set of size n such that each preimage has at most 9 elements. Equivalently, it is the number of n-letter words from an n-letter alphabet such that no letter appears more than 9 times.

Crossrefs

Column k=9 of A306800; see that entry for sequences related to other preimage constraints constructions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1)*binomial(n, j), j=0..min(9, n))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 01 2019
  • Mathematica
     b[n_, i_] := b[n, i] = If[n == 0 && i == 0, 1, If[i < 1, 0, Sum[b[n - j, i - 1]*Binomial[n, j], {j, 0, Min[9, n]}]]];
    a[n_] := b[n, n];
    a /@ Range[0, 20] (* Jean-François Alcover, Mar 01 2020, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in the sequence
    import math, sympy; x=sympy.symbols('x')
    k=9; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1, num_entries):
       curr_pow=(curr_pow*eP).expand()
       r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

a(n) = n! * [x^n] e_9(x)^n, where e_k(x) is the truncated exponential 1 + x+ x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_9 * n^(-1/2) * r_9^-n.