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 14 results. Next

A027852 Number of connected functions on n points with a loop of length 2.

Original entry on oeis.org

0, 1, 1, 3, 6, 16, 37, 96, 239, 622, 1607, 4235, 11185, 29862, 80070, 216176, 586218, 1597578, 4370721, 12003882, 33077327, 91433267, 253454781, 704429853, 1962537755, 5479855546, 15332668869, 42983656210, 120716987723, 339596063606, 956840683968
Offset: 1

Views

Author

Christian G. Bower, Dec 14 1997

Keywords

Comments

Number of unordered pairs of rooted trees with a total of n nodes.
Equivalently, the number of rooted trees on n+1 nodes where the root has degree 2.
Number of trees on n nodes rooted at an edge. - Washington Bomfim, Jul 06 2012
Guy (1988) calls these tadpole graphs. - N. J. A. Sloane, Nov 04 2014
Number of unicyclic graphs of n nodes with a cycle length of two (in other words, a double edge). - Washington Bomfim, Dec 02 2020

Crossrefs

Column 2 of A033185 (forests of rooted trees), A217781 (unicyclic graphs), A339303 (unoriented linear forests) and A339428 (connected functions).

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: a:= n-> (add(b(i) *b(n-i), i=0..n) +`if`(irem(n, 2)=0, b(n/2), 0))/2: seq(a(n), n=1..50);  # Alois P. Heinz, Aug 22 2008, revised Oct 07 2011
    # second, re-usable version
    A027852 := proc(N::integer)
        local dh, Nprime;
        dh := 0 ;
        for Nprime from 0 to N do
            dh := dh+A000081(Nprime)*A000081(N-Nprime) ;
        end do:
        if type(N,'even') then
            dh := dh+A000081(N/2) ;
        end if;
        dh/2 ;
    end proc: # R. J. Mathar, Mar 06 2017
  • Mathematica
    Needs["Combinatorica`"];nn = 30; s[n_, k_] := s[n, k] = a[n + 1 - k] + If[n < 2 k, 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); rt = Table[a[i], {i, 1, nn}]; Take[CoefficientList[CycleIndex[DihedralGroup[2], s] /. Table[s[j] -> Table[Sum[rt[[i]] x^(k*i), {i, 1, nn}], {k, 1, nn}][[j]], {j, 1, nn}], x], {2, nn}]  (* Geoffrey Critzer, Oct 12 2012, after code given by Robert A. Russell in A000081 *)
    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)];
    a[n_] := (Sum[b[i] b[n-i], {i, 0, n}] + If[Mod[n, 2] == 0, b[n/2], 0])/2;
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 30 2018, after Alois P. Heinz *)
  • PARI
    seq(max_n)= { my(V = f = vector(max_n), i=1,s); f[1]=1;
    for(j=1, max_n - 1, f[j+1] = 1/j * sum(k=1, j, sumdiv(k,d, d * f[d]) * f[j-k+1]));
    for(n = 1, max_n, s = sum(k = 1, (n-1)/2, ( f[k] * f[n-k] ));
    if(n % 2 == 1, V[i] = s, V[i] = s + (f[n/2]^2 + f[n/2])/2); i++); V };
    \\ Washington Bomfim, Jul 06 2012 and Dec 01 2020

Formula

G.f.: A(x) = (B(x)^2 + B(x^2))/2 where B(x) is g.f. of A000081.
a(n) = Sum_{k=1..(n-1)/2}( f(k)*f(n-k) ) + [n mod 2 = 0] * ( f(n/2)^2+f(n/2) ) /2, where f(n) = A000081(n). - Washington Bomfim, Jul 06 2012 and Dec 01 2020
a(n) ~ c * d^n / n^(3/2), where d = A051491 = 2.9557652856519949747148..., c = A187770 = 0.43992401257102530404090339... . - Vaclav Kotesovec, Sep 12 2014
2*a(n) = A000106(n) + A000081(n/2), where A(.)=0 if the argument is non-integer. - R. J. Mathar, Jun 04 2020

Extensions

Edited by Christian G. Bower, Feb 12 2002

A002861 Number of connected functions (or mapping patterns) on n unlabeled points, or number of rings and branches with n edges.

Original entry on oeis.org

1, 2, 4, 9, 20, 51, 125, 329, 862, 2311, 6217, 16949, 46350, 127714, 353272, 981753, 2737539, 7659789, 21492286, 60466130, 170510030, 481867683, 1364424829, 3870373826, 10996890237, 31293083540, 89173833915, 254445242754, 726907585652, 2079012341822
Offset: 1

Views

Author

Keywords

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6.6.
  • R. A. Fisher, Contributions to Mathematical Statistics, Wiley, 1950, 41.399.
  • 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

Row sums of A339428.

Programs

  • Maple
    spec2861 := [B, {A=Prod(Z,Set(A)), B=Cycle(A)}, unlabeled]; [seq(combstruct[count](spec2861,size=n), n=1..27)];
  • Mathematica
    Needs["Combinatorica`"];
    nn = 30; s[n_, k_] := s[n, k] = a[n + 1 - k] + If[n < 2 k, 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); rt = Table[a[i],{i, 1, nn}]; Apply[Plus, Table[Take[CoefficientList[CycleIndex[CyclicGroup[n], s] /. Table[s[j] -> Table[Sum[rt[[i]] x^(k * i), {i, nn}], {k, 1, nn}][[j]], {j, nn}], x], nn], {n, 30}]]  (* Geoffrey Critzer, Oct 12 2012, after code given by Robert A. Russell in A000081 *)
    M = 66; A = Table[1, {M + 1}]; For[n = 1, n <= M, n++, A[[n + 1]] = 1/n * Sum[Sum[d * A[[d]], {d, Divisors[k]}] * A[[n - k + 1]], {k, n}]]; A81 = {0} ~ Join ~ A; H[t_] = A81.t^Range[0, Length[A81] - 1]; L = Sum[EulerPhi[j]/j * Log[1/(1 - H[x^j])], {j, M}] + O[x]^M; CoefficientList[L, x] // Rest (* Jean-François Alcover, Dec 28 2019, after Joerg Arndt *)
  • 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, d * A[d]) * A[n-k+1] ) );
    A000081=concat([0], A);
    H(t)=subst(Ser(A000081, 't), 't, t);
    x='x+O('x^N);
    L=sum(j=1,N, eulerphi(j)/j * log(1/(1-H(x^j))));
    Vec(L)
    \\ Joerg Arndt, Jul 10 2014

Formula

CIK transform of A000081.
a(n) = A000081 + A027852 + A029852 + A029853 + A029868 + ... - Geoffrey Critzer, Oct 12 2012

Extensions

More terms from Philippe Flajolet and Paul Zimmermann, Mar 15 1996

A217781 Triangular array read by rows: T(n,k) is the number of n-node connected graphs with exactly one cycle of length k (and no other cycles) for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 9, 6, 3, 1, 1, 20, 16, 7, 4, 1, 1, 48, 37, 18, 9, 4, 1, 1, 115, 96, 44, 28, 10, 5, 1, 1, 286, 239, 117, 71, 32, 13, 5, 1, 1, 719, 622, 299, 202, 89, 45, 14, 6, 1, 1, 1842, 1607, 793, 542, 264, 130, 52, 17, 6, 1, 1
Offset: 1

Views

Author

Geoffrey Critzer, Mar 24 2013

Keywords

Comments

Note that the structures counted in columns 1 and 2 are not simple graphs as we are allowing a self loop (column 1) and a double edge (column 2).

Examples

			Triangle begins:
    1;
    1,   1;
    2,   1,   1;
    4,   3,   1,   1;
    9,   6,   3,   1,   1;
   20,  16,   7,   4,   1,   1;
   48,  37,  18,   9,   4,   1,   1;
  115,  96,  44,  28,  10,   5,   1,   1;
  286, 239, 117,  71,  32,  13,   5,   1,   1;
  ...
		

Crossrefs

Cf. A068051 (row sums), A001429 (row sums for columns >= 3).
Cf. A000081 (column 1), A027852 (column 2), A000226 (column 3), A000368 (column 4).
Cf. A339428 (directed cycle).

Programs

  • Mathematica
    nn=15;f[list_]:=Select[list,#>0&];t[x_]:=Sum[a[n]x^n,{n,0,nn}];sol=SolveAlways[0==Series[t[x]-x Product[1/(1-x^i)^a[i],{i,1,nn}],{x,0,nn}],x];b=Table[a[n],{n,1,nn}]/.sol//Flatten;Map[f,Drop[Transpose[Table[Take[CoefficientList[CycleIndex[DihedralGroup[n],s]/.Table[s[j]->Table[Sum[b[[i]]x^(i*k),{i,1,nn}],{k,1,nn}][[j]],{j,1,n}],x],nn],{n,1,nn}]],1]]//Grid
  • PARI
    \\ TreeGf is A000081 as g.f.
    TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    ColSeq(n,k)={my(t=TreeGf(max(0,n+1-k))); my(g(e)=subst(t + O(x*x^(n\e)), x, x^e) + O(x*x^n)); Vec(sumdiv(k, d, eulerphi(d)*g(d)^(k/d))/k + if(k%2, g(1)*g(2)^(k\2), (g(1)^2+g(2))*g(2)^(k/2-1)/2), -n)/2}
    M(n, m=n)={Mat(vector(m, k, ColSeq(n,k)~))}
    { my(T=M(12)); for(n=1, #T~, print(T[n,1..n])) } \\ Andrew Howroyd, Dec 03 2020

Formula

O.g.f. for column k is Z(D[k],A(x)). That is, we substitute for each variable s[i] in the cycle index of the dihedral group of order 2k the series A(x^i), where A(x) is the o.g.f. for A000081.

A339067 Triangle read by rows: T(n,k) is the number of linear forests with n nodes and k rooted trees.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 9, 12, 9, 4, 1, 20, 30, 25, 14, 5, 1, 48, 74, 69, 44, 20, 6, 1, 115, 188, 186, 133, 70, 27, 7, 1, 286, 478, 503, 388, 230, 104, 35, 8, 1, 719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1, 1842, 3214, 3651, 3168, 2200, 1236, 560, 200, 54, 10, 1
Offset: 1

Views

Author

Andrew Howroyd, Dec 03 2020

Keywords

Comments

T(n,k) is the number of trees with n nodes rooted at two noninterchangeable nodes at a distance k-1 from each other.
Also the convolution triangle of A000081. - Peter Luschny, Oct 07 2022

Examples

			Triangle begins:
    1;
    1,    1;
    2,    2,    1;
    4,    5,    3,    1;
    9,   12,    9,    4,   1;
   20,   30,   25,   14,   5,   1;
   48,   74,   69,   44,  20,   6,   1;
  115,  188,  186,  133,  70,  27,   7,  1;
  286,  478,  503,  388, 230, 104,  35,  8, 1;
  719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1;
  ...
		

Crossrefs

Columns 1..6 are A000081, A000106, A000242, A000300, A000343, A000395.
Row sums are A000107.
T(2n-1,n) gives A339440.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*b(d),
          d=numtheory[divisors](j))*b(n-j), j=1..n-1))/(n-1))
        end:
    T:= proc(n, k) option remember; `if`(k=1, b(n), (t->
          add(T(j, t)*T(n-j, k-t), j=1..n-1))(iquo(k, 2)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Dec 04 2020
    # Using function PMatrix from A357368. Adds row and column for n, k = 0.
    PMatrix(10, A000081); # Peter Luschny, Oct 07 2022
  • Mathematica
    b[n_] := b[n] = If[n < 2, n, (Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}])/(n - 1)];
    T[n_, k_] := T[n, k] = If[k == 1, b[n], With[{t = Quotient[k, 2]}, Sum[T[j, t]*T[n - j, k - t], {j, 1, n - 1}]]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)
  • PARI
    \\ TreeGf is A000081.
    TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    ColSeq(n,k)={my(t=TreeGf(max(0,n+1-k))); Vec(t^k, -n)}
    M(n, m=n)=Mat(vector(m, k, ColSeq(n,k)~))
    { my(T=M(12)); for(n=1, #T~, print(T[n,1..n])) }

Formula

G.f. of k-th column: t(x)^k where t(x) is the g.f. of A000081.
Sum_{k=1..n} k * T(n,k) = A038002(n). - Alois P. Heinz, Dec 04 2020

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

A029870 Number of connected functions on n points with a loop of length 7.

Original entry on oeis.org

1, 1, 5, 21, 80, 285, 970, 3192, 10236, 32197, 99743, 305276, 925342, 2783012, 8316994, 24726109, 73195582, 215911767, 635028054, 1863156727, 5455350409, 15946267328, 46545783253, 135702643984, 395246786050, 1150250414764, 3345193851398, 9723141517918
Offset: 7

Views

Author

Keywords

Crossrefs

Column 7 of A339428.

Formula

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

Extensions

Terms a(32) and beyond from Andrew Howroyd, Dec 04 2020

A029871 Number of connected functions on n points with a loop of length 8.

Original entry on oeis.org

1, 1, 6, 25, 104, 384, 1380, 4729, 15806, 51478, 164788, 519296, 1617066, 4983855, 15233671, 46235252, 139506803, 418838281, 1252174861, 3730058316, 11077154790, 32808815240, 96953599162, 285945645659, 841909040785, 2475184643011, 7267678432397, 21315839832323
Offset: 8

Views

Author

Keywords

Crossrefs

Column 8 of A339428.

Formula

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

Extensions

Terms a(32) and beyond from Andrew Howroyd, Dec 04 2020
Showing 1-10 of 14 results. Next