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.

Previous Showing 31-40 of 67 results. Next

A299039 Number of rooted trees with 2n nodes where each node has at most n children.

Original entry on oeis.org

1, 1, 3, 17, 106, 693, 4690, 32754, 234746, 1719325, 12820920, 97039824, 743680508, 5759507657, 45006692668, 354425763797, 2809931206626, 22409524536076, 179655903886571, 1447023307374888, 11703779855021636, 95020085240320710, 774088021528328920
Offset: 0

Views

Author

Alois P. Heinz, Feb 01 2018

Keywords

Examples

			a(2) = 3:
   o     o       o
   |     |      / \
   o     o     o   o
   |    / \    |
   o   o   o   o
   |
   o
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> `if`(n=0, 1, b(2*n-1$2, n$2)):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[ Binomial[b[i - 1, i - 1, k, k] + j - 1, j]*b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]]];
    a[n_] := If[n == 0, 1, b[2n - 1, 2n - 1, n, n]];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jun 04 2018, from Maple *)

Formula

a(n) = A299038(2n,n).
a(n) ~ c * d^n / n^(3/2), where d = A051491^2 = 8.736548423865419449938118272879... and c = A187770 / 2^(3/2) = 0.155536626247883986039760097126... - Vaclav Kotesovec, Feb 02 2018, updated Mar 17 2024

A000444 Number of partially labeled rooted trees with n nodes (3 of which are labeled).

Original entry on oeis.org

9, 64, 326, 1433, 5799, 22224, 81987, 293987, 1031298, 3555085, 12081775, 40576240, 134919788, 444805274, 1455645411, 4733022100, 15302145060, 49223709597, 157629612076, 502736717207, 1597541346522, 5059625685739, 15975936032821, 50304490599602
Offset: 3

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 134.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=3 of A008295.
Cf. A042977.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-2)^3*(9-8*B(n-2)+2*B(n-2)^2)/(1-B(n-2))^5, x=0, n+1), x,n): seq(a(n), n=3..24); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1-j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum [b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[Series[B[n-2]^3*(9 - 8*B[n-2] + 2*B[n-2]^2)/(1 - B[n-2])^5, {x, 0, n+1}], x, n]; Table[a[n], {n, 3, 30}] (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)

Formula

G.f.: A(x) = B(x)^3*(9-8*B(x)+2*B(x)^2)/(1-B(x))^5, where B(x) is g.f. for rooted trees with n nodes, cf. A000081.
a(n) ~ c * d^n * n^(3/2), where d = A051491 = 2.9557652856519949747148..., c = 0.244665117500618173509... . - Vaclav Kotesovec, Sep 11 2014

Extensions

More terms from Vladeta Jovovic, Oct 19 2001

A029852 Number of connected functions on n points with a loop of length 3.

Original entry on oeis.org

1, 1, 3, 9, 23, 62, 169, 451, 1217, 3291, 8916, 24243, 66155, 181053, 497134, 1369064, 3780942, 10469573, 29063361, 80867990, 225508124, 630145449, 1764240907, 4948365051, 13902893423, 39124094362, 110265280739, 311208414556, 879523722747, 2488832434859
Offset: 3

Views

Author

Keywords

Crossrefs

Column 3 of A339428.
Cf. A000081.

Programs

  • Mathematica
    nn = 20; f[x_] := Sum[a[n] x^n, {n, 0, nn}]; sol =
    SolveAlways[
      0 == Series[
        f[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}],
      x]; b = Flatten[Table[a[n], {n, 1, nn}] /. sol]; CoefficientList[
    Series[CycleIndex[CyclicGroup[3], s] /.
       Table[s[i] -> Sum[b[[k]] x^(k*i), {k, 1, nn}], {i, 1, 3}], {x, 0,
    nn}], x] (* Geoffrey Critzer, Aug 08 2013 *)

Formula

G.f.: A(x) = ( B(x)^3 + 2*B(x^3) )/3 where B(x) is o.g.f. for A000081. - Geoffrey Critzer, Aug 09 2013
a(n) ~ A187770 * A051491^n / n^(3/2). - Vaclav Kotesovec, Dec 25 2020

A029853 Number of connected functions on n points with a loop of length 4.

Original entry on oeis.org

1, 1, 4, 11, 35, 97, 282, 792, 2243, 6275, 17602, 49206, 137713, 385208, 1078667, 3022342, 8478199, 23807190, 66932592, 188394855, 530911452, 1497892857, 4230987944, 11964356354, 33869704270, 95982410945, 272279600817, 773153124315, 2197492308752
Offset: 4

Views

Author

Keywords

Crossrefs

Column 4 of A339428.

Programs

  • Mathematica
    nn = 20; f[x_] := Sum[a[n] x^n, {n, 0, nn}]; sol =
    SolveAlways[
      0 == Series[
        f[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}],
      x]; b = Flatten[Table[a[n], {n, 1, nn}] /. sol]; CoefficientList[
    Series[CycleIndex[CyclicGroup[4], s] /.
       Table[s[i] -> Sum[b[[k]] x^(k*i), {k, 1, nn}], {i, 1, 4}], {x, 0,
    nn}], x] (* Geoffrey Critzer, Aug 08 2013 *)

Formula

G.f.: A(x) = ( B(x)^4 + B(x^2)^2 + 2*B(x^4) )/4 where B(x) is the o.g.f. for A000081. - Geoffrey Critzer, Aug 09 2013
a(n) ~ A187770 * A051491^n / n^(3/2). - Vaclav Kotesovec, Dec 25 2020

A029868 Number of connected functions on n points with a loop of length 5.

Original entry on oeis.org

1, 1, 4, 14, 46, 145, 440, 1315, 3877, 11315, 32792, 94529, 271510, 777764, 2223865, 6350657, 18120730, 51680249, 147359335, 420163711, 1198151432, 3417475326, 9750708533, 27831153091, 79471338455, 227032777454, 648896436944, 1855571389651, 5308837191604
Offset: 5

Views

Author

Keywords

Crossrefs

Column 5 of A339428.

Programs

  • Mathematica
    nn = 20; f[x_] := Sum[a[n] x^n, {n, 0, nn}]; sol =
    SolveAlways[
      0 == Series[
        f[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}],
      x]; b = Flatten[Table[a[n], {n, 1, nn}] /. sol]; CoefficientList[
    Series[CycleIndex[CyclicGroup[5], s] /.
       Table[s[i] -> Sum[b[[k]] x^(k*i), {k, 1, nn}], {i, 1, 5}], {x, 0,
    nn}], x] (* Geoffrey Critzer, Aug 08 2013 *)

Formula

"CIK[ 5 ]" (necklace, indistinct, unlabeled, 5 parts) transform of A000081.
G.f.: A(x) = ( B(x)^5 +4*B(x^5) )/5 where B(x) is the o.g.f. for A000081. - Geoffrey Critzer, Aug 09 2013
a(n) ~ A187770 * A051491^n / n^(3/2). - Vaclav Kotesovec, Dec 25 2020

A029869 Number of connected functions on n points with a loop of length 6.

Original entry on oeis.org

1, 1, 5, 18, 63, 206, 671, 2087, 6434, 19472, 58375, 173316, 511452, 1500697, 4386021, 12775455, 37118209, 107621858, 311552351, 900775893, 2601887149, 7510011727, 21664873773, 62473966631, 180104101037, 519126161517, 1496177366884, 4312044894059, 12427896986697
Offset: 6

Views

Author

Keywords

Crossrefs

Column 6 of A339428.

Formula

"CIK[ 6 ]" (necklace, indistinct, unlabeled, 6 parts) transform of A000081.
a(n) ~ A187770 * A051491^n / n^(3/2). - Vaclav Kotesovec, Dec 25 2020

Extensions

Terms a(31) and beyond from Andrew Howroyd, Dec 08 2020

A181360 Number of forests of rooted trees containing n nodes not counting the root nodes.

Original entry on oeis.org

1, 1, 3, 7, 19, 47, 127, 330, 889, 2378, 6450, 17510, 47907, 131388, 362081, 1000665, 2774857, 7714695, 21505455, 60084062, 168234804, 471977022, 1326558625, 3734804268, 10531738149, 29742332548, 84111212892, 238176473946, 675269414372, 1916715819186
Offset: 0

Views

Author

Peter A. Lawrence, Oct 15 2010

Keywords

Comments

Every tree in the forest must have at least 2 nodes, i.e. at least one more node besides the root. - N. J. A. Sloane, Nov 26 2010
First, T(n), the number of rooted trees with n+1 nodes A000081(n+1) can be computed using partitions of n as follows: let n = (q1*1 + q2*2 + q3*3 + ... + qn*n) be a nonnegative integer partition of n (the "q"s are the multiplicities of the part sizes), and define a^b to be (a+b-1)! / (a-1)! / b! (the number of ways to color b identical items with a colors), then compute the sum of T(0)^q1 * T(1)^q2 * ... * T(n-1)^qn over all such partitions of n.
Then F(n), the number of forests of rooted trees containing N nodes not counting the roots, can be similarly computed as the sum of T(1)^q1 * T(2)^q2 * ... * T(n)^qn over all such partitions of n.
These are the diagonal sums of the triangle in A174135. - N. J. A. Sloane, Nov 26 2010.

Examples

			Trees for example (leaving out the "^0" factors for clarity):
T(0) = 1, T(1) = 1
T(2) = T(1)^1 + T(0)^2 = 2,
T(3) = T(2)^1 + T(1)^1*T(0)^1 + T(0)^3 = 4,
T(4) = T(3)^1 + T(2)^1*T(0)^1 + T(1)^2 + T(1)^1*T(0)^2 +T(0)^4 = 9,
T(5) = T(4)^1 + T(3)^1*T(0)^1 + T(2)^1*T(1)^1 + T(2)^1*T(0)^2 + T(1)^2*T(0)^1 + T(1)^1*T(0)^3 + T(0)^5 = 20.
Forests for example (leaving out the "^0" factors for clarity):
F(2) = T(2)^1 + T(1)^2 = 3,
F(3) = T(3)^1 + T(2)^1*T(1)^1 + T(1)^3 = 7,
F(4) = T(4)^1 + T(3)^1*T(1)^1 + T(2)^2 + T(2)*T(1)^2 + T(1)^4 = 19,
F(5) = T(5)^1 + T(4)^1*T(1)^1 + T(3)^1*T(2)^1 + T(3)^1*T(1)^2 + T(2)^2*T(1)^1 + T(2)^1*T(1)^3 + T(1)^5 = 47.
{Examples of this a^b definition:
2^1 = 2, 2^2 = 3, 2^3 = 4, 2^4 = 5,
3^1 = 3, 3^2 = 6, 3^3 = 10, 3^4 = 15, (triangular numbers)
4^1 = 4, 4^2 = 10, 4^3 = 20, 4^4 = 35, (tetrahedral numbers)
equivalently a^b = (b == 0 ? 1 : (a == 1 || b == 1 ? a : (a * (a+1)^(b-1) / b))) }
		

Crossrefs

Cf. A000081 (rooted trees).
Cf. A093637 (products of partition numbers).

Programs

  • Maple
    (From N. J. A. Sloane, Nov 26 2010) First read 110 terms of A000081 into array b1
    M:=100;
    t1:=1/mul((1-x*y^i)^b1[i+1],i=2..M):
    t2:=series(t1,y,M):
    t3:=series(t2,x,M):
    a:=(n,k)->coeff(coeff(t3,x,k),y,n);
    g:=n->add(a(n-1+i,i),i=1..n-1);
    [seq(g(n),n=1..48)];
    # second Maple program:
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(T(i-1)+j-1, j) *g(n-i*j, i-1), j=0..n/i)))
        end:
    T:= n-> g(n, n):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(T(i)+j-1, j) *b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2012
    # third Maple program:
    g:= proc(n) option remember; `if`(n<=1, n, (add(add(d*
          g(d), d=numtheory[divisors](j))*g(n-j), j=1..n-1))/(n-1))
        end:
    a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
          g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 19 2017
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[T[i-1]+j-1, j]*g[n-i*j, i-1], {j, 0, n/i}]]]; T[n_] := g[n, n]; b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[T[i]+j-1, j]*b[n-i*j, i-1], {j, 0, n/i}]]]; a[n_] := b[n, n] // FullSimplify; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 30 2015, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.955765285651994974714817524... is the Otter's rooted tree constant (see A051491), and c = 10.088029891871277227771831767... . - Vaclav Kotesovec, May 09 2014
a(n) = A033185(2n, n). - Alois P. Heinz, Feb 15 2016
a(n) = A033185(2n+k, n+k) for all n, k >= 0. - Michael Somos, Aug 20 2018

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 19 2017

A199812 Number of distinct values taken by w^w^...^w (with n w's and parentheses inserted in all possible ways) where w is the first transfinite ordinal omega.

Original entry on oeis.org

1, 1, 2, 5, 13, 32, 79, 193, 478, 1196, 3037, 7802, 20287, 53259, 141069, 376449, 1011295, 2732453, 7421128, 20247355
Offset: 1

Views

Author

Vladimir Reshetnikov, Nov 10 2011

Keywords

Comments

Any transfinite ordinal can be used instead of omega, yielding the same sequence.
It appears that 2nd differences of this sequence give A174145 (starting from offset 2).
Conjectured extension of this sequence is given by A255170.

Examples

			For n=5 there are 14 possible parenthesizations, but only 13 of them produce distinct ordinals: (((w^w)^w)^w)^w < ((w^w)^w)^(w^w) < ((w^w)^(w^w))^w < ((w^(w^w))^w)^w < (w^(w^w))^(w^w) < (w^w)^((w^w)^w) < (w^((w^w)^w))^w < w^(((w^w)^w)^w) < (w^w)^(w^(w^w)) = w^((w^w)^(w^w)) < (w^(w^(w^w)))^w < w^((w^(w^w))^w) < w^(w^((w^w)^w)) < w^(w^(w^(w^w))). So, a(5)=13.
		

Crossrefs

Cf. A000108 (upper bound), A174145 (2nd differences?), A255170 (conjectured extension), A005348, A002845, A198683, A000081 (similar asymptotics), A051491.

Programs

  • Mathematica
    (* Slow exhaustive search *)
    _ \[Precedes] {} = False;
    {} \[Precedes] {} = True;
    {a_ \[Diamond] , __} \[Precedes] {b_ \[Diamond] , __} := a \[Precedes] b /; a =!= b;
    {a_ \[Diamond] m_, _} \[Precedes] {a_ \[Diamond] n_, _} := m < n /; m != n;
    {z_, x___} \[Precedes] {z_, y___} := {x} \[Precedes] {y};
    m_ \[CirclePlus] {} := m;
    {} \[CirclePlus] n_ := n;
    {x___, a_ \[Diamond] m_} \[CirclePlus] {a_ \[Diamond] n_, y___} := {x, a \[Diamond] (m + n), y};
    {x___, a_ \[Diamond] m_} \[CirclePlus] z : {b_ \[Diamond] n_, y___} := If[a \[Precedes] b, {x} \[CirclePlus] z, {x, a \[Diamond] m, b \[Diamond] n, y}];
    {} \[CircleTimes] _ = {};
    _ \[CircleTimes] {} = {};
    {a_ \[Diamond] m_, x___} \[CircleTimes] {b_ \[Diamond] n_} := If[b === {}, {a \[Diamond] (m n), x}, {(a \[CirclePlus] b) \[Diamond] n}];
    x_ \[CircleTimes] {y_, z__} := x \[CircleTimes] {y} \[CirclePlus] x \[CircleTimes] {z};
    f[1] = {{{} \[Diamond] 1}};
    f[n_] := f[n] = Union[Flatten[Table[Outer[#1 \[CircleTimes] {#2 \[Diamond] 1} &, f[k], f[n - k], 1], {k, n - 1}], 2]];
    Table[Length[f[n]], {n, 1, 17}]

Formula

Conjecture: a(n) ~ c * d^n * n^(-3/2), where c = 0.664861... and d = A051491 = 2.955765... - Vladimir Reshetnikov, Aug 11 2016

Extensions

a(18)-a(20) from Robert G. Wilson v, Sep 15 2012

A215982 Number of simple unlabeled graphs on n nodes with exactly 2 connected components that are trees or cycles.

Original entry on oeis.org

1, 1, 3, 5, 10, 17, 33, 62, 127, 267, 587, 1326, 3085, 7326, 17731, 43585, 108563, 273544, 696113, 1787042, 4623125, 12043071, 31565842, 83200763, 220413272, 586625403, 1567930743, 4207181144, 11329835687, 30613313339, 82975300030, 225552632043, 614787508640
Offset: 2

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

			a(5) = 5: .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  .
		

Crossrefs

Column k=2 of A215977.
The labeled version is A215852.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if` (n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; local k; `if`(n>2, 1, 0)+ b(n)-
          (add(b(k)*b(n-k), k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2
        end:
    p:= proc(n, i, t) option remember; `if`(n p(n, n, 2):
    seq(a(n), n=2..40);
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n-j], {j, 1, n-1}]/(n-1)]; g[n_] := g[n] = If[n>2, 1, 0]+b[n]-(Sum [b[k]*b[n-k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2; p[n_, i_, t_] := p[n, i, t] = If[nJean-François Alcover, Dec 04 2014, translated from Maple *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial, divisors
    @cacheit
    def b(n): return n if n<2 else sum([sum([d*b(d) for d in divisors(j)])*b(n - j) for j in range(1, n)])//(n - 1)
    @cacheit
    def g(n): return (1 if n>2 else 0) + b(n) - (sum([b(k)*b(n - k) for k in range(n + 1)]) - (b(n//2) if n%2==0 else 0))//2
    @cacheit
    def p(n, i, t): return 0 if nIndranil Ghosh, Aug 07 2017

Formula

a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148..., c = 0.3339525664158379... . - Vaclav Kotesovec, Sep 07 2014

A215983 Number of simple unlabeled graphs on n nodes with exactly 3 connected components that are trees or cycles.

Original entry on oeis.org

1, 1, 3, 6, 12, 23, 47, 92, 189, 401, 869, 1949, 4475, 10520, 25183, 61366, 151555, 379164, 958555, 2446746, 6296819, 16326996, 42613240, 111889355, 295372835, 783598713, 2088175182, 5587741350, 15009229137, 40458659246, 109416872688, 296810505298
Offset: 3

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

			a(5) = 3: .o o-o.  .o o-o.  .o o o.
          .  |/ .  .  |  .  .| |  .
          .o o  .  .o o  .  .o o  .
		

Crossrefs

Column k=3 of A215977.
The labeled version is A215853.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; local k; `if`(n>2, 1, 0)+ b(n)-
          (add(b(k)*b(n-k), k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2
        end:
    p:= proc(n, i, t) option remember; `if`(n p(n, n, 3):
    seq(a(n), n=3..40);
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}]/(n - 1)];
    g[n_] := g[n] = If[n > 2, 1, 0] + b[n] - (Sum[b[k]*b[n - k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2;
    p[n_, i_, t_] := p[n, i, t] = If[n < t, 0, If[n == t, 1, If[Min[i, t] < 1, 0, Sum[Binomial[g[i] + j - 1, j]*p[n - i*j, i - 1, t - j], {j, 0, Min[n/i, t]}]]]];
    a[n_] := p[n, n, 3];
    a /@ Range[3, 40] (* Jean-François Alcover, Dec 18 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.9557652856519949747148..., c = 0.13932434077355395... . - Vaclav Kotesovec, Sep 07 2014
Previous Showing 31-40 of 67 results. Next