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

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

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 28, 52, 104, 206, 429, 903, 1982, 4430, 10206, 23966, 57522, 140236, 347302, 870682, 2207819, 5651437, 14590703, 37948338, 99358533, 261684141, 692906575, 1843601797, 4926919859, 13220064562, 35604359531, 96218568474, 260850911485
Offset: 0

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Row sum of A215977.
The labeled version is A144164. The inverse Euler transform is A215981.

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) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(g(i)+j-1,j)*p(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> p(n, n):
    seq(a(n), n=0..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_] := p[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[g[i] + j - 1, j]*p[n - i*j, i - 1], {j, 0, n/i}]]];
    a[n_] := p[n, n];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 21 2017, 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): return 1 if n==0 else 0 if i<1 else sum([binomial(g(i) + j - 1, j)*p(n - i*j, i - 1) for j in range(n//i + 1)])
    def a(n): return p(n, n)
    print([a(n) for n in range(41)]) # Indranil Ghosh, Aug 07 2017

Formula

a(n) = Sum_{k=0..n} A215977(n,k).
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.95576528565199497471481752412... is Otter's rooted tree constant, and c = 1.085767435235426664262830616636... . - Vaclav Kotesovec, Mar 22 2017

A215981 Number of simple unlabeled graphs on n nodes with exactly 1 connected component that is a tree or a cycle.

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 12, 24, 48, 107, 236, 552, 1302, 3160, 7742, 19321, 48630, 123868, 317956, 823066, 2144506, 5623757, 14828075, 39299898, 104636891, 279793451, 751065461, 2023443033, 5469566586, 14830871803, 40330829031, 109972410222, 300628862481
Offset: 1

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=1 of A215977.
The labeled version is A215851.

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:= 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:
    seq(a(n), n=1..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)];
    a[n_] := a[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;
    Array[a, 40] (* Jean-François Alcover, Mar 21 2017, translated from Maple *)

Formula

a(1) = a(2) = 1, a(n) = 1 + A000055(n) for n>=3.

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

Original entry on oeis.org

1, 1, 3, 6, 13, 26, 56, 115, 247, 533, 1175, 2635, 6037, 14069, 33378, 80466, 196759, 487453, 1221515, 3092719, 7901816, 20354765, 52815434, 137946253, 362430959, 957359614, 2541249138, 6775848932, 18141119582, 48753971355, 131485310625, 355759469235
Offset: 10

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=10 of A215977.
The labeled version is A215860.

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, 10):
    seq(a(n), n=10..50);

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

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

Original entry on oeis.org

1, 1, 3, 6, 13, 25, 53, 106, 224, 475, 1037, 2315, 5302, 12382, 29495, 71450, 175618, 437272, 1101000, 2799768, 7181703, 18565546, 48326482, 126581749, 333424119, 882765486, 2348114866, 6272676477, 16822741588, 45281587081, 122295734356, 331331765694
Offset: 4

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=4 of A215977.
The labeled version is A215854.

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, 4):
    seq(a(n), n=4..40);

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

Original entry on oeis.org

1, 1, 3, 6, 13, 26, 55, 112, 238, 510, 1117, 2498, 5712, 13322, 31643, 76455, 187382, 465393, 1168966, 2966298, 7594035, 19597653, 50933434, 133224112, 350477003, 926855665, 2462830565, 6572892862, 17612586165, 47369774428, 127841265076, 346120109957
Offset: 5

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=5 of A215977.
The labeled version is A215855.

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, 5):
    seq(a(n), n=5..40);

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

Original entry on oeis.org

1, 1, 3, 6, 13, 26, 56, 114, 244, 524, 1152, 2578, 5902, 13750, 32637, 78745, 192755, 478071, 1199357, 3039832, 7774296, 20043911, 52049890, 136041966, 357650346, 945253939, 2510351950, 6696412901, 17935526721, 48218592753, 130083292745, 352068892155
Offset: 6

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

			a(8) = 3: .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=6 of A215977.
The labeled version is A215856.

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, 6):
    seq(a(n), n=6..40);

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

Original entry on oeis.org

1, 1, 3, 6, 13, 26, 56, 115, 246, 530, 1166, 2613, 5982, 13940, 33073, 79760, 195109, 483615, 1212485, 3071358, 7850690, 20231286, 52513864, 137202595, 360578812, 952705531, 2529454122, 6745724961, 18063628118, 48553319703, 130962595786, 354390168855
Offset: 7

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=7 of A215977.
The labeled version is A215857.

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, 7):
    seq(a(n), n=7..50);

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

Original entry on oeis.org

1, 1, 3, 6, 13, 26, 56, 115, 247, 532, 1172, 2627, 6017, 14020, 33263, 80196, 196133, 485993, 1218103, 3084686, 7882748, 20309036, 52704689, 137675229, 361761187, 955688561, 2537043121, 6765174365, 18113821981, 48683671360, 131303094976, 355284353448
Offset: 8

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

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

Crossrefs

Column k=8 of A215977.
The labeled version is A215858.

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, 8):
    seq(a(n), n=8..50);
Showing 1-10 of 12 results. Next