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-9 of 9 results.

A007595 a(n) = C_n / 2 if n is even or ( C_n + C_((n-1)/2) ) / 2 if n is odd, where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 3, 7, 22, 66, 217, 715, 2438, 8398, 29414, 104006, 371516, 1337220, 4847637, 17678835, 64823110, 238819350, 883634026, 3282060210, 12233141908, 45741281820, 171529836218, 644952073662, 2430973304732, 9183676536076, 34766775829452, 131873975875180
Offset: 1

Views

Author

Keywords

Comments

Number of necklaces of 2 colors with 2n beads and n-1 black ones. - Wouter Meeussen, Aug 03 2002
Number of rooted planar binary trees up to reflection (trees with n internal nodes, or a total of 2n+1 nodes). - Antti Karttunen, Aug 19 2002
Number of even permutations avoiding 132.
Number of Dyck paths of length 2n having an even number of peaks at even height. Example: a(3)=3 because we have UDUDUD, U(UD)(UD)D and UUUDDD, where U=(1,1), D=(1,-1) and the peaks at even height are shown between parentheses. - Emeric Deutsch, Nov 13 2004
Number of planar trees (A002995) on n edges with one distinguished edge. - David Callan, Oct 08 2005
Assuming offset 0 this is an analog of A275165: pairs of two Catalan nestings with index sum n. - R. J. Mathar, Jul 19 2016

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A047996(2*n, n-1) for n >= 1 and a(n) = A072506(n, n-1) for n >= 2.
Occurs in A073201 as rows 0, 2, 4, etc. (with a(0)=1 included).
Cf. also A003444, A007123.

Programs

  • Maple
    A007595 := n -> (1/2)*(Cat(n) + (`mod`(n,2)*Cat((n-1)/2))); Cat := n -> binomial(2*n,n)/(n+1);
  • Mathematica
    Table[(Plus@@(EulerPhi[ # ]Binomial[2n/#, (n-1)/# ] &)/@Intersection[Divisors[2n], Divisors[n-1]])/(2n), {n, 2, 32}] (* or *) Table[If[EvenQ[n], CatalanNumber[n]/2, (CatalanNumber[n] + CatalanNumber[(n-1)/2])/2], {n, 24}]
    Table[(CatalanNumber[n] + 2^n Binomial[1/2, (n + 1)/2] Sin[Pi n/2])/2, {n, 1, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
    Table[If[EvenQ[n],CatalanNumber[n]/2,(CatalanNumber[n]+CatalanNumber[(n-1)/2])/2],{n,30}] (* Harvey P. Dale, Sep 06 2021 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n % 2, (catalan(n) + catalan((n-1)/2))/2, catalan(n)/2); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: (2-2*x-sqrt(1-4*x)-sqrt(1-4*x^2))/x/4. - Vladeta Jovovic, Sep 26 2003
D-finite with recurrence: n*(n+1)*a(n) -6*n*(n-1)*a(n-1) +4*(2*n^2-10*n+9)*a(n-2) +8*(n^2+n-9)*a(n-3) -48*(n-3)*(n-4)*a(n-4) +32*(2*n-9)*(n-5)*a(n-5)=0. - R. J. Mathar, Jun 03 2014, adapted to offset Feb 20 2020
a(n) ~ 4^n /(2*sqrt(Pi)*n^(3/2)). - Ilya Gutkovskiy, Jul 19 2016
a(2n) = A000150(2n). - R. J. Mathar, Jul 19 2016
a(n) = (A000108(n) + 2^n * binomial(1/2, (n+1)/2) * sin(Pi*n/2))/2. - Vladimir Reshetnikov, Oct 03 2016
Sum_{n>=1} a(n)/4^n = (3-sqrt(3))/2 (A334843). - Amiram Eldar, Mar 20 2022

Extensions

Description corrected by Reiner Martin and Wouter Meeussen, Aug 04 2002

A216785 Number of unlabeled graphs on n nodes that have exactly two non-isomorphic components.

Original entry on oeis.org

0, 0, 1, 2, 8, 28, 145, 1022, 12320, 274785, 12007355, 1019030127, 165091859656, 50502058491413, 29054157815353374, 31426486309136268658, 64001015806929213894372, 245935864212056913811498454, 1787577725208700551275529005084, 24637809253253259917745389824933448
Offset: 1

Views

Author

Geoffrey Critzer, Oct 15 2012

Keywords

Comments

Stated more precisely: Number of unlabeled graphs on n nodes that have exactly two connected components and these components are not isomorphic (and nonempty).

Examples

			a(4)=2 = 1*2 where 1*2=A001349(1)*A001349(3) counts graphs with a component of 1 node and a component with 3 nodes. There is no contribution with a component of 2 nodes and another component of 2 nodes because A001349(2)=1 means these components would be isomorphic. - _R. J. Mathar_, Jul 18 2016
a(5)=8 = 1*6 + 1*2 where 1*6=A001349(1)*A001349(4) counts graphs with a component of 1 node and a component with 4 nodes, and where 1*2 = A001349(2)*A001349(3) counts graphs with a component of 2 nodes and a component of 3 nodes. - _R. J. Mathar_, Jul 18 2016
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, 1973, page 48.

Crossrefs

Cf. A058915, A001349, A217955, A275165, A275166 (allows an empty component), A274934 (allows isomorphic components).

Programs

  • Mathematica
    Needs["Combinatorica`"]; max=25; A000088=Table[NumberOfGraphs[n], {n, 0, max}]; f[x_]=1-Product[1/(1-x^k)^a[k], {k, 1, max}]; a[0]=a[1]=a[2]=1; coes=CoefficientList[Series[f[x], {x, 0, max}], x]; sol=First[Solve[Thread[Rest[coes+A000088]==0]]]; cg=Table[a[n], {n, 1, max}]/.sol; Take[CoefficientList[CycleIndex[AlternatingGroup[2], s]-CycleIndex[SymmetricGroup[2], s]/.Table[s[j]->Table[Sum[cg[[i]] x^(k*i), {i, 1, max}], {k, 1, max}][[j]], {j, 1, 3}], x], {4, max}]  (* after code given by Jean-François Alcover in A001349 *)
  • PARI
    {c=[1, 1, 2, 6, 21, 112, 853, 11117, 261080, 11716571, 1006700565, 164059830476, 50335907869219, 29003487462848061, 31397381142761241960, 63969560113225176176277, 245871831682084026519528568, 1787331725248899088890200576580, 24636021429399867655322650759681644];}
    for(n=0,19,print([n,sum(j=1,(n-1)\2,c[j]*c[n-j])+if(n%2==0,c[n/2]*(c[n/2]-1)/2)])); /* David Broadhurst, Jul 18 2016 */
    
  • Python
    from functools import lru_cache
    from itertools import combinations
    from fractions import Fraction
    from math import prod, gcd, factorial, comb
    from sympy import mobius, divisors
    from sympy.utilities.iterables import partitions
    def A216785(n):
        @lru_cache(maxsize=None)
        def b(n): return int(sum(Fraction(1<>1)*r+(q*r*(r-1)>>1) for q, r in p.items()),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n)))
        @lru_cache(maxsize=None)
        def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1,n))
        @lru_cache(maxsize=None)
        def d(n): return sum(mobius(n//d)*c(d) for d in divisors(n,generator=True))//n
        return sum(d(i)*d(n-i) for i in range(1,n+1>>1)) + (0 if n&1 else comb(d(n>>1),2)) # Chai Wah Wu, Jul 03 2024

Formula

O.g.f.: A(x)^2/2 - A(x^2)/2 where A(x) is the o.g.f. for A001349 after setting A001349(0)=0.

Extensions

Two zeros prepended (offset changed), formula updated, and entries corrected by R. J. Mathar, N. J. A. Sloane, Jul 18 2016. (Thanks to Allan C. Wechsler for pointing out that all the entries above a(19) were wrong.)

A274934 Number of unlabeled graphs with n nodes that have two components, neither of which is the empty graph.

Original entry on oeis.org

0, 0, 1, 1, 3, 8, 30, 145, 1028, 12320, 274806, 12007355, 1019030239, 165091859656, 50502058492266, 29054157815353374, 31426486309136279775, 64001015806929213894372, 245935864212056913811759534, 1787577725208700551275529005084
Offset: 0

Views

Author

R. J. Mathar and N. J. A. Sloane, Jul 18 2016

Keywords

Examples

			a(6) = A216785(6)+2 =30 where the two additional graphs have two equal components (of which there are A001349(3)=2 choices).
		

Crossrefs

Cf. A001349, A216785 (non-isomorphic components), A275165, A275166, column 2 of A201922.

Programs

  • Mathematica
    terms = 20;
    mob[m_, n_] := If[Mod[m, n] == 0, MoebiusMu[m/n], 0];
    EULERi[b_] := Module[{a, c, i, d}, c = {}; For[i = 1, i <= Length[b], i++, c = Append[c, i*b[[i]] - Sum[c[[d]]*b[[i - d]], {d, 1, i - 1}]]]; a = {}; For[i = 1, i <= Length[b], i++, a = Append[a, (1/i)*Sum[mob[i, d]*c[[d]], {d, 1, i}]]]; Return[a]];
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[v, 2]];
    a88[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    A[x_] = Join[{1}, EULERi[Array[a88, terms]]].x^Range[0, terms] - 1;
    CoefficientList[(A[x]^2 + A[x^2])/2 + O[x]^terms, x] (* Jean-François Alcover, Sep 28 2018, after Andrew Howroyd in A001349 *)

Formula

G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A001349 without the initial constant 1.
a(n) = A201922(n,2). - R. J. Mathar, Jul 20 2016

A275166 Number of n-node graphs that have 2 non-isomorphic components.

Original entry on oeis.org

0, 1, 1, 3, 8, 29, 140, 998, 12139, 273400, 11991356, 1018707920, 165078860603, 50500999728875, 29053989521339474, 31426435300576595334, 64000986599534312444935, 245935832697890955733422940, 1787577661113111145804012075034, 24637809007125076355873926288686728
Offset: 0

Views

Author

R. J. Mathar, Jul 18 2016

Keywords

Comments

"Component" means there are no edges from a node of one component to any node of the other component.
Each of the 2 components may be the empty graph with 0 nodes. That means the graph has only one "visible" component in these cases.
Each of the 2 components must be a connected graph (see A001349). (The empty graph has all properties and is a connected graph.)
The graphs of the 2 components must not be the same (not be isomorphic).

Examples

			a(4)=8 = 1*6 + 1*2 where 1*6=A001349(0)*A001349(4) counts graphs with an empty component and a component with 4 nodes, where 1*2 = A001349(1)*A001349(3) counts graphs with a component of 1 node and a component of 3 nodes. There is no contribution from a component of 2 nodes and another component of 2 nodes (both components were isomorphic in that case).
		

Crossrefs

Programs

  • Mathematica
    terms = 20;
    mob[m_, n_] := If[Mod[m, n] == 0, MoebiusMu[m/n], 0];
    EULERi[b_] := Module[{a, c, i, d}, c = {}; For[i = 1, i <= Length[b], i++, c = Append[c, i*b[[i]] - Sum[c[[d]]*b[[i - d]], {d, 1, i - 1}]]]; a = {}; For[i = 1, i <= Length[b], i++, a = Append[a, (1/i)*Sum[mob[i, d]*c[[d]], {d, 1, i}]]]; Return[a]];
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[v, 2]];
    a88[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    A[x_] = Join[{1}, EULERi[Array[a88, terms]]].x^Range[0, terms];
    (A[x]^2 - A[x^2])/2 + O[x]^terms // CoefficientList[#, x]& (* Jean-François Alcover, Jan 31 2020, after Andrew Howroyd in A001349 *)
  • Python
    from functools import lru_cache
    from itertools import combinations
    from fractions import Fraction
    from math import prod, gcd, factorial, comb
    from sympy import mobius, divisors
    from sympy.utilities.iterables import partitions
    def A275166(n):
        @lru_cache(maxsize=None)
        def b(n): return int(sum(Fraction(1<>1)*r+(q*r*(r-1)>>1) for q, r in p.items()),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n)))
        @lru_cache(maxsize=None)
        def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1,n))
        @lru_cache(maxsize=None)
        def d(n): return sum(mobius(n//d)*c(d) for d in divisors(n,generator=True))//n if n else 1
        return sum(d(i)*d(n-i) for i in range(n+1>>1)) + (0 if n&1 else comb(d(n>>1),2)) # Chai Wah Wu, Jul 03 2024

Formula

G.f.: [A(x)^2 - A(x^2)]/2 where A(x) is the o.g.f. for A001349.
a(n) = A275165(n) if n odd.

A274937 Number of unlabeled forests on n nodes that have exactly two nonempty components.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 6, 11, 23, 46, 99, 216, 488, 1121, 2644, 6334, 15437, 38132, 95368, 241029, 614968, 1582030, 4100157, 10697038, 28075303, 74086468, 196470902, 523383136, 1400051585, 3759508536, 10131097618, 27391132238, 74283552343, 202030012554, 550934060120, 1506161266348
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Crossrefs

Cf. A000055, A274935, A274936, A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=1..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/ (n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}] + If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 1, n/2}] - If[OddQ[n], 0, Function[t, t*(t-1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 14 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A000055 without the initial constant 1.
a(n) = A095133(n,2). - R. J. Mathar, Jul 20 2016

A274935 Number of n-node unlabeled forests with two connected components.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 12, 22, 46, 93, 205, 451, 1039, 2422, 5803, 14075, 34757, 86761, 219235, 558984, 1438033, 3726535, 9723913, 25525112, 67375200, 178723358, 476264352, 1274448596, 3423494617, 9229075121, 24961969420, 67721961268, 184255962564, 502658875034, 1374713691841, 3768527610094, 10353602341313
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Comments

One of the components may be empty (the null graph): a(n) = A000055(n) + A274937(n). - R. J. Mathar, Aug 15 2017

Crossrefs

Cf. A000055, A274936, A274937, A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/ (n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 0, n/2}]-If[OddQ[n], 0, Function[t, t*(t-1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 15 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A000055.

A274936 Number of n-node unlabeled forests that have 2 non-isomorphic components.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 11, 22, 44, 93, 202, 451, 1033, 2422, 5792, 14075, 34734, 86761, 219188, 558984, 1437927, 3726535, 9723678, 25525112, 67374649, 178723358, 476263051, 1274448596, 3423491458, 9229075121, 24961961679, 67721961268, 184255943244, 502658875034, 1374713643212
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Crossrefs

Cf. A000055, A274935-A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t+1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/(n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 0, n/2}]-If[OddQ[n], 0, Function[t, t*(t+1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 15 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 - A(x^2)]/2 where A(x) is the o.g.f. for A000055.
a(2n+1) = A274935(2n+1). a(2n) = A274935(2n)-A000055(n). - R. J. Mathar, Jul 20 2016

A274938 Number of unlabeled forests with n nodes that have two components, neither of which is the empty graph.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 5, 11, 21, 46, 96, 216, 482, 1121, 2633, 6334, 15414, 38132, 95321, 241029, 614862, 1582030, 4099922, 10697038, 28074752, 74086468, 196469601, 523383136, 1400048426, 3759508536, 10131089877, 27391132238, 74283533023, 202030012554, 550934011491, 1506161266348
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Crossrefs

Cf. A000055, A274935-A274937. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=1..n/2)-
          `if`(n::odd or n=0, 0, (t-> t*(t+1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/(n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 1, n/2}]-If[OddQ[n] || n==0, 0, Function[t, t*(t+1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 15 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 - A(x^2)]/2 where A(x) is the o.g.f. for A000055 without the initial constant 1.
a(2n+1) = A274937(2n+1). a(2n) = A274937(2n)-A000055(n). - R. J. Mathar, Jul 20 2016

A275207 Expansion of (A(x)^2+A(x^2))/2 where A(x) = A001006(x).

Original entry on oeis.org

1, 1, 3, 6, 16, 38, 100, 256, 681, 1805, 4867, 13162, 35925, 98469, 271511, 751656, 2089963, 5831451, 16326785, 45847770, 129108926, 364498596, 1031486590, 2925337352, 8313215743, 23668977163, 67507773621, 192859753310, 551821400008, 1581188102590
Offset: 0

Views

Author

R. J. Mathar, Jul 19 2016

Keywords

Comments

Analog of A275165 with Motzkin numbers replacing connected graph counts.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1,
          ((3*(n-1))*b(n-2)+(1+2*n)*b(n-1))/(n+2))
        end:
    a:= proc(n) option remember; add(b(j)*b(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(b(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 19 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, 1, ((3*(n-1))*b[n-2] + (1+2*n)*b[n-1])/(n+2)];
    a[n_] := a[n] = Sum[b[j]*b[n-j], {j, 0, n/2}] - If[OddQ[n], 0, Function[t, t*(t-1)/2][b[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 16 2017, after Alois P. Heinz *)

Formula

a(2n+1) = A275208(2n+1).
Conjecture: a(2n+1) = A026940(n+1).
Conjecture D-finite with recurrence -3*(n+4)*(n+3)*(29*n-32)*a(n) +10*(29*n-40)*(n+3)*(n+2)*a(n-1) +2*(n+1)*(149*n^2 +208*n-450)*a(n-2) -2*n*(559*n^2 -381*n-1630)*a(n-3) +4*(-68*n^3 +531*n^2 -904*n+351)*a(n-4) +2*(103*n^3-1701*n^2+5330*n -3600)*a(n-5) +18*(11*n^3 -209*n^2 +834*n -778)*a(n-6) +6*n*(269*n-830)*(n-5)*a(n-7) +9*(n-5)*(n-6)*(95*n-134)*a(n-8)=0. - R. J. Mathar, Mar 07 2023
a(n) ~ 3^(n + 5/2) / (2 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 08 2023
Showing 1-9 of 9 results.