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.

User: Murray R. Bremner

Murray R. Bremner's wiki page.

Murray R. Bremner has authored 11 sequences. Here are the ten most recent ones:

A287211 The number of plane rooted complete ternary trees with 2n+1 unlabeled leaves (hence n internal nodes including the root where n starts at 0) satisfying these two conditions: (1) if one of the three children of any internal node is the greatest in deglex order then that child is not the leftmost child; (2) if one of the three children of any internal node is the smallest in deglex order then that child is not the rightmost child. Deglex order refers to degree-lexicographical order defined inductively on the number of leaves (see details under Comments).

Original entry on oeis.org

1, 1, 2, 6, 21, 78, 308, 1264, 5332, 22994, 100896, 449004
Offset: 0

Author

Murray R. Bremner, May 21 2017

Keywords

Comments

"Plane" means "embedded in the plane" or (equivalently) the three children of each internal node (including the root) are ordered left, middle, right. Deglex order on trees with 2n+1 leaves is defined as follows: to compare two such trees T and U with children T_1, T_2, T_3 and U_1, U_2, U_3, first find the least index 1 <= i <= 3 for T_i <> U_i, then compare T_i and U_i in deglex order already defined inductively on trees with fewer than 2n+1 leaves; note that this requires comparing trees with different numbers of leaves, so we say that T_i precedes U_i if either (i) T_i has fewer leaves than U_i, or (ii) T_i and U_i have the same number of leaves, and T_i precedes U_i in deglex order.
An alternative description of this sequence: it counts the distinct association types in arity 2n+1 for a ternary operation [a,b,c] satisfying the cyclic-sum relation [a,b,c] + [b,c,a] + [c,a,b] = 0. The two conditions stated under "Name" are necessary to deal with the possibility of repeated factors: [a,a,b], [a,b,a], [b,a,a] where a < b in deglex order, and [a,b,b], [b,a,b], [b,b,a] where a < b in deglex order.
See further details in the comments to the Maple program which is attached as a a-file.

Examples

			Association types for arities 1, 3, 5, 7 are as follows in deglex order. See Links for a-file with association types for arities up to 11.
Arity 1, number of types 1:
a.
Arity 3, number of types 1:
[abc].
Arity 5, number of types 2:
[ab[cde]],
[a[bcd]e].
Arity 7, number of types 6:
[ab[cd[efg]]],
[ab[c[def]g]],
[a[bcd][efg]],
[a[bc[def]]g],
[a[b[cde]f]g],
[[abc]d[efg]].
		

Programs

  • Maple
    See attached a-file under Links.

A276277 Association types for monomials with n arguments in an algebra with two binary operations, one commutative, one noncommutative.

Original entry on oeis.org

1, 2, 6, 25, 111, 540, 2736, 14396, 77649, 427608, 2392866, 13570386, 77815161, 450418536, 2628225684, 15443406868, 91301938365, 542704450806, 3241411991712, 19443499011192, 117084197728737, 707532791560272, 4289252607915012, 26078561954153631
Offset: 1

Author

Murray R. Bremner, Aug 26 2016

Keywords

Comments

a(n) is the number of complete rooted binary trees with n leaves in which the internal nodes are labeled either white or black; the two children (subtrees) of a white node have no specified orientation, but the two children (subtrees) of a black node are labeled left and right. Thus the notion of isomorphism for these trees is partly planar (for the black nodes) and partly abstract (for the white nodes).
Finding a recurrence relation is an easy exercise. Finding an exact formula is probably very difficult or even impossible: compare the OEIS page for A001190 (Wedderburn-Etherington numbers).

Examples

			For n = 4 the 25 association types are as follows, where * is commutative and # is noncommutative; some assumptions have been made regarding the order of the factors for the commutative operation:
( ( X * X ) * X ) * X,
( ( X # X ) * X ) * X,
( ( X * X ) # X ) * X,
( ( X # X ) # X ) * X,
( X # ( X * X ) ) * X,
( X # ( X # X ) ) * X,
( X * X ) * ( X * X ),
( X * X ) * ( X # X ),
( X # X ) * ( X # X ),
( ( X * X ) * X ) # X,
( ( X # X ) * X ) # X,
( ( X * X ) # X ) # X,
( ( X # X ) # X ) # X,
( X # ( X * X ) ) # X,
( X # ( X # X ) ) # X,
( X * X ) # ( X * X ),
( X * X ) # ( X # X ),
( X # X ) # ( X * X ),
( X # X ) # ( X # X ),
X # ( ( X * X ) * X ),
X # ( ( X # X ) * X ),
X # ( ( X * X ) # X ),
X # ( ( X # X ) # X ),
X # ( X # ( X * X ) ),
X # ( X # ( X # X ) ).
		

Crossrefs

Programs

  • Maple
    BWT := table():
    BWT[ 1 ] := 1:
    for arity from 2 to 24 do
      BWT[ arity ] := 0:
      # commutative operation
      for i to floor((arity-1)/2) do
        BWT[ arity ] := BWT[ arity ] + ( BWT[arity-i] * BWT[i] )
      od:
      if arity mod 2 = 0 then
        BWT[ arity ] := BWT[ arity ] + binomial( BWT[arity/2]+1, 2 )
      fi:
      # noncommutative operation
      for i to arity-1 do
        BWT[ arity ] := BWT[ arity ] + ( BWT[arity-i] * BWT[i] )
      od
    od:
    seq(BWT[ n ], n=1..24);
  • Mathematica
    BWT[1] = 1; For[arity = 2, arity <= 24, arity++, BWT[arity] = 0; (* commutative operation *) For[i = 1, i <= Floor[(arity-1)/2], i++, BWT[arity] = BWT[arity] + (BWT[arity-i]*BWT[i])]; If[EvenQ[arity], BWT[arity] = BWT[arity] + Binomial[BWT[ arity/2]+1, 2]]; (* non commutative operation *) For[i = 1, i <= arity-1, i++, BWT[arity] = BWT[arity] + (BWT[arity-i]*BWT[i])]];
    Table[BWT[n], {n, 1, 24}] (* Jean-François Alcover, Feb 15 2019, from Maple *)

A268163 Number of labeled binary-ternary rooted non-planar trees, indexed by number of leaves.

Original entry on oeis.org

0, 1, 1, 4, 25, 220, 2485, 34300, 559405, 10525900, 224449225, 5348843500, 140880765025, 4063875715900, 127418482316125, 4314607214417500, 156920190449147125, 6100643259005795500, 252476539015516440625, 11081983532721088487500, 514215436341672155715625
Offset: 0

Author

Murray R. Bremner, Jan 27 2016

Keywords

Comments

This can also be interpreted as the number of multilinear monomials of degree n in a nonassociative algebra with an (anti)commutative binary operation and a completely (skew-)symmetric ternary operation; the number of variables in the monomial corresponds to the number of leaves in the tree.
This sequence also enumerates a certain class of Feynman diagrams; see the references, links, and crossrefs below.

Examples

			For n = 4 and using the monomial interpretation, the 25 multilinear monomials of degree 4 are as follows, where [-,-] is the binary operation and (-,-,-) is the ternary operation:
[[[a,b],c],d], [[[a,b],d],c], [[[a,c],b],d], [[[a,c],d],b], [[[a,d],b],c], [[[a,d],c],b], [[[b,c],a],d], [[[b,c],d],a], [[[b,d],a],c], [[[b,d],c],a], [[[c,d],a],b], [[[c,d],b],a], [[a,b],[c,d]], [[a,c],[b,d]], [[a,d],[b,c]], [(a,b,c),d], [(a,b,d),c], [(a,c,d),b], [(b,c,d),a], ([a,b],c,d), ([a,c],b,d), ([a,d],b,c), ([b,c],a,d), ([b,d],a,c), ([c,d],a,b).
		

References

  • J. Bedford, On Perturbative Field Theory and Twistor String Theory, Ph.D. Thesis, 2007, Queen Mary, University of London.
  • B. Feng and M. Luo, An introduction to on-shell recursion relations, Review Article, Frontiers of Physics, October 2012, Volume 7, Issue 5, pp. 533-575.
  • K. Kampf, A new look at the nonlinear sigma model, 17th International Conference in Quantum Chromodynamics (QCD 14), Nuclear and Particle Physics Proceedings, Volumes 258-259, January-February 2015, pp. 86-89.
  • M. L. Mangano and S. J. Parke, Multi-parton amplitudes in gauge theories, Physics Reports, Volume 200, Issue 6, February 1991, pp. 301-367.

Crossrefs

Cf. A001147. The number of labeled binary rooted non-planar trees.
Cf. A025035. The number of labeled ternary rooted non-planar trees.
Cf. A268172. The corresponding number of unlabelled trees.
Cf. A005411. Number of non-vanishing Feynman diagrams of order 2n for the electron or the photon propagators in quantum electrodynamics.
Cf. A005412. Number of non-vanishing Feynman diagrams of order 2n for the vacuum polarization (the proper two-point function of the photon) and for the self-energy (the proper two-point function of the electron) in quantum electrodynamics (QED).
Cf. A005413. Number of non-vanishing Feynman diagrams of order 2n+1 for the electron-electron-photon proper vertex function in quantum electrodynamics (QED).
Cf. A005414. Feynman diagrams of order 2n with vertex skeletons.
Other sequences related to Feynman diagrams: A115974, A122023, A167872, A214298, A214299.
Cf. A000311.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, v) option remember; `if`(n=0,
          `if`(v=0, 1, 0), `if`(i<1 or v<1 or nAlois P. Heinz, Jan 28 2016
    # second Maple program:
    a:= proc(n) option remember; `if`(n<3, [0, 1$2][n+1],
           ((24*n-36)*a(n-1)+(3*n-5)*(3*n-7)*a(n-2))/11)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jan 28 2016
  • Mathematica
    a[0]=0; a[1]=1; a[2]=1; a[n_]:=a[n]=(12(2n-3)a[n-1]+(3n-5)(3n-7)a[n-2])/11; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 24 2016, after Alois P. Heinz *)

Formula

a(n) = ((24*n-36)*a(n-1)+(3*n-5)*(3*n-7)*a(n-2))/11 for n>2. - Alois P. Heinz, Jan 28 2016
Because of Koszul duality for operads, the exponential generating function is the compositional inverse of the power series x-x^2/2-x^3/6 (email of Vladimir Dotsenko to Murray R. Bremner, Jan 28 2016).
a(n) ~ sqrt(9-4*sqrt(3)) * ((12+9*sqrt(3))/11)^n * n^(n-1) / (3 * exp(n)). - Vaclav Kotesovec, Feb 24 2016

A268172 Binary-ternary Wedderburn-Etherington numbers.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 23, 58, 156, 426, 1194, 3393, 9802, 28601, 84347, 250732, 750908, 2262817, 6857386, 20882889, 63877262, 196162762, 604567254, 1869318719, 5797113028, 18026873112, 56197262814, 175594836698, 549839459963, 1725126992844, 5422602630117, 17074281639963, 53848886560675, 170085320026578
Offset: 0

Author

Murray R. Bremner, Jan 27 2016

Keywords

Comments

This is the number of non-planar binary-ternary rooted trees (every node has out-degree 0 or 2 or 3) with n leaf nodes, indexed by the number of leaf nodes (NOT the total number of nodes).
It can also be interpreted as the number of bracketings (valid placements of operation symbols) in a monomial of degree n in a nonassociative algebra with an (anti-)commutative binary operation and a completely (skew-)symmetric ternary operation.

Examples

			Here are the 1, 1, 2, 4, 9, 23 bracketings for degrees 1 to 6 (using the monomial interpretation), where the binary and ternary operations are written [-,-] and [-,-,-] respectively, and the hyphen is a placeholder for the argument symbols:
Degree 1: -.
Degree 2: [-,-].
Degree 3: [[-,-],-], [-,-,-].
Degree 4: [[[-,-],-],-], [[-,-],[-,-]], [[-,-,-],-], [[-,-],-,-].
Degree 5:
   [[[[-,-],-],-],-],
   [[[-,-,-],-],-],
   [[[-,-],[-,-]],-],
   [[[-,-],-,-],-],
   [[[-,-],-],[-,-]],
   [[-,-,-],[-,-]],
   [[[-,-],-],-,-],
   [[-,-,-],-,-],
   [[-,-],[-,-],-].
Degree 6:
   [[[[[-,-],-],-],-],-],
   [[[[-,-,-],-],-],-],
   [[[[-,-],[-,-]],-],-],
   [[[[-,-],-,-],-],-],
   [[[[-,-],-],[-,-]],-],
   [[[-,-,-],[-,-]],-],
   [[[[-,-],-],-,-],-],
   [[[-,-,-],-,-],-],
   [[[-,-], [-,-],-],-],
   [[[[-,-],-],-],[-,-]],
   [[[-,-,-],-],[-,-]],
   [[[-,-], [-,-]],[-,-]],
   [[[-,-],-,-],[-,-]],
   [[[-,-],-],[[-,-],-]],
   [[[-,-],-],[-,-,-]],
   [[-,-,-],[-,-,-]],
   [[[[-,-],-],-],-,-],
   [[[-,-,-],-],-,-],
   [[[-,-],[-,-]],-,-],
   [[[-,-],-,-],-,-],
   [[[-,-],-],[-,-],-],
   [[-,-,-],[-,-],-],
   [[-,-],[-,-],[-,-]].
		

Crossrefs

Cf. A001190 (Binary Wedderburn-Etherington numbers).
Cf. A000598 (Ternary Wedderburn-Etherington numbers: number of non-planar ternary rooted trees with n nodes): note that this sequence is indexed by the total number of nodes, NOT the number of leaves.
Column k=3 of A292085.

Programs

  • Maple
    # for first Maple program see Links
    # second Maple program:
    b:= proc(n, i, v) option remember; `if`(n=0,
          `if`(v=0, 1, 0), `if`(i<1 or v<1 or nAlois P. Heinz, Jan 28 2016
  • Mathematica
    b[n_, i_, v_] := b[n, i, v] = If[n==0, If[v==0, 1, 0], If[i<1 || v<1 || nJean-François Alcover, Feb 25 2017, after Alois P. Heinz *)

Formula

See Maple code, and the recursion formula under Links.

A236342 Association types in 3-dimensional algebra.

Original entry on oeis.org

1, 3, 18, 132, 1080, 9450, 86544, 819154, 7949532, 78671736, 790930728, 8055355698, 82935309996, 861772240368, 9025745922656, 95183320362093, 1009853631571878, 10771405762277094, 115438084007465376, 1242437345193084264, 13423511539998223884
Offset: 1

Author

Murray R. Bremner, Jan 22 2014

Keywords

Comments

This sequence has two equivalent descriptions:
(1) It enumerates the number of decompositions of the unit cube into n rectangular parallelepipeds obtained by the following algorithm.
(a) Start with the unit cube.
(b) Perform the following operation n-1 times: Choose a parallelepiped in the current decomposition. Bisect this parallelepiped into two parallelepipeds by a plane orthogonal to any of the 3 coordinate axes. Different sequences of bisections can produce the same decomposition.
(2) Consider the universal algebra with three nonassociative binary products *1, *2, *3 related only by the three interchange laws from 2-category theory, as follows where (i,j) = (1,2), (1,3), (2,3):
( a *i b ) *j ( c *i d ) = ( a *j c ) *i ( b *i d )
This sequence enumerates the number of distinct monomials of degree n.

References

  • J.-L. Loday and B. Vallette, Algebraic Operads, Grundlehren 346, Springer, 2012, section 13.10.4, page 544 (for the interchange law).
  • S. Mac Lane, Categories for the Working Mathematician, second edition, Springer, 1978, equation (5), page 43 (also for the interchange law).

Crossrefs

Cf. A000108 (for 1-dimensional algebra), A236339 (for 2-dimensional algebra).
Column k=3 of A237018.

Programs

  • Maple
    MAXDEG := 24:
    C[ 1 ] := 1:
    for n from 2 to MAXDEG do
      count := 0:
      for k to 3 do
         count := count +
         ( (-1)^(k-1) * binomial(3,k) *
         add( mul( C[f], f in e ), e in combinat[composition](n,2^k) ) )
      od:
      print( n, count ):
      C[ n ] := count
    od:
  • Mathematica
    Rest[CoefficientList[InverseSeries[Series[-x^8+3*x^4-3*x^2+x, {x, 0, 20}], x],x]] (* Vaclav Kotesovec, Feb 16 2014 *)

Formula

Recurrence relation:
C(1) = 1,
C(n) = 3 sum_{i1,i2} C(i1)C(i2)
- 3 sum_{i1,i2,i3,i4} C(i1)C(i2)C(i3)C(i4)
+ sum_{i1,i2,i3,i4,i5,i6,i7,i8} C(i1)C(i2)C(i3)C(i4)C(i5)C(i6)C(i7)C(i8).
The first sum is over all 2-compositions of n into positive integers, the second sum is over all 4-compositions, and the third sum is over all 8-compositions.
This recurrence relation has a natural generalization using inclusion-exclusion to k-dimensional algebras for all k > 0, where k = 1 gives the familiar classical Catalan numbers, but with offset 1 not the usual offset 0; that is, k = 1 has the n-th term 1/n*binomial(2*n-2,n-1) instead of the more familiar 1/(n+1)*binomial(2*n,n) (thanks to Alois P. Heinz for pointing this out).
Generating function: G(x) = sum_{n>=1} C(n)x^n satisfies a polynomial of degree 8: G(x)^8 - 3G(x)^4 + 3G(x)^2 - G(x) + x = 0.
a(n) ~ (1/r)^(n-1/2) / (sqrt(2*Pi*(6-36*s^2+56*s^6)) * n^(3/2)), where s = 0.17792425007438691... is the root of the equation 8*s^7-12*s^3+6*s = 1, and r = s*(7-18*s+12*s^3)/8 = 0.085958633749898... - Vaclav Kotesovec, Feb 16 2014

A236339 Association types in 2-dimensional algebra.

Original entry on oeis.org

1, 2, 8, 39, 212, 1232, 7492, 47082, 303336, 1992826, 13299624, 89912992, 614474252, 4238138216, 29463047072, 206234876287, 1452319244772, 10281935334928, 73138728191724, 522475643860940, 3746698673538480, 26961197787989220, 194626504416928080
Offset: 1

Author

Murray R. Bremner, Jan 22 2014

Keywords

Comments

A kind of two-dimensional Catalan number.
This sequence has two equivalent descriptions:
(1) This sequence enumerates the number of decompositions of the unit square into n rectangles obtained by the following algorithm.
(a) Start with the unit square.
(b) Perform the following operation n-1 times:
Choose a rectangle in the current decomposition.
Bisect this rectangle into two rectangles horizontally or vertically.
Different sequences of bisections can produce the same decomposition.
(2) Consider the universal algebra with two nonassociative binary products *1 and *2 related only by the interchange law from 2-category theory:
( a *1 b ) *2 ( c *1 d ) = ( a *2 c ) *1 ( b *2 d )
This sequence enumerates the number of distinct monomials of degree n.

References

  • J.-L. Loday and B. Vallette, Algebraic Operads, Grundlehren 346, Springer, 2012, section 13.10.4, page 544 (for the interchange law)
  • S. Mac Lane, Categories for the Working Mathematician, second edition, Springer, 1978, equation (5), page 43 (also for the interchange law).

Crossrefs

Cf. A000108 (Catalan numbers), A236342.
Column k=2 of A237018.

Programs

  • Maple
    c := table():
    c[1] := 1:
    printf( "\n" ):
    for n from 2 to 50 do
    c[n] := 0:
    for ij in combinat[composition](n,2) do
        c[n] := c[n] + 2*c[ij[1]]*c[ij[2]]
    od:
    for ijkl in combinat[composition](n,4) do
        c[n] := c[n] - c[ijkl[1]]*c[ijkl[2]]*c[ijkl[3]]*c[ijkl[4]]
    od:
       printf( "%2d      %d \n", n, c[n] )
    od:
    # second Maple program:
    a:= proc(n) option remember; `if`(n<3, n, (
          8*(2*n-5)*(148*n-243)*(4*n-13)*(4*n-11)*a(n-3)
          +16*(n-2)*(4736*n^3-31456*n^2+68444*n-48609)*a(n-2)
          -32*(n-1)*(n-2)*(148*n^2-613*n+594)*a(n-1)) /
          (5*n*(n-1)*(n-2)*(148*n-391)))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jan 22 2014
  • Mathematica
    max = 30; c[1] = 1; c[2] = 2; g = Sum[c[k]*x^k, {k, 1, max}]; eq = Take[Thread[CoefficientList[g^4 - 2*g^2 + g - x, x] == 0], max+1]; sol = Solve[eq] // First; Array[c, max] /. sol (* Jean-François Alcover, Jan 27 2014 *)
    Rest[CoefficientList[InverseSeries[Series[x^4-2*x^2+x, {x, 0, 20}], x],x]] (* Vaclav Kotesovec, Feb 16 2014 *)

Formula

Recurrence relation:
C(1) = 1,
C(n) = 2 Sum_{i,j} C(i)C(j) - Sum_{i,j,k,l} C(i)C(j)C(k)C(l).
The first sum is over all 2-compositions of n into positive integers (i+j=n), and the second sum is over all 4-compositions of n into positive integers (i+j+k+l=n).
Generating function G(x) = Sum_{n>=1} C(n) x^n satisfies a quartic polynomial equation: G(x)^4 - 2*G(x)^2 + G(x) - x = 0.
a(n) ~ (1/r)^(n-1/2) / (2 * sqrt(2*Pi*(1-3*s^2)) * n^(3/2)), where s = 0.2695944364054445582... is the root of the equation 4*s*(1-s^2) = 1, and r = s*(1-2*s+s^3) = 0.1295146671633141285... - Vaclav Kotesovec, Feb 16 2014
From Seiichi Manyama, Jan 10 2023: (Start)
G.f.: Series_Reversion( x * (1-x) * (1-x-x^2) ).
a(n+1) = (1/(n+1)) * Sum_{k=0..floor(n/2)} binomial(n+k,k) * binomial(3*n-k+1,n-2*k). (End)

Extensions

a(17)-a(23) from Alois P. Heinz, Jan 22 2014

A226909 Number of placements of brackets in a monomial of degree n in an algebra with two commutative multiplications.

Original entry on oeis.org

1, 2, 4, 14, 44, 164, 616, 2450, 9908, 41116, 173144, 739884, 3196344, 13944200, 61327312, 271653254, 1210772124, 5426133764, 24435934568, 110524288836, 501864708968, 2286937749496, 10454921456688, 47936304101860, 220383617137704, 1015714229399256
Offset: 1

Author

Murray R. Bremner, Jun 21 2013

Keywords

Comments

This sequence generalizes the Wedderburn-Etherington numbers (A001190) to the case of two different types of brackets, such as square brackets [-.-] and curly brackets {-,-}.
Also number of N-free graphs [Cameron]. - Michael Somos, Apr 18 2014

Examples

			For n = 4 the 14 different bracketings are as follows:
[1[2[34]]], {1[2[34]]}, [1{2[34]}], {1{2[34]}}, [1[2{34}]], {1[2{34}]}, [1{2{34}}], {1{2{34}}}, [[12][34]], {[12][34]}, [[12]{34}], {[12]{34}}, [{12}{34}], {{12}{34}}.
G.f. = x + 2*x^2 + 4*x^3 + 14*x^4 + 44*x^5 + 164*x^6 + 616*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence as M1302, except that, copying Cameron's error, 14 is missing).

Crossrefs

Cf. Wedderburn-Etherington numbers (A001190), A241555.

Programs

  • Maple
    BBcount := table():
    BBcount[ 1 ] := 1:
    for n from 2 to 10 do
      BBcount[ n ] := 0:
    for i to floor((n-1)/2) do
        BBcount[n] := BBcount[n] + 2*BBcount[i]*BBcount[n-i]
      od:
    if n mod 2 = 0 then
        BBcount[n] := BBcount[n] + 2*binomial(BBcount[n/2]+1,2)
      fi:
    print( n, BBcount[ n ] )
    od:
  • Mathematica
    max = 26; Clear[BBcount]; BBcount[1] = 1; For[n = 2, n <= max, n++, BBcount[n] = 0; For[i = 1, i <= Floor[(n-1)/2], i++, BBcount[n] = BBcount[n] + 2*BBcount[i]*BBcount[n-i]]; If[EvenQ[n], BBcount[n] = BBcount[n] + 2*Binomial[BBcount[n/2]+1, 2]]]; Array[BBcount, max] (* Jean-François Alcover, Mar 24 2014, translated from Maple *)
  • PARI
    {a(n) = local(A); if( n<2, n>0, A = x + O(x^2); for(k=2, n, A = x + A^2 + subst(A, x, x^2)); polcoeff(A, n))}; /* Michael Somos, Jun 13 2014 */
    
  • PARI
    {a(n) = if( n<2, n>0, 2 * sum(k=1, (n-1)\2, a(k) * a(n-k)) + if( n%2==0, 2 * binomial( a(n/2) + 1, 2)))}; /* Michael Somos, Jun 13 2014 */

Formula

G.f. A(x) satisfies A(x) = x + A(x^2) + A(x)^2. - Michael Somos, Jun 13 2014
a(n) ~ c * d^n / n^(3/2), where d = 4.8925511471743497508362229157295..., c = 0.155553379207933493345508839... . - Vaclav Kotesovec, Sep 07 2014

A225682 Triangle read by rows: T(n,k) (0 <= k <= n) = chi(k)*binomial(n,k), where chi(k) = 1,-1,0 according as k == 0,1,2 mod 3.

Original entry on oeis.org

1, 1, -1, 1, -2, 0, 1, -3, 0, 1, 1, -4, 0, 4, -1, 1, -5, 0, 10, -5, 0, 1, -6, 0, 20, -15, 0, 1, 1, -7, 0, 35, -35, 0, 7, -1, 1, -8, 0, 56, -70, 0, 28, -8, 0, 1, -9, 0, 84, -126, 0, 84, -36, 0, 1, 1, -10, 0, 120, -210, 0, 210, -120, 0, 10, -1, 1, -11, 0, 165, -330, 0, 462, -330, 0, 55, -11, 0, 1, -12, 0, 220, -495, 0, 924, -792, 0, 220, -66, 0, 1
Offset: 0

Author

Keywords

Comments

Corresponding to row n of this triangle, define a generating function G_n(x) = 1/(Sum_{k=0..n} T(n,k)*x^k).
Then G_n(x) is the g.f. for the number of words of length n over an alphabet of size n which do not contain any strictly decreasing factor (consecutive subword) of length 3.
For example, G_2, G_3, G_4, G_5, G_6 are g.f.'s for A000079, A076264, A072335, A200781, A200782.

Examples

			Triangle begins:
[1],
[1, -1],
[1, -2, 0],
[1, -3, 0, 1],
[1, -4, 0, 4, -1],
[1, -5, 0, 10, -5, 0],
[1, -6, 0, 20, -15, 0, 1],
[1, -7, 0, 35, -35, 0, 7, -1],
[1, -8, 0, 56, -70, 0, 28, -8, 0],
...
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local k,s;
    s:=k->if k mod 3 = 0 then 1 elif k mod 3 = 1 then -1 else 0; fi;
    [seq(s(k)*binomial(n,k),k=0..n)];
    end;
    [seq(f(n),n=0..12)];
  • Mathematica
    chi[k_] := Switch[Mod[k, 3], 0, 1, 1, -1, 2, 0]; t[n_, k_] := chi[k]*Binomial[n, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

A028351 Dimension of invariant subspace of Lie polynomials of degree 2n under action of SL_2(C) on free Lie algebra of rank 2.

Original entry on oeis.org

1, 0, 1, 1, 5, 9, 33, 85, 276, 827, 2693, 8626, 28639, 95393, 323367, 1104525, 3813797, 13266366, 46509357, 164098390
Offset: 1

Keywords

References

  • M. Bremner, Lie invariants of degree ten, Int. J. Math. Game Theory Algebra, 8 (1998), no. 2-3, 115-122.

Formula

Formula in C. Reutenauer, Free Lie Algebras, pages 206-208.

A014545 Numbers k such that the k-th Euclid number A006862(k) = 1 + (Product of first k primes) is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 11, 75, 171, 172, 384, 457, 616, 643, 1391, 1613, 2122, 2647, 2673, 4413, 13494, 31260, 33237, 304723, 365071, 436504, 498865, 637491
Offset: 1

Keywords

Examples

			a(1) = 0 because the (empty) product of 0 primes is 1, plus 1 yields the prime 2.
prime(4413) = 42209 and Primorial(4413) + 1 = 42209# + 1 is a 18241-digit prime.
prime(13494) = 145823 and Primorial(13494) + 1 = 145823# + 1 is a 63142-digit prime.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Cf. A005234 (values of p such that 1 + product of primes <= p is prime).
Cf. A018239 (primorial plus 1 primes).

Programs

  • Maple
    P:= 1:
    p:= 1:
    count:= 0:
    for n from 1 to 1000 do
      p:= nextprime(p);
      P:= P*p;
      if isprime(P+1) then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i], i=1..count); # Robert Israel, Nov 04 2015
  • Mathematica
    Flatten[Position[Rest[FoldList[Times,1,Prime[Range[180]]]]+1,?PrimeQ]] (* _Harvey P. Dale, May 04 2012 *) (* this program generates the first 9 positive terms of the sequence; changing the Range constant to 33237 will generate all 23 terms above, but it will take a long time to do so *)
  • PARI
    is(n)=ispseudoprime(prod(i=1,n,prime(i))+1) \\ Charles R Greathouse IV, Mar 21 2013
    
  • PARI
    P=1; n=0; forprime(p=1, 10^5, if(ispseudoprime(P+1), print1(n", ")); n=n+1; P*=p;) \\ Hans Loeblich, May 10 2019

Formula

a(n+1) = A000720(A005234(n)). - M. F. Hasler, May 31 2018

Extensions

More terms from Labos Elemer
a(21) from Arlin Anderson (starship1(AT)gmail.com), Oct 20 2000
a(22)-a(23) from Eric W. Weisstein, Mar 13 2004 (based on information in A057704)
Offset and first term changed by Altug Alkan, Nov 27 2015
a(24) from Jeppe Stig Nielsen, Aug 08 2024
a(25) from Jeppe Stig Nielsen, Sep 01 2024
a(26) from Jeppe Stig Nielsen, Sep 24 2024
a(27) from Jeppe Stig Nielsen, Nov 10 2024
a(28) from Jeppe Stig Nielsen, Aug 21 2025