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 11 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

A318758 Number T(n,k) of rooted trees with n nodes such that k equals the maximal number of isomorphic subtrees extending from the same node; triangle T(n,k), n>=1, 0<=k<=n-1, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 4, 1, 1, 0, 6, 9, 3, 1, 1, 0, 12, 22, 9, 3, 1, 1, 0, 25, 54, 23, 8, 3, 1, 1, 0, 52, 138, 60, 23, 8, 3, 1, 1, 0, 113, 346, 164, 61, 22, 8, 3, 1, 1, 0, 247, 889, 443, 167, 61, 22, 8, 3, 1, 1, 0, 548, 2285, 1209, 461, 168, 60, 22, 8, 3, 1, 1
Offset: 1

Views

Author

Alois P. Heinz, Sep 02 2018

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k < n. T(n,k) = 0 for k >= n.

Examples

			Triangle T(n,k) begins:
  1;
  0,   1;
  0,   1,   1;
  0,   2,   1,   1;
  0,   3,   4,   1,  1;
  0,   6,   9,   3,  1,  1;
  0,  12,  22,   9,  3,  1, 1;
  0,  25,  54,  23,  8,  3, 1, 1;
  0,  52, 138,  60, 23,  8, 3, 1, 1;
  0, 113, 346, 164, 61, 22, 8, 3, 1, 1;
		

Crossrefs

Columns k=0-10 give: A063524, A004111 (for n>1), A318859, A318860, A318861, A318862, A318863, A318864, A318865, A318866, A318867.
Row sums give A000081.
T(2n+2,n+1) gives A255705.

Programs

  • Maple
    h:= proc(n, m, t, k) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1, k), j=1..min(k, m))))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1, k)*h(A(i, k), j, 0, k), j=0..n/i)))
        end:
    A:= (n, k)-> `if`(n<2, n, b(n-1$2, k)):
    T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
    seq(seq(T(n, k), k=0..n-1), n=1..14);
  • Mathematica
    h[n_, m_, t_, k_] := h[n, m, t, k] = If[m == 0, Binomial[n + t, t], If[n == 0, 0, Sum[h[n - 1, m - j, t + 1, k], {j, 1, Min[k, m]}]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, k]*h[A[i, k], j, 0, k], {j, 0, n/i}]]];
    A[n_, k_] := If[n < 2, n, b[n - 1, n - 1, k]];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
    Table[T[n, k], {n, 1, 14}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, May 11 2019, after Alois P. Heinz *)

Formula

T(n,k) = A318757(n,k) - A318757(n,k-1) for k > 0, A(n,0) = A063524(n).

A248869 Satisfies Sum_{n>=0} a(n)*x^n = x * Product_{n>=0} (1 + x^n + x^(2*n))^a(n).

Original entry on oeis.org

0, 1, 1, 2, 3, 7, 15, 34, 79, 190, 459, 1136, 2833, 7154, 18206, 46723, 120656, 313514, 818763, 2148434, 5660790, 14972103, 39734107, 105779291, 282403830, 755921733, 2028277115, 5454368549, 14697955778, 39682793675, 107330573239, 290783511134, 789032648219
Offset: 0

Views

Author

Joerg Arndt, Mar 04 2015

Keywords

Comments

What kind of trees are counted by this sequence (compare with A000081, A004111, A073075, and A115593)?
a(n) is the number of rooted trees of n vertices that have everywhere at most 2 siblings with the same (i.e., isomorphic) subtree below. The g.f. assembles a(n) as a root with child subtrees from among the smaller a(), but takes only 0, 1 or 2 copies of any one of them. Compare asymmetric trees A004111 g.f. which takes 0 or 1 copies. Here the x^(2*n) term allows a 2nd copy. The siblings condition is equivalent to the condition that the tree automorphisms form a 2-group, i.e., group order some power 2^k. 2 same siblings are a swap. 3 same siblings would be an element of order 3 and hence factor 3 in the group order. a(n) >= A213920 since the latter limits same size siblings, whereas here only limits same size plus structure. - Kevin Ryde, Jul 11 2019

Crossrefs

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(2, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 04 2018
  • Mathematica
    h[n_, m_, t_] := h[n, m, t] = If[m == 0, Binomial[n + t, t], If[n == 0, 0, Sum[h[n - 1, m - j, t + 1], {j, 1, Min[2, m]}]]];
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i j, i - 1]* h[a[i], j, 0], {j, 0, n/i}]]];
    a[n_] := If[n < 2, n, b[n - 1, n - 1]];
    a /@ Range[0, 32] (* Jean-François Alcover, Oct 02 2019, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.8458470164106425911151048..., c = 0.41694347809945986693376... . - Vaclav Kotesovec, Mar 17 2015
a(n) = A004111(n) + A318859(n). - Kevin Ryde, Jul 11 2019

A318857 Number of rooted trees with n nodes such that no more than ten isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4765, 12484, 32968, 87798, 235346, 634752, 1720897, 4687949, 12824195, 35216118, 97039045, 268237121, 743594937, 2066803841, 5758576675, 16080698759, 44998355630, 126161517745, 354354779794, 996963790045, 2809334906744, 7928088014833, 22404525682620
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Comments

This differs from A318804 first at n=34.

Crossrefs

Column k=10 of A318757.
Cf. A318804.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(10, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318850 Number of rooted trees with n nodes such that no more than three isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 8, 18, 43, 102, 250, 623, 1579, 4042, 10473, 27356, 72049, 190991, 509384, 1365586, 3678369, 9949452, 27014550, 73600711, 201153143, 551329088, 1515078957, 4173575232, 11522620375, 31878127954, 88362886345, 245372235144, 682508792835
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=3 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(3, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318851 Number of rooted trees with n nodes such that no more than four isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 19, 46, 110, 273, 684, 1746, 4503, 11758, 30943, 82118, 219341, 589485, 1592447, 4322433, 11781565, 32235688, 88503331, 243750729, 673246211, 1864422803, 5175655984, 14399854855, 40146793094, 112145140408, 313826549732, 879685174894
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=4 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(4, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318852 Number of rooted trees with n nodes such that no more than five isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 47, 113, 281, 706, 1807, 4671, 12223, 32245, 85777, 229670, 618732, 1675523, 4559000, 12456756, 34166545, 94034740, 259621512, 718846854, 1995610386, 5553500697, 15489256677, 43290763753, 121226491459, 340079258393, 955634312429
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=5 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(5, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318853 Number of rooted trees with n nodes such that no more than six isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 114, 284, 714, 1829, 4731, 12391, 32711, 87083, 233347, 629132, 1705026, 4642964, 12696279, 34851400, 95996673, 265251812, 735029389, 2042187079, 5687726124, 15876511622, 44409196932, 124459720195, 349434222059, 982723600768
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=6 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(6, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318854 Number of rooted trees with n nodes such that no more than seven isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 115, 285, 717, 1837, 4753, 12451, 32878, 87549, 234654, 632813, 1715444, 4672539, 12780498, 35091807, 96684475, 267223388, 740690724, 2058468456, 5734614714, 16011714554, 44799497491, 125587597952, 352696620393, 992168348175
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=7 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(7, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);

A318855 Number of rooted trees with n nodes such that no more than eight isomorphic subtrees extend from the same node.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 20, 48, 115, 286, 718, 1840, 4761, 12473, 32938, 87716, 235119, 634120, 1719126, 4682961, 12810091, 35176098, 96925138, 267912073, 742665243, 2064139425, 5750927105, 16058701943, 44935012272, 125978876163, 353827545217, 995440198833
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2018

Keywords

Crossrefs

Column k=8 of A318757.

Programs

  • Maple
    h:= proc(n, m, t) option remember; `if`(m=0, binomial(n+t, t),
          `if`(n=0, 0, add(h(n-1, m-j, t+1), j=1..min(8, m))))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1)*h(a(i), j, 0), j=0..n/i)))
        end:
    a:= n-> `if`(n<2, n, b(n-1$2)):
    seq(a(n), n=0..35);
Showing 1-10 of 11 results. Next