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-10 of 15 results. Next

A004111 Number of rooted identity trees with n nodes (rooted trees whose automorphism group is the identity group).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 6, 12, 25, 52, 113, 247, 548, 1226, 2770, 6299, 14426, 33209, 76851, 178618, 416848, 976296, 2294224, 5407384, 12780394, 30283120, 71924647, 171196956, 408310668, 975662480, 2335443077, 5599508648, 13446130438, 32334837886, 77863375126, 187737500013, 453203435319, 1095295264857, 2649957419351
Offset: 0

Views

Author

Keywords

Comments

The nodes are unlabeled.
There is a natural correspondence between rooted identity trees and finitary sets (sets whose transitive closure is finite); each node represents a set, with the children of that node representing the members of that set. When the set corresponding to an identity tree is written out using braces, there is one set of braces for each node of the tree; thus a(n) is also the number of sets that can be made using n pairs of braces. - Franklin T. Adams-Watters, Oct 25 2011
Shifts left under WEIGH transform. - Franklin T. Adams-Watters, Jan 17 2007
Is this the sequence mentioned in the middle of page 355 of Motzkin (1948)? - N. J. A. Sloane, Jul 04 2015. Answer from David Broadhurst, Apr 06 2022: The answer is No. Motzkin was considering a sequence asymptotic to Catalan(n)/(4*n), namely A006082, which begins 1, 1, 1, 2, 3, 6, 12, 27, ... but he miscalculated and got 1, 1, 1, 2, 3, 6, 12, 25, ... instead! - N. J. A. Sloane, Apr 06 2022

Examples

			The 2 identity trees with 4 nodes are:
     O    O
    / \   |
   O   O  O
       |  |
       O  O
          |
          O
These correspond to the sets {{},{{}}} and {{{{}}}}.
G.f.: x + x^2 + x^3 + 2*x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 25*x^8 + 52*x^9 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Camb. 1998, p. 330.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 301 and 562.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 64, Eq. (3.3.15); p. 80, Problem 3.10.
  • D. E. Knuth, Fundamental Algorithms, 3rd Ed., 1997, pp. 386-388.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a004111 = genericIndex a004111_list
    a004111_list = 0 : 1 : f 1 [1] where
       f x zs = y : f (x + 1) (y : zs) where
                y = (sum $ zipWith (*) zs $ map g [1..]) `div` x
       g k = sum $ zipWith (*) (map (((-1) ^) . (+ 1)) $ reverse divs)
                               (zipWith (*) divs $ map a004111 divs)
                               where divs = a027750_row k
    -- Reinhard Zumkeller, Apr 29 2014
    
  • Maple
    A004111 := proc(n)
            spec := [ A, {A=Prod(Z,PowerSet(A))} ]:
            combstruct[count](spec, size=n) ;
    end proc:
    # second Maple program:
    with(numtheory):
    a:= proc(n) a(n):= `if`(n<2, n, add(a(n-k)*add(a(d)*d*
           (-1)^(k/d+1), d=divisors(k)), k=1..n-1)/(n-1))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 15 2014
  • Mathematica
    s[ n_, k_ ] := s[ n, k ]=a[ n+1-k ]+If[ n<2k, 0, -s[ n-k, k ] ]; a[ 1 ]=1; a[ n_ ] := a[ n ]=Sum[ a[ i ]s[ n-1, i ]i, {i, 1, n-1} ]/(n-1); Table[ a[ i ], {i, 1, 30} ] (* Robert A. Russell *)
    a[ n_] := If[ n < 2, Boole[n == 1], Nest[ CoefficientList[ Normal[ Times @@ (Table[1 + x^k, {k, Length@#}]^#) + x O[x]^Length@#], x] &, {}, n - 1][[n]]]; (* Michael Somos, Jul 10 2014 *)
    a[n_] := a[n] = Sum[a[n-k]*Sum[a[d]*d*(-1)^(k/d+1),{d, Divisors[k]}], {k, 1, n-1}]/(n-1); a[0]=0; a[1]=1; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 02 2015 *)
  • PARI
    N=66;  A=vector(N+1, j, 1);
    for (n=1, N, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, (-1)^(k/d+1) * d * A[d]) * A[n-k+1] ) );
    concat([0], A)
    \\ Joerg Arndt, Jul 10 2014

Formula

Recurrence: a(n+1) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} (-1)^(k/d+1) d*a(d) ) * a(n-k+1). - Mitchell Harris, Dec 02 2004
G.f. satisfies A(x) = x*exp(A(x) - A(x^2)/2 + A(x^3)/3 - A(x^4)/4 + ...). [Harary and Prins]
Also A(x) = Sum_{n >= 1} a(n)*x^n = x * Product_{n >= 1} (1+x^n)^a(n).
a(n) ~ c * d^n / n^(3/2), where d = A246169 = 2.51754035263200389079535..., c = 0.3625364233974198712298411097408713812865256408189512533230825639621448038... . - Vaclav Kotesovec, Aug 22 2014, updated Dec 26 2020

A034781 Triangle of number of rooted trees with n >= 2 nodes and height h >= 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 6, 8, 4, 1, 1, 10, 18, 13, 5, 1, 1, 14, 38, 36, 19, 6, 1, 1, 21, 76, 93, 61, 26, 7, 1, 1, 29, 147, 225, 180, 94, 34, 8, 1, 1, 41, 277, 528, 498, 308, 136, 43, 9, 1, 1, 55, 509, 1198, 1323, 941, 487, 188, 53, 10, 1
Offset: 2

Views

Author

Keywords

Examples

			Triangle begins:
  1;
  1  1;
  1  2  1;
  1  4  3  1;
  1  6  8  4  1;
  1 10 18 13  5  1;
  1 14 38 36 19  6 1;
thus there are 10 trees with 7 nodes and height 2.
		

Crossrefs

T(2n,n) = A245102(n), T(2n+1,n) = A245103(n).
Row sums give A000081.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1 or k<1, 0,
         add(binomial(b((i-1)$2, k-1)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))
        end:
    T:= (n, k)-> b((n-1)$2, k) -b((n-1)$2, k-1):
    seq(seq(T(n, k), k=1..n-1), n=2..16);  # Alois P. Heinz, Jul 31 2013
  • Mathematica
    Drop[Map[Select[#, # > 0 &] &,
       Transpose[
        Prepend[Table[
          f[n_] :=
           Nest[CoefficientList[
              Series[Product[1/(1 - x^i)^#[[i]], {i, 1, Length[#]}], {x,
                0, 10}], x] &, {1}, n]; f[m] - f[m - 1], {m, 2, 10}],
    Prepend[Table[1, {10}], 0]]]], 1] // Grid (* Geoffrey Critzer, Aug 01 2013 *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1 || k<1, 0, Sum[Binomial[b[i-1, i-1, k-1]+j-1, j]*b[n-i*j, i-1, k], {j, 0, n/i}]]]; T[n_, k_] := b[n-1, n-1, k]-b[n-1, n-1, k-1]; Table[T[n, k], {n, 2, 16}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Feb 11 2014, after Alois P. Heinz *)
  • Python
    def A034781(n, k): return A375467(n, k) - A375467(n, k - 1)
    for n in range(2, 10): print([A034781(n, k) for k in range(2, n + 1)])
    # Peter Luschny, Aug 30 2024

Formula

Reference gives recurrence.
T(n, k) = A375467(n, k) - A375467(n, k - 1). - Peter Luschny, Aug 30 2024

Extensions

More terms from Victoria A Sapko (vsapko(AT)canes.gsw.edu), Sep 19 2003

A038081 Number of rooted identity trees of height n. Sets of rank n.

Original entry on oeis.org

1, 1, 2, 12, 65520
Offset: 0

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Comments

Next term is 2^65536 - 65536.

Crossrefs

Differences of A014221.
Column sums of A227819.

A038093 Number of nodes in largest rooted identity tree of height n.

Original entry on oeis.org

1, 2, 4, 11, 97, 3211265
Offset: 0

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Comments

The next term is 19735 digits long, which is too large even for a b-file.
Also, the sequence gives the number of pairs of braces in the n-th iteration of the von Neumann universe. - Adam P. Goucher, Aug 18 2013

Examples

			For n = 3, the n-th iteration of the von Neumann universe is V3 = {{}, {{}}, {{{}}}, {{},{{}}}}, which has a(3) = 11 pairs of braces.
		

Crossrefs

Programs

  • Maple
    h:= (b, k)-> `if`(k=0, 1, b^h(b, k-1)):
    a:= proc(n) option remember; `if`(n=0, 1,
           1+(1+a(n-1))/2*h(2, n-1))
        end:
    seq(a(n), n=0..5);  # Alois P. Heinz, Aug 25 2017
  • Mathematica
    Map[#[[1]]&,NestList[{(#[[1]]+1)*(2^#[[2]])/2+1,2^#[[2]]}&,{1,0},6]] (* Adam P. Goucher, Aug 18 2013 *)

Formula

Recurrence relation: a(n+1) = (a(n) + 1)*(2^^n)/2 + 1 where 2^^n is Knuth's up-arrow notation. - Adam P. Goucher, Aug 18 2013

Extensions

a(6) from Adam P. Goucher, Aug 18 2013

A291529 Number F(n,h,t) of forests of t (unlabeled) rooted identity trees with n vertices such that h is the maximum of 0 and the tree heights; triangle of triangles F(n,h,t), n>=0, h=0..n, t=0..n-h, read by layers, then by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 3, 0, 0, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 5, 1, 0, 0, 5, 4, 0, 0, 4, 1, 0, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 25 2017

Keywords

Comments

Positive row sums per layer (and - with a different offset - positive elements in column t=1) give A227819.
Positive column sums per layer give A227774.

Examples

			n h\t: 0 1 2 3 4 5 : A227819 : A227774   : A004111
-----+-------------+---------+-----------+--------
0 0  : 1           :         :           : 1
-----+-------------+---------+-----------+--------
1 0  : 0 1         :       1 : .         :
1 1  : 0           :         : 1         : 1
-----+-------------+---------+-----------+--------
2 0  : 0 0 0       :       0 : . .       :
2 1  : 0 1         :       1 : .         :
2 2  : 0           :         : 1 0       : 1
-----+-------------+---------+-----------+--------
3 0  : 0 0 0 0     :       0 : . . .     :
3 1  : 0 0 1       :       1 : . .       :
3 2  : 0 1         :       1 : .         :
3 3  : 0           :         : 1 1 0     : 2
-----+-------------+---------+-----------+--------
4 0  : 0 0 0 0 0   :       0 : . . . .   :
4 1  : 0 0 0 0     :       0 : . . .     :
4 2  : 0 1 1       :       2 : . .       :
4 3  : 0 1         :       1 : .         :
4 4  : 0           :         : 2 1 0 0   : 3
-----+-------------+---------+-----------+--------
5 0  : 0 0 0 0 0 0 :       0 : . . . . . :
5 1  : 0 0 0 0 0   :       0 : . . . .   :
5 2  : 0 0 2 0     :       2 : . . .     :
5 3  : 0 2 1       :       3 : . .       :
5 4  : 0 1         :       1 : .         :
5 5  : 0           :         : 3 3 0 0 0 : 6
-----+-------------+---------+-----------+--------
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, h) option remember; expand(`if`(n=0 or h=0 or i=1,
          `if`(n<2, x^(t*n), 0), b(n, i-1, t, h)+add(x^(t*j)*binomial(
           b(i-1$2, 0, h-1), j)*b(n-i*j, i-1, t, h), j=1..n/i)))
        end:
    g:= (n, h)-> b(n$2, 1, h)-`if`(h=0, 0, b(n$2, 1, h-1)):
    F:= (n, h, t)-> coeff(g(n, h), x, t):
    seq(seq(seq(F(n, h, t), t=0..n-h), h=0..n), n=0..10);
  • Mathematica
    b[n_, i_, t_, h_] := b[n, i, t, h] = Expand[If[n == 0 || h == 0 || i == 1, If[n < 2, x^(t*n), 0], b[n, i - 1, t, h] + Sum[x^(t*j)*Binomial[b[i - 1, i - 1, 0, h - 1], j]*b[n - i*j, i - 1, t, h], {j, 1, n/i}]]];
    g[n_, h_] := b[n, n, 1, h] - If[h == 0, 0, b[n, n, 1, h - 1]];
    F[n_, h_, t_] := Coefficient[g[n, h], x, t];
    Table[F[n, h, t], {n, 0, 10}, {h, 0, n}, {t, 0, n - h}] // Flatten (* Jean-François Alcover, Jun 04 2018, from Maple *)

Formula

Sum_{d=0..n} Sum_{i=0..d} F(n,i,d-i) = A004111(n+1).
Sum_{h=0..n} Sum_{t=0..n-h} t * F(n,h,t) = A291532(n).
Sum_{h=0..n-2} Sum_{t=1..n-1-h} (h+1) * F(n-1,h,t) = A291559(n).
F(n,0,0) = A000007(n).

A166830 Number of n X 3 1..2 arrays containing at least one of each value, all equal values connected, rows considered as a single number in nondecreasing order, and columns considered as a single number in nonincreasing order.

Original entry on oeis.org

2, 8, 18, 33, 54, 82, 118, 163, 218, 284, 362, 453, 558, 678, 814, 967, 1138, 1328, 1538, 1769, 2022, 2298, 2598, 2923, 3274, 3652, 4058, 4493, 4958, 5454, 5982, 6543, 7138, 7768, 8434, 9137, 9878, 10658, 11478, 12339, 13242
Offset: 1

Views

Author

R. H. Hardin, Oct 21 2009

Keywords

Examples

			All solutions for n=3
...1.1.1...1.1.1...1.1.1...1.1.1...1.1.1...1.1.1...1.1.1...1.1.1...1.1.1
...1.1.1...1.1.1...1.1.1...2.1.1...2.1.1...2.1.1...2.2.1...2.2.1...2.2.2
...2.1.1...2.2.1...2.2.2...2.1.1...2.2.1...2.2.2...2.2.1...2.2.2...2.2.2
------
...2.1.1...2.1.1...2.1.1...2.1.1...2.1.1...2.1.1...2.2.1...2.2.1...2.2.1
...2.1.1...2.1.1...2.1.1...2.2.1...2.2.1...2.2.2...2.2.1...2.2.1...2.2.2
...2.1.1...2.2.1...2.2.2...2.2.1...2.2.2...2.2.2...2.2.1...2.2.2...2.2.2
		

Programs

Formula

Empirical: a(n) = (n^3+6*n^2+11*n-6)/6.
a(n) = A167772(n+3,n). - Philippe Deléham, Nov 11 2009
a(n) = A227819(n+6,n+2). - Alois P. Heinz, Sep 22 2013
Empirical: a(n) = floor(A000292(n+1)^3/(A000292(n+1) + 1)^ 2). - Ivan N. Ianakiev, Nov 05 2013
From G. C. Greubel, May 25 2016: (Start)
Empirical G.f.: (-1 + 6*x - 6*x^2 + 2*x^3)/(1 - x)^4 + 1.
Empirical E.g.f.: (1/6)*(-6 + 18*x + 9*x^2 + x^3)*exp(x) + 1. (End)

A038088 Number of n-node rooted identity trees of height 4.

Original entry on oeis.org

1, 3, 5, 8, 12, 17, 23, 32, 41, 52, 66, 83, 102, 124, 152, 181, 216, 255, 299, 346, 400, 458, 521, 588, 659, 735, 814, 896, 979, 1067, 1151, 1239, 1324, 1407, 1486, 1564, 1635, 1700, 1759, 1809, 1853, 1887, 1912, 1925, 1932, 1925, 1912, 1887, 1853
Offset: 5

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Crossrefs

Column k=4 of A227819.

Programs

  • Maple
    weigh:= proc(p) proc(n) local x, k; coeff(series(mul((1+x^k)^p(k), k=1..n), x, n+1), x, n) end end: wsh:= p-> n-> weigh(p)(n-1): f:= n-> `if`(n>0 and n<12, [1$3, 2$5, 1$3][n], 0): a:= wsh(f)-f: seq(a(n), n=5..97); # Alois P. Heinz, Sep 10 2008
  • Mathematica
    f[n_]:=Nest[CoefficientList[Series[Product[(1+x^i)^#[[i]],{i,1,Length[#]}],{x,0,50}],x]&,{1},n];Drop[f[4]-PadRight[f[3],Length[f[4]]],4] (* Geoffrey Critzer, Aug 01 2013 *)

Formula

a(n) = A038083(n) - A038082(n).

A038089 Number of n-node rooted identity trees of height 5.

Original entry on oeis.org

1, 4, 9, 18, 34, 61, 108, 187, 318, 528, 871, 1417, 2288, 3662, 5825, 9203, 14471, 22639, 35266, 54725, 84607, 130379, 200287, 306787, 468607, 713970, 1085060, 1645181, 2488771, 3756778, 5658871, 8506900, 12763178, 19112874, 28568961, 42627442, 63493739
Offset: 6

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Comments

The number of terms with a(n)>0 is A038093(5)-5 = 3211260. - Alois P. Heinz, Sep 22 2013

Crossrefs

Column k=5 of A227819.

Programs

  • Maple
    weigh:= proc(p) proc(n) local x, k; coeff(series(mul((1+x^k)^p(k), k=1..n), x, n+1), x, n) end end: wsh:= p-> n-> weigh(p)(n-1): f:= n-> `if`(n>0 and n<12, [1$3, 2$5, 1$3][n], 0): a:= (wsh@@2)(f)-wsh(f): seq(a(n), n=6..40);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    f[n_]:=Nest[CoefficientList[Series[Product[(1+x^i)^#[[i]],{i,1,Length[#]}],{x,0,50}],x]&,{1},n];Drop[f[5]-PadRight[f[4], Length[f[5]]],5] (* Geoffrey Critzer, Aug 01 2013 *)

Formula

A038090 Number of n-node rooted identity trees of height 6.

Original entry on oeis.org

1, 5, 14, 33, 72, 149, 301, 599, 1170, 2254, 4288, 8081, 15087, 27971, 51500, 94293, 171724, 311328, 562023, 1010819, 1811676, 3236959, 5766793, 10246734, 18162241, 32119542, 56682671, 99833464, 175509158, 308014335, 539675744, 944115593, 1649236884
Offset: 7

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Comments

The number of terms with a(n)>0 is A038093(6) - 6. - Alois P. Heinz, Sep 22 2013

Crossrefs

Column k=6 of A227819.

Programs

  • Maple
    weigh:= proc(p) proc(n) local x, k; coeff(series(mul((1+x^k)^p(k), k=1..n), x,n+1), x,n) end end: wsh:= p-> n-> weigh(p)(n-1): f:= n-> `if`(n>0 and n<12, [1$3, 2$5, 1$3][n], 0): a:= (wsh@@3)(f)-(wsh@@2)(f): seq(a(n), n=7..37);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    f[n_]:=Nest[CoefficientList[Series[Product[(1+x^i)^#[[i]],{i,1,Length[#]}],{x,0,50}],x]&,{1},n];Drop[f[6]-PadRight[f[5],Length[f[6]]],6] (* Geoffrey Critzer, Aug 01 2013 *)

Formula

A038091 Number of n-node rooted identity trees of height 7.

Original entry on oeis.org

1, 6, 20, 54, 132, 303, 672, 1460, 3120, 6575, 13707, 28296, 57938, 117764, 237878, 477781, 954910, 1899930, 3765054, 7433724, 14628436, 28698388, 56143591, 109550807, 213251179, 414190801, 802808056, 1553046868, 2998986556, 5781366468, 11127506290
Offset: 8

Views

Author

Christian G. Bower, Jan 04 1999

Keywords

Comments

The number of terms with a(n)>0 is A038093(7) - 7. - Alois P. Heinz, Sep 22 2013

Crossrefs

Column k=7 of A227819.

Programs

  • Maple
    weigh:= proc(p) proc(n) local x,k; coeff(series(mul((1+x^k)^p(k), k=1..n), x,n+1), x,n) end end: wsh:= p-> n-> weigh(p)(n-1): f:= n-> `if`(n>0 and n<12, [1$3,2$5,1$3][n], 0): a:= (wsh@@4)(f)-(wsh@@3)(f): seq(a(n), n=8..36);  # Alois P. Heinz, Sep 10 2008
  • Mathematica
    f[n_]:=Nest[CoefficientList[Series[Product[(1+x^i)^#[[i]],{i,1,Length[#]}],{x,0,50}],x]&,{1},n];Drop[f[7]-PadRight[f[6],Length[f[7]]],7] (* Geoffrey Critzer, Aug 01 2013 *)

Formula

Showing 1-10 of 15 results. Next