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

A273873 Number of strict trees of weight n.

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 28, 65, 166, 412, 1076, 2806, 7524, 20020, 54744, 148417, 410078, 1126732, 3144500, 8728570, 24555900, 68713420, 194469616, 548088278, 1559301428, 4418131108, 12628267512, 35957541462, 103150588492, 294924202032, 848878072440, 2435729999665
Offset: 1

Views

Author

Gus Wiseman, Jun 01 2016

Keywords

Comments

A strict tree t is either (case 1) a positive integer t = n, or (case 2) a set t = {t1, t2, ..., tk} of two or more strict trees (i.e. branches) with distinct weights, where the weight of a strict tree in the second case is the sum of the weights of its branches; hence the multiset of weights is a strict integer partition of n. For example, {{{{{2,1},1},2},3},{4,{2,1}},{2,1},1} is a strict tree of weight 20.

Examples

			a(6) = 12: {6, (51), (42), ((41)1), (321), ((31)2), ((32)1), (((31)1)1), ((21)21), (((21)1)2), (((21)2)1), ((((21)1)1)1)}.
		

Crossrefs

Cf. A196545 (weakly ordered plane trees); A220418, A220420 (power product expansions); A271619, A063834 (twice partitioned numbers), A289501.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 1+b(n, n-1):
    seq(a(n), n=1..35);  # Alois P. Heinz, Jun 02 2016
  • Mathematica
    STE[n_Integer?Positive]:=STE[n]=1+Plus@@Map[Function[ptn,Times@@STE/@ptn],Select[IntegerPartitions[n],And[Length[#]>1,UnsameQ@@#]&]];
    Array[STE,30]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[i(i + 1)/2 < n, 0,
         If[n == 0, 1, b[n, i - 1] + b[n - i, Min[n - i, i - 1]] a[i]]];
    a[n_] := If[n == 0, 1, 1 + b[n, n - 1]];
    a /@ Range[35] (* Jean-François Alcover, May 09 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(prod(k=1, n-1, 1 + v[k]*x^k + O(x*x^n)), n)); v} \\ Andrew Howroyd, Aug 26 2018

Formula

Sum_{g(t)=y} (-1)^{d(t)} = mu(|y|<={y_1,...,y_k}), where mu is the Mobius function of the multiorder of integer partitions, g(t) is the multiset of leaves of a strict tree t, and d(t) is the number of branchings.
Strict trees are closely related to the coefficients appearing in a(i) = Sum_y c(y_1)*...*c(y_k) where Sum_i c(i)*x^i = Prod_i (1 + a(i)*x^i). The latter identity is the formal power product expansion (PPE) of an (ordinary) generating function.

A290261 Write 1 - x/(1-x) as an inverse power product 1/(1 + a(1)*x) * 1/(1 + a(2)*x^2) * 1/(1 + a(3)*x^3) * 1/(1 + a(4)*x^4) * ...

Original entry on oeis.org

1, 2, 2, 6, 6, 10, 18, 54, 54, 114, 186, 334, 630, 1314, 2106, 5910, 7710, 15642, 27594, 57798, 97902, 207762, 364722, 712990, 1340622, 2778930, 4918482, 10437702, 18512790, 37500858, 69273666, 154021590, 258155910, 535004610, 981288906
Offset: 1

Views

Author

Gus Wiseman, Jul 24 2017

Keywords

Comments

The initial terms are given on page 1234 of Gingold, Knopfmacher, 1995.
From Petros Hadjicostas, Oct 04 2019: (Start)
In Section 3 of Gingold and Knopfmacher (1995), it is proved that, if f(z) = Product_{n >= 1} (1 + g(n))*z^n = 1/(Product_{n >= 1} (1 - h(n))*z^n), then g(2*n - 1) = h(2*n - 1) and Sum_{d|n} (1/d)*h(n/d)^d = -Sum_{d|n} (1/d)*(-g(n/d))^d. The same results were proved more than ten years later by Alkauskas (2008, 2009). [If we let a(n) = -g(n), then Alkauskas works with f(z) = Product_{n >= 1} (1 - a(n))*z^n; i.e., a(2*n - 1) = -h(2*n - 1) etc.]
The PPE of 1 - x/(1-x) is given in A220418, which is also studied in Gingold and Knopfmacher (1995) starting at p. 1223.
(End)

Crossrefs

Programs

  • Mathematica
    nn=20;Solve[Table[Expand[SeriesCoefficient[Product[1/(1+a[k]x^k),{k,n}],{x,0,n}]]==-1,{n,nn}],Table[a[n],{n,nn}]][[1,All,2]]
    (* Second program: *)
    A[m_, n_] := A[m, n] = Which[m == 1, 2^(n-1), m > n >= 1, 0, True, A[m - 1, n] - A[m - 1, m - 1]*A[m, n - m + 1] ];
    a[n_] := A[n, n];
    a /@ Range[1, 55] (* Petros Hadjicostas, Oct 04 2019, courtesy of Jean-François Alcover *)

Formula

a(n) = Sum_t (-1)^v(t) where the sum is over all enriched p-trees of weight n (see A289501 for definition) and v(t) is the number of nodes (branchings and leaves) in t.
From Petros Hadjicostas, Oct 04 2019: (Start)
a(n) satisfies Sum_{d|n} (1/d)*(-a(n/d))^d = -(2^n - 1)/n. Thus, a(n) = Sum_{d|n, d>1} (1/d)*(-a(n/d))^d + (2^n - 1)/n.
a(2*n - 1) = A220418(2*n - 1) for n >= 1 because A220418 gives the PPE of 1 - x/(1-x).
Define (A(m,n): n,m >= 1) by A(m=1,n) = 2^(n-1) for n >= 1, A(m,n) = 0 for m > n >= 1 (upper triangular), and A(m,n) = A(m-1,n) - A(m-1,m-1) * A(m,n-m+1) for n >= m >= 2. Then a(n) = A(n,n). [Theorem 3 in Gingold et al. (1988).]
(End)

A157162 1/Product_{n>=1} (1 - a(n)*x^n) = 1 + Sum_{k>=1} F(k+1)*x^k = 1/(1-x-x^2), where F(n) = A000045(n) (Fibonacci numbers).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 8, 10, 18, 24, 40, 52, 88, 125, 210, 286, 492, 702, 1144, 1638, 2786, 3986, 6704, 9640, 16096, 23964, 39650, 57794, 97108, 144245, 236880, 353010, 589298, 880828, 1459960, 2179068, 3604880, 5471094, 9030450, 13561742, 22542396, 34277634
Offset: 1

Views

Author

Wolfdieter Lang, Aug 10 2009

Keywords

Comments

A formal infinite product representation for the o.g.f. series of the Fibonacci numbers (A000045).
In the context of Witt rings the o.g.f. is called associated unital series for the (infinite dimensional) Witt vector (a(1),a(2),...). Sometimes also called inverse Somos transform, here for the Fibonacci numbers.
1-x-x^2 = product(1 - a(n)*x^n, n=1..infinity).

Examples

			Recurrence I: a(2) = F(3) - a(1)^2 = 1; a(4) = F(5) - (a(1)*a(3) + a(2)^2 +a(1)^2*a(2) + a(1)^4) = 5 - 4 = 1.
Recurrence II (simplified): a(4) = (-(a(1)^4 + 2*a(2)^2) + L(4))/4 = (-3 + 7)/4 = 1.
Recurrence II: a(4)= (-(a(1)^4 + 2*a(2)^2)/4 + 1*1*F(5) - (1/2)*(2*F(2)*F(4)+ 1*F(3)^2) +(1/3)*3*F(2)^2*F(3)-(1/4)*1*F(2)^4 = -3/4 +7/4 = 1.
		

Crossrefs

Cf. A147542 (with the product instead of the reciprocal one).
Cf. A220418.

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 1, 1, (-Sum[d a[d]^(n/d), {d, Most@ Divisors@ n}] + LucasL[n])/n];
    Array[a, 50] (* Jean-François Alcover, Mar 02 2020 *)

Formula

Recurrence I. With P(n,m) the set of partitions of n with m parts:
a(n)= F(n+1) - sum(sum(product(a(j)^e(j),j=1..m), p from P(n,m)), m=2..n), n>=2, with sum(j*e(j),j=1..n)=n, sum(e(j),j=1..n)=m for the partition p of n with m parts. F(n) = A000045(n) (Fibonacci numbers). Input a(1)=F(2)=1. See the array A008284(n,m) for the cardinalities of the sets P(n,m).
Recurrence II (simplified version). With the Lucas numbers L(n)=A000035(n), n>=1, as input (found by V. Jovovic, Mar 10 2009):
a(n) = (- sum(d*a(d)^(n/d), d|n with 1<=d=2, a(1)=1.
Recurrence II. With the number array M0(n,vec(e)) given for any partition in A048996.
a(n) = - sum((d/n)*(a(d))^(n/d),d|n with 1<=d=2; a(1)=F(2)=1. See recurrence 1 for the set P(n,m). The M0 numbers are m!/product(e(j)!,j=1..n).

A301480 Number of rooted twice-partitions of n.

Original entry on oeis.org

1, 1, 2, 4, 8, 15, 30, 54, 103, 186, 345, 606, 1115, 1936, 3466, 6046, 10630, 18257, 31927, 54393, 93894, 159631, 272155, 458891, 779375, 1305801, 2196009, 3667242, 6130066, 10170745, 16923127, 27942148, 46211977, 76039205, 125094369, 204952168, 335924597
Offset: 1

Views

Author

Gus Wiseman, Mar 22 2018

Keywords

Comments

A rooted partition of n is an integer partition of n - 1. A rooted twice-partition of n is a choice of a rooted partition of each part in a rooted partition of n.

Examples

			The a(5) = 8 rooted twice-partitions: ((3)), ((21)), ((111)), ((2)()), ((11)()), ((1)(1)), ((1)()()), (()()()()).
The a(6) = 15 rooted twice-partitions:
(4), (31), (22), (211), (1111),
(3)(), (21)(), (111)(), (2)(1), (11)(1),
(2)()(), (11)()(), (1)(1)(),
(1)()()(),
()()()()().
		

Crossrefs

Programs

  • Mathematica
    nn=30;
    ser=x*Product[1/(1-PartitionsP[n-1]x^n),{n,nn}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,nn}]
  • PARI
    seq(n)={Vec(1/prod(k=1, n-1, 1 - numbpart(k-1)*x^k + O(x^n)))} \\ Andrew Howroyd, Aug 29 2018

Formula

O.g.f.: x * Product_{n > 0} 1/(1 - P(n-1) x^n) where P = A000041.

A273866 Coefficients a(k,m) of polynomials a{k}(h) appearing in the product Product_{k >= 1} (1 - a{k}(h)*x^k) = 1 - h*x/(1-x).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 3, 5, 5, 3, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 9, 13, 13, 9, 4, 1, 1, 4, 10, 17, 20, 17, 10, 4, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 5, 16, 36, 57, 66, 57, 36, 16, 5, 1
Offset: 1

Views

Author

Gevorg Hmayakyan, Jun 01 2016

Keywords

Comments

The a(k,m) form a table where each row has k-1 elements starting from 2 and the a(1,1) = 1.

Examples

			a{1}(h) = h,
a{2}(h) = h,
a{3}(h) = h^2 + h,
a{4}(h) = h^3 + h^2 + h,
a{5}(h) = h^4 + 2*h^3 + 2*h^2 + h,
a{6}(h) = h^5 + 2*h^4 + 2*h^3 + 2*h^2 + h,
a{7}(h) = h^6 + 3*h^5 + 5*h^4 + 5*h^3 + 3*h^2 + h,
a{8}(h) = h^7 + 3*h^6 + 6*h^5 + 7*h^4 + 6*h^3 + 3*h^2 + h,
a{9}(h) = h^8 + 4*h^7 + 9*h^6 + 13*h^5 + 13*h^4 + 9*h^3 + 4*h^2 + h
...
and the corresponding a(k,m) table is:
  1,
  1,
  1,  1,
  1,  1,  1,
  1,  2,  2,  1,
  1,  2,  2,  2,  1,
  1,  3,  5,  5,  3,  1,
  1,  3,  6,  7,  6,  3,  1,
  1,  4,  9, 13, 13,  9,  4,  1,
  ...
a(7,3) = 5 because there are six strict trees contributing positive one {{5,1},1}, {{4,2},1}, {{4,1},2}, {{3,2},2}, {4,{2,1}}, {{3,1},3} and there is one strict tree contributing negative one {4,2,1}. - _Gus Wiseman_, Nov 14 2016
		

Crossrefs

Programs

  • Maple
    with(ListTools), with(numtheory), with(combinat);
    L := product(1-a[k]*x^k, k = 1 .. 600);
    S := Flatten([seq(-h, i = 1 .. 100)]);
    Sabs := Flatten([seq(i, i = 1 .. 100)]);
    seq(assign(a[i] = solve(coeff(L, x^i) = `if`(is(i in Sabs), S[Search(i, Sabs)], 0), a[i])), i = 1 .. 20);
    map(coeffs, [seq(simplify(a[i]), i = 1 .. 20)]);
  • Mathematica
    strictrees[n_Integer?Positive]:=Prepend[Join@@Function[ptn,Tuples[strictrees/@ptn]]/@Select[IntegerPartitions[n],And[Length[#]>1,UnsameQ@@#]&],n];
    Table[Sum[(-1)^(Count[tree,,{0,Infinity}]-1),{tree,Select[strictrees[n],Length[Flatten[{#}]]===m&]}],{n,1,9},{m,1,n-1/.(0->1)}] (* _Gus Wiseman, Nov 14 2016 *)
    (* second program *)
    A[m_, n_] :=
      A[m, n] =
       Which[m == 1, -h, m > n >= 1, 0, True,
        A[m - 1, n] - A[m - 1, m - 1]*A[m, n - m + 1]];
    a[n_] := Expand[-A[n, n]];
    a /@ Range[1, 25] (* Petros Hadjicostas, Oct 04 2019, courtesy of Jean-François Alcover *)

Formula

a(k,m) = a(k, k-m).
For prime p: Sum_{m = 1..p-1} a(p, m) = (2^p - 2)/p.
a{k}(h) satisfies Sum_{d|k} (1/d)*(a{k/d}(h))^d = ((h+1)^k - 1)/k. [Corrected by Petros Hadjicostas, Oct 04 2019]
For prime p: a{p}(h) = ((h+1)^p - h^p - 1)/p.
See A273873 for the definition of strict tree. Then a(n,m) = Sum_t (-1)^{v(t)-1} where the sum is over all strict trees of weight n with m leaves, and v(t) is the number of nodes in t (including the leaves, which are positive integers). See example 2 and the first Mathematica program. - Gus Wiseman, Nov 14 2016

A301364 Regular triangle where T(n,k) is the number of enriched p-trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 4, 5, 1, 2, 6, 11, 12, 1, 3, 10, 26, 38, 34, 1, 3, 13, 39, 87, 117, 92, 1, 4, 19, 69, 181, 339, 406, 277, 1, 4, 23, 95, 303, 707, 1198, 1311, 806, 1, 5, 30, 143, 514, 1430, 2970, 4525, 4522, 2500, 1, 5, 35, 184, 762, 2446, 6124, 11627
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

An enriched p-tree of weight n > 0 is either a single node of weight n, or a finite sequence of two or more enriched p-trees with weakly decreasing weights summing to n.

Examples

			Triangle begins:
  1
  1   1
  1   1   2
  1   2   4   5
  1   2   6  11  12
  1   3  10  26  38  34
  1   3  13  39  87 117  92
  1   4  19  69 181 339 406 277
  ...
The T(5,4) = 11 enriched p-trees: (((21)1)1), ((2(11))1), (((11)2)1), ((211)1), ((21)(11)), (((11)1)2), ((111)2), ((21)11), (2(11)1), ((11)21), (2111).
		

Crossrefs

Programs

  • Mathematica
    eptrees[n_]:=Prepend[Join@@Table[Tuples[eptrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]>1&]}],n];
    Table[Length[Select[eptrees[n],Count[#,_Integer,{-1}]===k&]],{n,8},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = y + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x*x^n)), n)); apply(p->Vecrev(p/y), v)}
    { my(T=A(10)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 26 2018

A290971 Write x/(1-x) in the form Sum_{j>=1} a(j)*x^j/(1+a(j)*x^j).

Original entry on oeis.org

1, 2, 0, 6, 0, -6, 0, 54, 0, -30, 0, -114, 0, -126, 0, 4470, 0, -294, 0, -5850, 0, -2046, 0, -92418, 0, -8190, 0, -247674, 0, 2010, 0, 30229110, 0, -131070, 0, -8200914, 0, -524286, 0, -362617770, 0, 183162, 0, -354416634, 0, -8388606, 0, -53614489794, 0
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    nn=20;-Solve[Table[Sum[a[n/d]^d,{d,Divisors[n]}]==-1,{n,nn}],Array[a,nn]][[1,All,2]]

Formula

a(n) = -Sum_t (-1)^v(t) where the sum is over all same-trees of weight n (see A281145 for definition) and v(t) is the number of nodes (branchings and leaves) in t.

A300574 Coefficient of x^n in 1/((1-x)(1+x^3)(1-x^5)(1+x^7)(1-x^9)...).

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 2, 1, 0, 0, 2, 2, 1, 0, 2, 3, 2, 0, 2, 4, 4, 0, 1, 4, 6, 2, 1, 4, 8, 4, 2, 4, 10, 6, 2, 3, 12, 10, 4, 2, 13, 14, 8, 2, 14, 18, 12, 2, 14, 22, 18, 3, 14, 26, 26, 6, 14, 29, 34, 10, 14, 32, 44, 16, 14, 34, 56, 26, 16, 34, 67, 38, 20, 34, 78, 52, 26
Offset: 0

Views

Author

Gus Wiseman, Mar 08 2018

Keywords

Comments

By Theorem 1 of Craig, the values a(n) in this list are known to be nonnegative. Combined with Theorem 2 of Seo and Yee, this shows that a(n) = |number of partitions of n into odd parts with an odd index minus the number of partitions of n into odd parts with an even index|. - William Craig, Dec 31 2021

References

  • Seunghyun Seo and Ae Ja Yee, Index of seaweed algebras and integer partitions, Electronic Journal of Combinatorics, 27:1 (2020), #P1.47. See Conjecture 1 and Theorem 2.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/QPochhammer[x, -x^2], {x, 0, 100}], x]
    nmax = 100; CoefficientList[Series[Product[1/((1+x^(4*k-1))*(1-x^(4*k-3))), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 04 2019 *)

Formula

O.g.f.: Product_{n >= 0} 1/(1 - (-1)^n x^(2n+1)).
a(n) = Sum (-1)^k where the sum is over all integer partitions of n into odd parts and k is the number of parts not congruent to 1 modulo 4.
a(n) has average order Gamma(1/4) * exp(sqrt(n/3)*Pi/2) / (2^(9/4) * 3^(1/8) * Pi^(3/4) * n^(5/8)). - Vaclav Kotesovec, Jun 04 2019

A300866 Signed recurrence over binary strict trees: a(n) = 1 - Sum_{x + y = n, 0 < x < y < n} a(x) * a(y).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, -1, 1, 1, -2, 3, -1, -3, 8, -8, 1, 14, -26, 22, 10, -59, 90, -52, -74, 238, -291, 80, 417, -930, 915, 124, -1991, 3483, -2533, -2148, 9011, -12596, 5754, 14350, -37975, 42735, -4046, -77924, 154374, -133903, -56529, 376844, -591197, 355941, 522978, -1706239
Offset: 0

Views

Author

Gus Wiseman, Mar 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=1-Sum[a[k]*a[n-k],{k,1,(n-1)/2}];
    Array[a,40]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 - sum(k=1, (n-1)\2, v[k]*v[n-k])); concat([1], v)} \\ Andrew Howroyd, Aug 27 2018

A292137 G.f.: Im(1/(i*x; x)_inf), where (a; q)_inf is the q-Pochhammer symbol, i = sqrt(-1).

Original entry on oeis.org

0, 1, 1, 0, 0, 0, -1, -2, -2, -2, -2, -3, -3, -2, -2, -2, -1, 1, 2, 2, 4, 6, 7, 8, 10, 13, 14, 14, 15, 17, 17, 15, 15, 16, 14, 10, 8, 6, 1, -5, -10, -14, -21, -31, -38, -43, -53, -64, -71, -77, -86, -97, -104, -108, -115, -124, -127, -125, -127, -130, -125, -116
Offset: 0

Views

Author

Seiichi Manyama, Sep 09 2017

Keywords

Examples

			Product_{k>=1} 1/(1 - i*x^k) = 1 + (0+1i)*x + (-1+1i)*x^2 + (-1+0i)*x^3 + (-1+0i)*x^4 + (-1+0i)*x^5 + (-2-1i)*x^6 + (-1-2i)*x^7 + ...
		

Crossrefs

Programs

  • Maple
    N:= 100:
    S := convert(series( add( (-1)^n*x^(2*n+1)/(mul(1 - x^k,k = 1..2*n+1)), n = 0..N ), x, N+1 ), polynom):
    seq(coeff(S, x, n), n = 0..N); # Peter Bala, Jan 15 2021
  • Mathematica
    Im[CoefficientList[Series[1/QPochhammer[I*x, x], {x, 0, 100}], x]] (* Vaclav Kotesovec, Sep 17 2017 *)

Formula

1/(i*x; x)_inf is the g.f. for A292136(n) + i*a(n).
a(n) = Sum (-1)^((k - 1)/2) where the sum is over all integer partitions of n into an odd number of parts and k is the number of parts. - Gus Wiseman, Mar 08 2018
G.f.: Sum_{n >= 0} (-1)^n * x^(2*n+1)/Product_{k = 1..2*n+1} (1 - x^k). - Peter Bala, Jan 15 2021
Showing 1-10 of 26 results. Next