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

A030267 Compose the natural numbers with themselves, A(x) = B(B(x)) where B(x) = x/(1-x)^2 is the generating function for natural numbers.

Original entry on oeis.org

1, 4, 14, 46, 145, 444, 1331, 3926, 11434, 32960, 94211, 267384, 754309, 2116936, 5914310, 16458034, 45638101, 126159156, 347769719, 956238170, 2623278946, 7181512964, 19622668679, 53522804976, 145753273225, 396323283724, 1076167858046, 2918447861686
Offset: 1

Views

Author

Keywords

Comments

Sum of pyramid weights of all nondecreasing Dyck paths of semilength n. (A pyramid in a Dyck word (path) is a factor of the form U^h D^h, where U=(1,1), D=(1,-1) and h is the height of the pyramid. A pyramid in a Dyck word w is maximal if, as a factor in w, it is not immediately preceded by a u and immediately followed by a d. The pyramid weight of a Dyck path (word) is the sum of the heights of its maximal pyramids.) Example: a(4) = 46. Indeed, there are 14 Dyck paths of semilength 4. One of them, namely UUDUDDUD is not nondecreasing because the valleys are at heights 1 and 0. The other 13, with the maximal pyramids shown between parentheses, are: (UD)(UD)(UD)(UD), (UD)(UD)(UUDD), (UD)(UUDD)(UD), (UD)U(UD)(UD)D, (UD)(UUUDDD), (UUDD)(UD)(UD), (UUDD)(UUDD), (UUUDDD)(UD), U(UD)(UD)(UD)D, U(UD)(UUDD)D, U(UUDD)(UD)D, UU(UD)(UD)DD and (UUUUDDDD). The pyramid weights of these paths are 4, 4, 4, 3, 4, 4, 4, 4, 3, 3, 3, 2, and 4, respectively. Their sum is 46. a(n) = Sum_{k = 1..n} k*A121462(n, k). - Emeric Deutsch, Jul 31 2006
Number of 1s in all compositions of n, where compositions are understood with two different kinds of 1s, say 1 and 1' (n >= 1). Example: a(2) = 4 because the compositions of 2 are 11, 11', 1'1, 1'1', 2, having a total of 2 + 1 + 1 + 0 + 0 = 4 1s. Also number of k's in all compositions of n + k (k = 2, 3, ...). - Emeric Deutsch, Jul 21 2008
From Petros Hadjicostas, Jun 24 2019: (Start)
If c = (c(m): m >= 1) is the input sequence and b_k = (b_k(n): n >= 1) is the output sequence under the AIK[k] = INVERT[k] transform (see Bower's web link below), then the bivariate g.f. of the list of sequences (b_k: k >= 1) = ((b_k(n): n >= 1): k >= 1) is Sum_{n, k >= 1} b_k(n)*x^n*y^k = y*C(x)/(1 - y*C(x)), where C(x) = Sum_{m >= 1} c(m)*x^m is the g.f. of the input sequence.
Here, b_k(n) is the number of all (linear) compositions of n with k parts where a part of size m is colored with one of c(m) colors. Thus, Sum_{k = 1..n} k*b_k(n) is the total number of parts in all compositions of n.
If we differentiate the bivariate g.f. function above, i.e., Sum_{n, k >= 1} b_k(n)*x^n*y^k, with respect to y and set y = 1, we get the g.f. of the sequence (Sum_{k = 1..n} k*b_k(n): n >= 1). It is C(x)/(1 - C(x))^2.
When c(m) = m for all m >= 1, we have m-color compositions of n that were first studied by Agarwal (2000). The cyclic version of these m-color compositions were studied by Gibson (2017) and Gibson et al. (2018).
When c(m) = m for each m >= 1, we have C(x) = x/(1 - x)^2, and so C(x)/(1 - C(x))^2 = x * (1 - x)^2/(1 - 3*x + x^2)^2, which is the g.f. of the current sequence.
Hence, a(n) is the total number of parts in all m-color compositions of n (in the sense of Agarwal (2000)).
(End)
Series reversal gives A153294 starting from index 1, with alternating signs: 1, -4, 18, -86, 427, -2180, ... - Vladimir Reshetnikov, Aug 03 2019

Examples

			From _Petros Hadjicostas_, Jun 24 2019: (Start)
Recall that with m-color compositions, a part of size m may be colored with one of m colors.
We have a(1) = 1 because we only have one colored composition, namely 1_1, that has only 1 part.
We have a(2) = 4 because we have the following colored compositions of n = 2: 2_1, 2_2, 1_1 + 1_1; hence, a(2) = 1 + 1 + 2 = 4.
We have a(3) = 14 because we have the following colored compositions of n = 3: 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 2_1 + 1_1, 2_2 + 1_1, 1_1 + 1_1 + 1_1; hence, a(3) = 1 + 1 + 1 + 2 + 2 + 2 + 2 + 3 = 14.
We have a(14) = 46 because we have the following colored compositions of n = 4:
(i) 4_1, 4_2, 4_3, 4_4; with a total of 4 parts.
(ii) 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 3_1 + 1_1, 3_2 + 1_1, 3_3 + 1_1, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_1, 2_2 + 2_2; with a total of 2 x 10 = 20 parts.
(iii) 1_1 + 1_1 + 2_1, 1_1 + 1_1 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 2_1 + 1_1 + 1_1, 2_2 + 1_1 + 1_1; with a total of 3 x 6 = 18 parts.
(iv) 1_1 + 1_1 + 1_1 + 1_1; with a total of 4 parts.
Hence, a(4) = 4 + 20 + 18 + 4 = 46.
(End)
		

References

  • R. P. Grimaldi, Compositions and the alternate Fibonacci numbers, Congressus Numerantium, 186, 2007, 81-96.

Crossrefs

Partial sums of A038731. First differences of A001870.
Cf. A001629 (right-shifted inverse Binomial Transform), A023610 (inverse Binomial Transform of left-shifted sequence), A030279, A045623, A088305, A121462, A153294, A279282, A307415, A308723.

Programs

  • Maple
    with(combinat): L[0]:=2: L[1]:=1: for n from 2 to 60 do L[n]:=L[n-1] +L[n-2] end do: seq(2*fibonacci(2*n)*1/5+(1/5)*n*L[2*n],n=1..30); # Emeric Deutsch, Jul 21 2008
  • Mathematica
    Table[Sum[k Binomial[n+k-1,2k-1],{k,n}],{n,30}] (* or *) LinearRecurrence[ {6,-11,6,-1},{1,4,14,46},30] (* Harvey P. Dale, Aug 01 2011 *)
  • PARI
    a(n)=(2*n*fibonacci(2*n+1)+(2-n)*fibonacci(2*n))/5

Formula

a(n) = -a(-n) = (2n * F(2n+1) + (2 - n) * F(2n))/5 with F(n) = A000045(n) (Fibonacci numbers).
G.f.: x * (1 - x)^2/(1 - 3*x + x^2)^2.
a(n) = Sum_{k = 1..n} k*C(n + k - 1, 2*k - 1).
a(n) = (2/5)*F(2*n) + (1/5)*n*L(2*n), where F(k) are the Fibonacci numbers (F(0)=0, F(1)=1) and L(k) are the Lucas numbers (L(0) = 2, L(1) = 1). - Emeric Deutsch, Jul 21 2008
a(0) = 1, a(1) = 4, a(2) = 14, a(3) = 46, a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) - a(n-4). - Harvey P. Dale, Aug 01 2011
a(n) = ((3 - sqrt(5))^n*(5*n - 2*sqrt(5)) + (3 + sqrt(5))^n*(5*n + 2*sqrt(5)))/ (25*2^n). - Peter Luschny, Mar 07 2022
E.g.f.: exp(3*x/2)*(15*x*cosh(sqrt(5)*x/2) + sqrt(5)*(4 + 5*x)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Mar 04 2025

Extensions

Name clarified using a comment of the author by Peter Luschny, Aug 03 2019

A007852 Number of antichains in rooted plane trees on n nodes.

Original entry on oeis.org

1, 2, 7, 29, 131, 625, 3099, 15818, 82595, 439259, 2371632, 12967707, 71669167, 399751019, 2247488837, 12723799989, 72474333715, 415046380767, 2388355096446, 13803034008095, 80082677184820, 466263828731640, 2723428895205210, 15954063529603565, 93711351580424391
Offset: 1

Views

Author

Martin Klazar, Mar 15 1996

Keywords

Comments

Setting both offsets to zero, this is the Catalan transform of A007317. - R. J. Mathar, Jun 29 2009
a(n) is also the cumulated sizes of admissible cuts of general rooted trees of size n. - Antoine Genitrini, Mar 14 2013
a(n) is the moment of order 2*n of the sum of two position operators in the weakly monotonne Fock space - Anna Kula, May 09 2025
a(n) is the moment of order 2*n of the measure with the density defined by g(x) = 1/(4*Pi) * (sqrt(sqrt(100-16x^2)-x^2-10) - sqrt(4-x^2)) if |x|<=2, g(x) = 1/(4*Pi) * sqrt((-2x^2-2|x|sqrt(4-x^2)+20) if 2 <= |x| <= 5/2 and g(x)=0 otherwise - Anna Kula, May 09 2025

Crossrefs

Programs

  • Mathematica
    Rest[CoefficientList[Series[(1-(1-Sqrt[1-4*x])/2-Sqrt[1-5*x-(1-Sqrt[1-4*x])/2])/2, {x, 0, 20}], x]] (* Vaclav Kotesovec, Mar 08 2014 *)
  • Maxima
    a(n):=sum(binomial(2*i+1,i)*binomial(2*n-1,n-i-1),i,0,n)/((2*n-1)); /* Vladimir Kruchinin, Jun 09 2014 */
  • PARI
    N = 33;  x = 'x + O('x^N);
    B = (1-sqrt(1-4*x))/2;
    gf = (1-B-sqrt(1-5*x-B))/2;
    v = Vec(gf)
    \\ Joerg Arndt, Mar 14 2013
    
  • Python
    def a(n):
       l = [0,1,2,7]
       if n < 4:
          return l[n]
       for i in range(n-3):
          l[i%4] = ( (-500*i+2000*i**3)*l[i%4]+(120-220*i-1380*i**2-920*i**3)*l[(i+1)%4]+(-1488-1626*i-387*i**2+21*i**3)*l[(i+2)%4]+(1088*i+1104+351*i**2+37*i**3)*l[(i+3)%4] ) // (+42*i**2+146*i+168+4*i**3)
       return l[i%4]
    # Antoine Genitrini, Mar 14 2013
    

Formula

G.f.: A(z) = (1-B(z)-sqrt(1-5*z-B(z)))/2, where B(z) = (1-sqrt(1-4*z))/2.
a(1) = 1 and for n > 1 a(n) = Sum_{j=1..n-1} (a(j)+b(j))*a(n-j), where b(n) = C(2*n-2, n-1)/n (Catalan number).
Also REVERT[A(x)] = x + 2*x^2 + x^3*(A007440(x) (Reversion of Fibonacci). - Olivier Gérard, Jul 05 2001
a(n+1) = Sum_{k=0..n} A039599(n,k) * A000108(k). - Philippe Deléham, Mar 12 2007
P-recurrence: (-500*n+2000*n^3)*a(n)+(120-220*n-1380*n^2-920*n^3)*a(n+1)+(-1488-1626*n-387*n^2+21*n^3)*a(n+2)+(1088*n+1104+351*n^2+37*n^3)*a(n+3)+(-42*n^2-146*n-168-4*n^3)*a(n+4); a(0)=0; a(1)=1; a(2)=2; a(3)=7. - Antoine Genitrini, Mar 14 2013
a(n) ~ (25/4)^n / (sqrt(15*Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 08 2014
a(n) = (Sum_{i=0..n} binomial(2*i+1,i)*binomial(2*n-1,n-i-1))/(2*n-1). - Vladimir Kruchinin, Jun 09 2014
1 + 1/z*A(z)^2 = 1 + z + 4*z^2 + 18*z^3 + 86*z^4 + ... is the o.g.f. for A153294. - Peter Bala, Jul 21 2015

Extensions

More terms and formulas from Frank Ruskey, Nov 15 1997

A363308 Expansion of g.f. C(x*C(x)^3), where C(x) = 1 + x*C(x)^2 is the g.f. of the Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 5, 26, 141, 790, 4542, 26668, 159333, 966038, 5930678, 36801660, 230491410, 1455283172, 9253674120, 59209786992, 380961295445, 2463303690790, 15998687418030, 104325569140156, 682768883525830, 4483232450501492, 29527005540912660, 195006621974036808
Offset: 0

Views

Author

Paul D. Hanna, May 28 2023

Keywords

Comments

Compare the g.f. A(x) = C(x*C(x)^3) to the identity C(-x*C(x)^3) = 1/C(x), where C(x) = 1 + x*C(x)^2 is the g.f. of the Catalan numbers (A000108).
Conjecture: a(n) is odd iff n is a power of 2 or n = 0.

Examples

			G.f.: A(x) = 1 + x + 5*x^2 + 26*x^3 + 141*x^4 + 790*x^5 + 4542*x^6 + 26668*x^7 + 159333*x^8 + 966038*x^9 + 5930678*x^10 + ...
such that A(x) = C(x*C(x)^3), where
C(x) = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + ... + A000108(n)*x^n + ...
x*C(x)^3 = x + 3*x^2 + 9*x^3 + 28*x^4 + 90*x^5 + ... + A000245(n)*x^n + ...
Note that x*C(x)^3 = (C(x) - 1)*(1-x)/x - 1.
Also, the g.f. of related sequence A033296 begins
B(x) = 1 + x + 6*x^2 + 42*x^3 + 326*x^4 + 2706*x^5 + 23526*x^6 + ...
where A(x) = B(x/A(x)), B(x) = A(x*B(x)) = C(x*B(x)*C(x*B(x))^3).
		

Crossrefs

Cf. A127632, A153294, A033296, A000108 (C(x)), A000245 (x*C(x)^3).

Programs

  • PARI
    {a(n) = if(n==0,1, sum(k=1,n, 3*k* binomial(2*k+1,k) * binomial(2*n+k,n-k) / ((2*k+1)*(2*n+k)) ) )}
    for(n=0, 30, print1(a(n), ", "))
    
  • PARI
    /* G.f. A(x) = C(x*C(x)^3), where C(x) = 1 + x*C(x)^2 */
    {a(n) = my(C = (1 - sqrt(1 - 4*x +x^2*O(x^n)))/(2*x)); polcoeff( subst(C, x, x*C^3), n)}
    for(n=0, 30, print1(a(n), ", "))

Formula

G.f. A(x) = Sum_{n>=0} a(n)*x^n may be defined as follows; here, C(x) is the g.f. of the Catalan numbers (A000108).
(1) A(x) = C(x*C(x)^3), where C(x) = (1 - sqrt(1-4*x))/(2*x).
(2) A(x) = B(x/A(x)) where B(x) = A(x*B(x)) = C( x*B(x) * C(x*B(x))^3 ) is the g.f. of A033296.
(3) a(n) = Sum_{k=1..n} 3*k* binomial(2*k+1,k) * binomial(2*n+k,n-k) / ((2*k+1)*(2*n+k)) for n > 0, with a(0) = 1.
D-finite with recurrence 4*n*(n-1)*(21687905*n +56141583)*(n+1)*a(n) +2*n*(n-1) *(43375810*n^2 -6022811713*n +10976463649)*a(n-1) -(n-1) *(15429963345*n^3 -200018809315*n^2 +658353214412*n -632905646028)*a(n-2) +(102558230760*n^4 -1409936457473*n^3 +6909548744112*n^2 -14414518702669*n +10812683474490)*a(n-3) +(-212869593020*n^4 +3377685007909*n^3 -20069314453381*n^2 +52902205420466*n -52146873039204)*a(n-4) +4*(2*n-11) *(10773532140*n^3 -171459615587*n^2 +902576783797*n -1572525214995)*a(n-5) +4*(n-6) *(208500820*n -955419151)*(2*n-11) *(2*n-13)*a(n-6)=0. - R. J. Mathar, Nov 22 2024

A153293 G.f.: A(x) = F(x*F(x)^3) = F(F(x)-1) where F(x) = 1 + x*F(x)^3 is the g.f. of A001764.

Original entry on oeis.org

1, 1, 6, 42, 317, 2508, 20517, 172180, 1474689, 12843768, 113444721, 1014062898, 9158151426, 83449247979, 766340138037, 7085966319858, 65919413472834, 616559331247512, 5794778945023698, 54700034442193302, 518375457403431600
Offset: 0

Views

Author

Paul D. Hanna, Jan 14 2009

Keywords

Examples

			G.f.: A(x) = F(x*F(x)^3) = 1 + x + 6*x^2 + 42*x^3 + 317*x^4 +... where
F(x) = 1 + x + 3*x^2 + 12*x^3 + 55*x^4 + 273*x^5 + 1428*x^6 +...
F(x)^2 = 1 + 2*x + 7*x^2 + 30*x^3 + 143*x^4 + 728*x^5 + 3876*x^6 +...
F(x)^3 = 1 + 3*x + 12*x^2 + 55*x^3 + 273*x^4 + 1428*x^5 + 7752*x^6 +...
		

Crossrefs

Programs

  • Maple
    S:= (1/2)*GAMMA(n+1/3)*GAMMA(n+2/3)*hypergeom([4/3, 5/3, -n+1], [5/2, 2*n+2], -27/4)*27^n*sqrt(3)/(Pi*GAMMA(2*n+2)):
    1, seq(simplify(S),n=1..40); # Robert Israel, Dec 26 2017
  • Mathematica
    F[x_] = 1 + InverseSeries[x/(1 + x)^3 + O[x]^21];
    CoefficientList[F[F[x] - 1], x] (* Jean-François Alcover, Nov 02 2019 *)
  • PARI
    {a(n)=if(n==0,1,sum(k=0,n,binomial(3*k+1,k)/(3*k+1)*binomial(3*(n-k)+3*k,n-k)*3*k/(3*(n-k)+3*k)))}

Formula

a(n) = Sum_{k=0..n} C(3k+1,k)/(3k+1) * C(3n,n-k)*k/n for n>0 with a(0)=1.
G.f. satisfies: A(x) = 1 + x*F(x)^3*A(x)^3 where F(x) is the g.f. of A001764.
G.f. satisfies: A(x/G(x)) = F(x*G(x)^2) = F(G(x)-1) where G(x) = F(x/G(x)) is the g.f. of A000108 and F(x) is the g.f. of A001764.
a(n) = sqrt(3)*Gamma(n+2/3)*Gamma(n+1/3)*hypergeom([4/3, 5/3, -n+1], [5/2, 2*n+2], -27/4)*27^n/(2*Pi*(n+1)!) for n >= 1. - Robert Israel, Dec 26 2017

A153295 G.f.: A(x) = F(x*G(x)^2) where F(x) = G(x/F(x)) = 1 + x*F(x)^2 is the g.f. of A000108 (Catalan) and G(x) = F(x*G(x)) = 1 + x*G(x)^3 is the g.f. of A001764.

Original entry on oeis.org

1, 1, 4, 20, 110, 638, 3828, 23515, 146972, 930869, 5958094, 38462190, 250054804, 1635421543, 10750864640, 70987129653, 470542935654, 3129729034478, 20880459397920, 139689406647522, 936832986074664, 6297064070279195
Offset: 0

Views

Author

Paul D. Hanna, Jan 15 2009

Keywords

Examples

			G.f.: A(x) = F(x*G(x)^2) = 1 + x + 4*x^2 + 20*x^3 + 110*x^4 +... where
F(x) = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 132*x^6 +...
F(x)^2 = 1 + 2*x + 5*x^2 + 14*x^3 + 42*x^4 + 132*x^5 + 429*x^6 +...
G(x) = 1 + x + 3*x^2 + 12*x^3 + 55*x^4 + 273*x^5 + 1428*x^6 +...
G(x)^2 = 1 + 2*x + 7*x^2 + 30*x^3 + 143*x^4 + 728*x^5 + 3876*x^6 +...
G(x)^3 = 1 + 3*x + 12*x^2 + 55*x^3 + 273*x^4 + 1428*x^5 +...
A(x)^2 = 1 + 2*x + 9*x^2 + 48*x^3 + 276*x^4 + 1656*x^5 +...
G(x)^2*A(x)^2 = 1 + 4*x + 20*x^2 + 110*x^3 + 638*x^4 +...
		

Crossrefs

Programs

  • PARI
    {a(n)=if(n==0,1,sum(k=0,n,binomial(2*k+1,k)/(2*k+1)*binomial(3*(n-k)+2*k,n-k)*2*k/(3*(n-k)+2*k)))}

Formula

a(n) = Sum_{k=0..n} C(2k+1,k)/(2k+1) * C(3n-k,n-k)*2k/(3n-k) for n>0 with a(0)=1.
G.f. satisfies: A(x) = 1 + x*G(x)^2*A(x)^2 where G(x) is the g.f. of A001764.
G.f. satisfies: A(x/F(x)) = F(x*F(x)) where F(x) is the g.f. of A000108 (Catalan).
From Alexander Burstein, Nov 23 2019: (Start)
G.f. satisfies: A(x) = 1 + x*G(x)^3*m(x*G(x)^3), where m(x) is the g.f. of A001006 (Motzkin numbers) and G(x) is the g.f. of A001764 (ternary trees).
G.f. satisfies: A(-x*A(x)^7) = 1/A(x). (End)

A243585 Expansion of x*log'(C(C(x)-1)-1), C(x) = (1-sqrt(1-4*x))/(2*x).

Original entry on oeis.org

1, 4, 20, 106, 580, 3244, 18446, 106250, 618340, 3628600, 21438820, 127377980, 760346350, 4556473276, 27396081950, 165189725326, 998492094244, 6048338850560, 36706629690824, 223139239595840, 1358475322091620
Offset: 0

Views

Author

Vladimir Kruchinin, Jun 07 2014

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(Sqrt[(1-4*x)*(2*Sqrt[1-4*x]+5*x-2)/x]), {x, 0, 20}], x] (* Vaclav Kotesovec, Jun 08 2014 *)
    A243585[n_] := Binomial[2 n, n] Hypergeometric2F1[1/2, -n, n + 1, -4];
    Table[A243585[n], {n, 0, 20}] (* Peter Luschny, Aug 04 2019 *)
  • Maxima
    a(n):=sum(binomial(2*k,k)*binomial(2*n,n-k),k,0,n);

Formula

a(n) = Sum_{k=0..n} binomial(2*k,k)*binomial(2*n,n-k).
a(n) ~ 5^(2*n+1/2) / (4^n * sqrt(3*Pi*n)). - Vaclav Kotesovec, Jun 08 2014
First column of A094527^2. 1 + x*exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 4*x^2 + 18*x^3 + 86*x^4 + ... is the o.g.f. for A153294. - Peter Bala, Jul 21 2015
Conjecture D-finite with recurrence: 2*n*(2*n-1)*(3*n-5)*a(n) +(-123*n^3+328*n^2-249*n+60)*a(n-1) +50*(n-1)*(2*n-3)*(3*n-2)*a(n-2)=0. - R. J. Mathar, Jun 14 2016
a(n) = binomial(2*n, n)*hypergeom([1/2, -n], [n + 1], -4). - Peter Luschny, Aug 04 2019
Showing 1-6 of 6 results.