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.

A085748 G.f.: 1/(1-G001190), where G001190 = x + x^2 + x^3 + 2x^4 + 3x^5 + ... is the g.f. for the Wedderburn-Etherington numbers A001190.

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 46, 106, 248, 582, 1376, 3264, 7777, 18581, 44526, 106936, 257379, 620577, 1498788, 3625026, 8779271, 21287278, 51671864, 125550018, 305333281, 743179460, 1810290446, 4412783988, 10763786019, 26271534125, 64158771500, 156769178340
Offset: 0

Views

Author

N. J. A. Sloane, Nov 07 2003

Keywords

Comments

a(n) is also the number of interpretations of c*x^n (or number of ways to insert parentheses) when multiplication is commutative but not associative. E.g. a(2) = 2: c(x^2) and (c.x)x. a(3)=4: c(x.x^2), (c.x)(x^2), (c.x^2)x, and ((c.x)x)x. - Paul Zimmermann, Dec 04 2009

Examples

			G.f. = 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 20*x^5 + 46*x^6 + 106*x^7 + 248*x^8 + ...
		

Crossrefs

Cf. A001190.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, `if`(n::odd, 0,
          (t-> t*(1-t)/2)(b(n/2)))+add(b(i)*b(n-i), i=1..n/2))
        end:
    a:= proc(n) option remember; `if`(n<1, 1,
          add(a(n-i)*b(i), i=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 07 2017
  • Mathematica
    b[n_] := b[n] = If[n < 2, n, If[OddQ[n], 0, Function[t, t*(1 - t)/2][ b[n/2] ] ] + Sum[b[i]*b[n - i], {i, 1, n/2}] ];
    a[n_] := a[n] = If[n < 1, 1, Sum[a[n - i]*b[i], {i, 1, n}]];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)
  • PARI
    {a(n) = local(A, m); if( n<0, 0, A = 1 + O(x); m=1; while( m<=n, m*=2; A = sqrt( subst( x / (1 - 2*x), x, x * subst(A, x, x^2)) / x)); polcoeff(A, n))}; /* Michael Somos, Feb 17 2004 */

Formula

G.f. A(x) satisfies: x * A(x)^2 = B(x * A(x^2)) where B(x) = x / (1 - 2*x). - Michael Somos, Feb 17 2004