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

A290353 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the k-th Euler transform of the sequence with g.f. 1+x.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 3, 1, 0, 1, 1, 4, 6, 5, 1, 0, 1, 1, 5, 10, 14, 7, 1, 0, 1, 1, 6, 15, 30, 27, 11, 1, 0, 1, 1, 7, 21, 55, 75, 58, 15, 1, 0, 1, 1, 8, 28, 91, 170, 206, 111, 22, 1, 0, 1, 1, 9, 36, 140, 336, 571, 518, 223, 30, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jul 28 2017

Keywords

Comments

A(n,k) is the number of unlabeled rooted trees with exactly n leaves, all in level k. A(3,3) = 6:
: o o o o o o
: | | | / \ / \ /|\
: o o o o o o o o o o
: | / \ /|\ | | ( ) | | | |
: o o o o o o o o o o o o o o
: /|\ ( ) | | | | ( ) | | | | | | |
: o o o o o o o o o o o o o o o o o o

Examples

			Square array A(n,k) begins:
  1, 1,  1,   1,    1,    1,     1,     1,      1, ...
  1, 1,  1,   1,    1,    1,     1,     1,      1, ...
  0, 1,  2,   3,    4,    5,     6,     7,      8, ...
  0, 1,  3,   6,   10,   15,    21,    28,     36, ...
  0, 1,  5,  14,   30,   55,    91,   140,    204, ...
  0, 1,  7,  27,   75,  170,   336,   602,   1002, ...
  0, 1, 11,  58,  206,  571,  1337,  2772,   5244, ...
  0, 1, 15, 111,  518, 1789,  5026, 12166,  26328, ...
  0, 1, 22, 223, 1344, 5727, 19193, 54046, 133476, ...
		

Crossrefs

Main diagonal gives A290354.
Cf. A144150.

Programs

  • Maple
    with(numtheory):
    A:= proc(n, k) option remember; `if`(n<2, 1, `if`(k=0, 0, add(
          add(A(d, k-1)*d, d=divisors(j))*A(n-j, k), j=1..n)/n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_]:=b[n, k]=If[n<2, 1, If[k==0, 0, Sum[Sum[A[d, k - 1]*d, {d, Divisors[j]}] A[n - j, k], {j, n}]/n]]; Table[A[n, d - n], {d, 0, 14}, {n, 0, d}]//Flatten (* Indranil Ghosh, Jul 30 2017, after Maple code *)

Formula

G.f. of column k=0: 1+x, of column k>0: Product_{j>0} 1/(1-x^j)^A(j,k-1).

A139383 Number of n-level labeled rooted trees with n leaves.

Original entry on oeis.org

1, 1, 2, 12, 154, 3455, 120196, 5995892, 406005804, 35839643175, 3998289746065, 550054365477936, 91478394767427823, 18091315306315315610, 4196205472500769304318, 1128136777063831105273242, 347994813261017613045578964, 122080313159891715442898099217
Offset: 0

Views

Author

Paul D. Hanna, Apr 16 2008

Keywords

Comments

Define the matrix function matexps(M) to be exp(M)/exp(1). Then the number of k-level labeled rooted trees with n leaves is also column 0 of the triangle resulting from the n-th iteration of matexps on the Pascal matrix P, A007318. The resulting triangle is also S^n*P*S^-n, where S is the Stirling2 matrix A048993. This function can be coded in PARI as sum(k=0,200,1./k!*M^k)/exp(1), using exp(M) does not work. See A056857, which equals (1/e)*exp(P) or S*P*S^-1. - Gerald McGarvey, Aug 19 2009

Examples

			If we form a table from the family of sequences defined by:
number of k-level labeled rooted trees with n leaves,
then this sequence equals the diagonal in that table:
n=1:A000012=[1,1,1,1,1,1,1,1,1,1,...];
n=2:A000110=[1,2,5,15,52,203,877,4140,21147,115975,...];
n=3:A000258=[1,3,12,60,358,2471,19302,167894,1606137,...];
n=4:A000307=[1,4,22,154,1304,12915,146115,1855570,26097835,...];
n=5:A000357=[1,5,35,315,3455,44590,660665,11035095,204904830,...];
n=6:A000405=[1,6,51,561,7556,120196,2201856,45592666,1051951026,...];
n=7:A001669=[1,7,70,910,14532,274778,5995892,148154860,4085619622,...];
n=8:A081624=[1,8,92,1380,25488,558426,14140722,406005804,13024655442,...];
n=9:A081629=[1,9,117,1989,41709,1038975,29947185,979687005,35839643175,..].
Row n in the above table equals column 0 of matrix power A008277^n where A008277 = triangle of Stirling numbers of 2nd kind:
1;
1,1;
1,3,1;
1,7,6,1;
1,15,25,10,1;
1,31,90,65,15,1; ...
The name of this sequence is a generalization of the definition given in the above sequences by _Christian G. Bower_.
		

Crossrefs

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0 or k=0, 1,
          add(binomial(n-1, j-1)*A(j, k-1)*A(n-j, k), j=1..n))
        end:
    a:= n-> A(n, n-1):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 14 2015
    # second Maple program:
    g:= x-> exp(x)-1:
    a:= n-> n! * coeff(series(1+(g@@n)(x), x, n+1), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 31 2017
    # third Maple program:
    b:= proc(n, t, m) option remember; `if`(t=0, `if`(n<2, 1, 0),
         `if`(n=0, b(m, t-1, 0), m*b(n-1, t, m)+b(n-1, t, m+1)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 04 2021
  • Mathematica
    t[n_,m_]:=t[n,m] = If[m==1,1,Sum[StirlingS2[n,k]*t[k,m-1],{k,1,n}]]; Table[t[n,n],{n,1,20}] (* Vaclav Kotesovec, Aug 14 2015 after Vladimir Kruchinin *)
  • Maxima
    T(n,m):=if m=1 then 1 else sum(stirling2(n,i)*T(i,m-1),i,1,n);
    makelist(T(n,n),n,1,7); /* Vladimir Kruchinin, May 19 2012 */
    
  • PARI
    {a(n)=local(E=exp(x+x*O(x^n))-1,F=x); for(i=1,n,F=subst(F,x,E));n!*polcoeff(F,n)}
    
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def A(n, k): return 1 if n==0 or k==0 else sum(binomial(n - 1, j - 1)*A(j, k - 1)*A(n - j, k) for j in range(1, n + 1))
    def a(n): return A(n, n - 1)
    print([a(n) for n in range(21)]) # Indranil Ghosh, Aug 07 2017, after Maple code

Formula

a(n) = T(n,n), T(n,m) = Sum_{i=1..n} Stirling2(n,i)*T(i,m-1), m>1, T(n,1)=1. - Vladimir Kruchinin, May 19 2012
a(n) = n! * [x^n] 1 + g^n(x), where g(x) = exp(x)-1. - Alois P. Heinz, Aug 14 2015
From Vaclav Kotesovec, Aug 14 2015: (Start)
Conjecture: a(n) ~ c * n^(2*n-5/6) / (2^(n-1) * exp(n)), where c = 2.86539...
a(n) ~ exp(-1) * A261280(n).
(End)

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 31 2017

A306187 Number of n-times partitions of n.

Original entry on oeis.org

1, 1, 3, 10, 65, 371, 3780, 33552, 472971, 5736082, 97047819, 1547576394, 32992294296, 626527881617, 15202246707840, 352290010708120, 9970739854456849, 262225912049078193, 8309425491887714632, 250946978120046026219, 8898019305511325083149
Offset: 0

Views

Author

Alois P. Heinz, Jan 27 2019

Keywords

Comments

A k-times partition of n for k > 1 is a sequence of (k-1)-times partitions, one of each part in an integer partition of n. A 1-times partition of n is just an integer partition of n. The only 0-times partition of n is the number n itself. - Gus Wiseman, Jan 27 2019

Examples

			From _Gus Wiseman_, Jan 27 2019: (Start)
The a(1) = 1 through a(3) = 10 partitions:
  (1)  ((2))     (((3)))
       ((11))    (((21)))
       ((1)(1))  (((111)))
                 (((2)(1)))
                 (((11)(1)))
                 (((2))((1)))
                 (((1)(1)(1)))
                 (((11))((1)))
                 (((1)(1))((1)))
                 (((1))((1))((1)))
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or k=0 or i=1,
          1, b(n, i-1, k)+b(i$2, k-1)*b(n-i, min(n-i, i), k))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..25);
  • Mathematica
    ptnlevct[n_,k_]:=Switch[k,0,1,1,PartitionsP[n],_,SeriesCoefficient[Product[1/(1-ptnlevct[m,k-1]*x^m),{m,n}],{x,0,n}]];
    Table[ptnlevct[n,n],{n,0,8}] (* Gus Wiseman, Jan 27 2019 *)

Formula

a(n) = A323718(n,n).

A305725 a(n) is the n-th term of the sequence that shifts left by one position when Euler transform is applied n times; a(0) = 0.

Original entry on oeis.org

0, 1, 1, 4, 19, 141, 1260, 14379, 192615, 2997844, 52869443, 1042233820, 22685350130, 540054008352, 13951013617182, 388499286052386, 11597298980187673, 369329248762633105, 12495176515326675179, 447453508295247538083, 16905177062269436114613
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2018

Keywords

Crossrefs

Main diagonal of A144042.

Formula

a(n) = A144042(n,n) for n>0, a(0) = 0.
Showing 1-4 of 4 results.