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.

Previous Showing 21-30 of 42 results. Next

A288954 Number of relaxed compacted binary trees of right height at most one with minimal sequences between branch nodes except before the first and after the last branch node on level 0.

Original entry on oeis.org

1, 1, 3, 13, 79, 555, 4605, 42315, 436275, 4894155, 60125625, 794437875, 11325612375, 172141044075, 2793834368325, 48009995908875, 874143494098875, 16757439016192875, 338309837281040625, 7157757510792763875, 158706419654857449375, 3673441093896736036875
Offset: 2

Views

Author

Michael Wallner, Jun 20 2017

Keywords

Comments

A relaxed compacted binary tree of size n is a directed acyclic graph consisting of a binary tree with n internal nodes, one leaf, and n pointers. It is constructed from a binary tree of size n, where the first leaf in a post-order traversal is kept and all other leaves are replaced by pointers. These links may point to any node that has already been visited by the post-order traversal. The right height is the maximal number of right-edges (or right children) on all paths from the root to any leaf after deleting all pointers. A branch node is a node with a left and right edge (no pointer). See the Genitrini et al. link. - Michael Wallner, Apr 20 2017
a(n) is the number of plane increasing trees with n+1 nodes where in the growth process induced by the labels a maximal young leaves and non-maximal young leaves alternate except for a sequence of maximal young leaves at the begininning and at the end. A young leaf is a leaf with no left sibling. A maximal young leaf is a young leaf with maximal label. See the Wallner link. - Michael Wallner, Apr 20 2017

Examples

			See A288950 and A288953.
		

Crossrefs

Cf. A288953 (variation without initial sequence).
Cf. A177145 (variation without initial and final sequence).
Cf. A001147 (relaxed compacted binary trees of right height at most one).
Cf. A082161 (relaxed compacted binary trees of unbounded right height).
Cf. A000032, A000246, A001879, A051577, A213527, A288950, A288952 (subclasses of relaxed compacted binary trees of right height at most one, see the Wallner link).
Cf. A000166, A000255, A000262, A052852, A123023, A130905, A176408, A201203 (variants of relaxed compacted binary trees of right height at most one, see the Wallner link).

Programs

  • Mathematica
    terms = 22; egf = 1/(3(1-z))(1/Sqrt[1-z^2] + (3z^3 - z^2 - 2z + 2)/((1-z)(1-z^2))) + O[z]^terms;
    CoefficientList[egf, z] Range[0, terms-1]! (* Jean-François Alcover, Dec 13 2018 *)

Formula

E.g.f.: 1/(3*(1-z))*( 1/sqrt(1-z^2) + (3*z^3-z^2-2*z+2)/((1-z)*(1-z^2)) ).

A317277 a(n) = Sum_{k=0..n} binomial(n-1,k-1)*k^n*n!/k!; a(0) = 1.

Original entry on oeis.org

1, 1, 6, 81, 1828, 60565, 2734926, 160109005, 11724156648, 1045312448841, 111114793839610, 13845807451708441, 1994597720747571468, 328351264019737949341, 61162428777982281583302, 12782305566531823350524805, 2975150384583838798131401296, 766253903501365584725344992529
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 25 2018

Keywords

Comments

a(n) is the n-th term of the Lah transform of the n-th powers.

Crossrefs

Programs

  • Magma
    [1]cat[(&+[Binomial(n-1,j-1)*Binomial(n,j)*Factorial(n-j)*j^n: j in [0..n]]): n in [1..30]]; // G. C. Greubel, Mar 09 2021
    
  • Maple
    A317277:= n-> `if`(n=0,1, add(binomial(n-1,j-1)*binomial(n,j)*(n-j)!*j^n, j=0..n)); seq(A317277(n), n=0..30); # G. C. Greubel, Mar 09 2021
  • Mathematica
    Join[{1}, Table[Sum[Binomial[n - 1, k - 1] k^n n!/k!, {k, n}], {n, 17}]]
    Join[{1}, Table[n! SeriesCoefficient[Sum[k^n (x/(1 - x))^k/k!, {k, n}], {x, 0, n}], {n, 17}]]
  • PARI
    a(n) = if (n==0, 1, sum(k=0, n, binomial(n-1, k-1)*k^n*n!/k!)); \\ Michel Marcus, Mar 10 2021; corrected Jun 15 2022
  • Sage
    [1]+[sum(binomial(n-1,j-1)*binomial(n,j)*factorial(n-j)*j^n for j in (0..n)) for n in (1..30)] # G. C. Greubel, Mar 09 2021
    

Formula

a(n) = n! * [x^n] Sum_{k>=0} k^n*(x/(1 - x))^k/k!.

Extensions

Name edited by Michel Marcus, Jun 15 2022

A361649 a(n) = (1+n)*(2*a(n-1) - (n-2)*a(n-2)) with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 6, 44, 380, 3768, 42112, 523072, 7141248, 106209920, 1708188416, 29525850624, 545607622144, 10730032423936, 223691600732160, 4926284479250432, 114255071320260608, 2783085758131765248, 71023717127647854592, 1894699527341113999360, 52730415074075898937344
Offset: 0

Views

Author

Keywords

Crossrefs

For m=1 the formula gives the sequence A052852.

Programs

  • Maple
    # For recursion:
    N:=20;a[0]:=1;a[1]:=1;for n from 1 to N do
    a[n+1]:=(n+2)*(2*a[n]-(n-1)*a[n-1]);od;
    # For closed form:
    C := binomial:
    a := n -> `if`(n=0, 1, add(C(n-1, i)*C(n+1, n-i)*(n-i)!*2^(i-1), i = 0..n-1)):
    seq(a(n), n = 0..20);
  • PARI
    memo=Map([0, 1; 1, 1]);
    a(n)=if(mapisdefined(memo, n),mapget(memo, n), mapput(memo, n, (n+1)* (2*a(n-1) - (n-2)*a(n-2))); a(n)); \\ Winston de Greef, Mar 20 2023

Formula

a(n) = (m+n-1)*(2*a(n-1) - (n-2)*a(n-2)) where m = 2.
a(n) = Sum_{i=0..n-1} binomial(n-1,i) * binomial(n+m-1,n-i)*(n-i)!*m^(i-1) where m = 2 for n >= 1.
E.g.f.: (1+x^2)*exp(2/(1-x))/(4*(1-x)^2*exp(2))+3/4. - Alois P. Heinz, Mar 19 2023
a(n) ~ 2^(-9/4) * exp(2*sqrt(2*n) - n - 1) * n^(n + 3/4). - Vaclav Kotesovec, Mar 20 2023

A009737 Expansion of e.g.f. tan(x)*exp(tan(x)).

Original entry on oeis.org

0, 1, 2, 5, 20, 81, 438, 2477, 16680, 120481, 973034, 8496245, 80252732, 817734321, 8859646110, 102873611549, 1258403748432, 16372688411713, 223202277906386, 3213260867586149, 48295209177888356, 761792907575450385, 12510350648500199814, 214507625428065409805
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    [0] cat Coefficients(R!( Laplace( Tan(x)*Exp(Tan(x)) ) )); // G. C. Greubel, Mar 09 2021
  • Maple
    m:= 30; S:= series(tan(x)*exp(tan(x)), x, m+1); seq(j!*coeff(S, x, j), j = 0..m); # G. C. Greubel, Mar 09 2021
  • Mathematica
    With[{nn=20},CoefficientList[Series[Tan[x]Exp[Tan[x]],{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Oct 30 2011 *)
  • Maxima
    a(n):=sum((1+(-1)^(n-k))*sum(j!*stirling2(n,j)*2^(n-j-1)*(-1)^((n+k)/2+j)*binomial(j-1,k-1),j,k,n)/(k-1)!,k,1,n); /* Vladimir Kruchinin, Apr 19 2011 */
    
  • Sage
    [factorial(n)*( tan(x)*exp(tan(x)) ).series(x,n+1).list()[n] for n in (0..30)] # G. C. Greubel, Mar 09 2021
    

Formula

a(n) = Sum_{k=1..n} ((1+(-1)^(n-k))/(k-1)!) * Sum_{j=k..n} j! * Stirling2(n,j) * 2^(n-j-1)*(-1)^((n+k)/2+j)*binomial(j-1,k-1). - Vladimir Kruchinin, Apr 19 2011
a(n) = D^n(x*exp(x)) evaluated at x = 0, where D is the operator (1+x^2)*d/dx. Cf. A052852. a(n) = Sum_{k=1..n} k*A059419(n,k). - Peter Bala, Nov 25 2011

Extensions

Extended and signs tested by Olivier Gérard, Mar 15 1997

A072678 Generalized Bell numbers B_{4,2}.

Original entry on oeis.org

1, 21, 1045, 93289, 12975561, 2581284541, 693347907421, 241253367679185, 105394372192969489, 56410454014314490981, 36271084122927079387941, 27567930377271475039277881, 24435533594428382909107147225
Offset: 1

Views

Author

Karol A. Penson, Jul 01 2002

Keywords

Crossrefs

Cf. A090439 (alternating row sums of A090438).

Programs

  • Maple
    f:= n -> simplify((2*n)!*hypergeom([2*n+1], [3], 1)/(2*exp(1))):
    map(f, [$1..30]); # Robert Israel, May 23 2016
  • Mathematica
    a[n_] := n*(2n-1)!*Hypergeometric1F1[2-2n, 3, -1]; Array[a, 30] (* Jean-François Alcover, Sep 01 2016 *)

Formula

a(n) = (2*n)!*hypergeom([2*n+1], [3], 1)/(2*exp(1)), n=1, 2, ... Special values of the confluent hypergeometric function 1F1.
a(n) = sum(A090438(n, k), k=2..2*n)= sum((1/k!)*product(fallfac(k+(j-1)*(4-2), 2), j=1..n), k=1..infinity)/exp(1), n>=1. From eq.(9) of the Blasiak et al. reference with r=4, s=2. fallfac(n, m) := A008279(n, m) (falling factorials triangle). a(0) := 1 may be added.
8*n*(2*n-1)*(2*n+1)*(n+1)^2*(n+3)*(n+2)*a(n)+(2*(n+1))*(8*n^3+32*n^2+42*n+13)*a(n+1)*(n+3)*(n+2)-(8*n^2+38*n+51)*(n+3)*(n+2)*a(n+2)+(n+3)*(n+2)*a(n+3) = 0. - Robert Israel, May 23 2016
a(n) = A052852(2*n-1). - Mark van Hoeij, Sep 05 2022

Extensions

Edited by Wolfdieter Lang, Dec 23 2003

A114329 Triangle T(n,k) is the number of partitions of an n-set into lists (cf. A000262) with k lists of size 1.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 6, 6, 0, 1, 36, 24, 12, 0, 1, 240, 180, 60, 20, 0, 1, 1920, 1440, 540, 120, 30, 0, 1, 17640, 13440, 5040, 1260, 210, 42, 0, 1, 183120, 141120, 53760, 13440, 2520, 336, 56, 0, 1, 2116800, 1648080, 635040, 161280, 30240, 4536, 504, 72, 0, 1
Offset: 0

Views

Author

Vladeta Jovovic, Feb 06 2006

Keywords

Comments

The average number of size 1 lists goes to 1 as n->infinity. In other words, lim_{n->infinity} Sum_{k>=1} T(n,k)*k/A000262(n) = 1. - Geoffrey Critzer, Feb 20 2022 (after asymptotic limits by Vaclav Kotesovec given in A000262)

Examples

			Triangle begins:
    1;
    0,   1;
    2,   0,  1;
    6,   6,  0,  1;
   36,  24, 12,  0, 1;
  240, 180, 60, 20, 0, 1;
  ...
		

Crossrefs

Programs

  • Maple
    t:=taylor(exp(x/(1-x)+(y-1)*x),x,11):for n from 0 to 10 do for k from 0 to n do printf("%d, ",coeff(n!*coeff(t,x,n),y,k)): od: printf("\n"): od: # Nathaniel Johnston, Apr 27 2011
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(j!*
         `if`(j=1, x, 1)*b(n-j)*binomial(n-1, j-1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Feb 19 2022
  • Mathematica
    nn = 10; Table[Take[(Range[0, nn]! CoefficientList[ Series[Exp[ x/(1 - x) - x + y x], {x, 0, nn}], {x, y}])[[i]], i], {i, 1, nn}] // Grid (* Geoffrey Critzer, Feb 19 2022 *)

Formula

E.g.f.: exp(x/(1-x)+(y-1)*x). More generally, e.g.f. for number of partitions of n-set into lists with k lists of size m is exp(x/(1-x)+(y-1)*x^m).

A317365 Expansion of e.g.f. x*exp(x/(1 + x))/(1 + x).

Original entry on oeis.org

0, 1, 0, -3, 16, -75, 336, -1295, 1632, 55881, -1124000, 16722981, -229985040, 3089923837, -41225160144, 545880027225, -7069180940864, 86130735547665, -882387869940288, 3847692639294541, 171852333163131600, -8392137456287472699, 276055495385982856720, -8067943451470397940543
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 26 2018

Keywords

Comments

Inverse Lah transform of the nonnegative integers (A001477).

Crossrefs

Programs

  • Magma
    [n eq 0 select 0 else (-1)^(n+1)*Factorial(n)*Evaluate(LaguerrePolynomial(n-1, 0), 1): n in [0..25]]; // G. C. Greubel, Mar 05 2021
    
  • Maple
    a:= proc(n) option remember; add((-1)^(n-k)*
          n!/(k-1)!*binomial(n-1, k-1), k=1..n)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 26 2018
  • Mathematica
    nmax = 23; CoefficientList[Series[x Exp[x/(1 + x)]/(1 + x) , {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[(-1)^(n - k) Binomial[n - 1, k - 1] n!/(k - 1)!, {k, n}], {n, 0, 23}]
    Join[{0}, Table[(-1)^(n+1) n! LaguerreL[n-1, 1], {n, 23}]]
  • PARI
    a(n) = (-1)^(n+1)*n!*pollaguerre(n-1,0,1); \\ Michel Marcus, Mar 06 2021
  • Sage
    [0 if n==0 else (-1)^(n+1)*factorial(n)*gen_laguerre(n-1, 0, 1) for n in (0..25)] # G. C. Greubel, Mar 05 2021
    

Formula

a(n) = Sum_{k=1..n} binomial(n-1,k-1)*n!/(k-1)!.
From G. C. Greubel, Mar 05 2021: (Start)
a(n) = n! * Hypergeometric1F1([-(n-1)], [1], -1).
a(n) = (-1)^(n+1) * n! * LaguerreL(n-1, 1). (End)

A361528 a(n) = (2+n)*(2*a(n-1) - (n-2)*a(n-2)) with a(0)=a(1)=1.

Original entry on oeis.org

1, 1, 8, 75, 804, 9681, 129168, 1889379, 30037500, 515342817, 9484627608, 186305208219, 3888697965012, 85920579594225, 2002828537732896, 49107722192594739, 1263165207424720812, 34004577057249890241, 955970215914084949800, 28011115058953357075563, 853924857091970071203972
Offset: 0

Views

Author

Keywords

Crossrefs

For m=1 the formula gives the sequence A052852.
Cf. A288268. For m=2 the formula gives the sequence A361649.

Programs

  • Maple
    # For recursion:
    N:=10;a[0]:=1;a[1]:=1;for n from 1 to N do
    a[n+1]:=(n+3)*(2*a[n]-(n-1)*a[n-1]);od;
    # For closed form:
    C := binomial:
    a := n -> `if`(n=0, 1, add(C(n-1, i)*C(n+2, n-i)*(n-i)!*3^(i-1), i = 0..n-1)):
    seq(a(n), n = 0..20);
    # Alternative:
    a := n -> `if`(n=0, 1, (n + 2)!*hypergeom([1 - n], [3], -3) / 6):
    seq(simplify(a(n)), n = 0..20); # Peter Luschny, Mar 23 2023
  • Mathematica
    nmax = 20; CoefficientList[Series[23/27 + (4 + 3*x + 2*x^3)*E^(3*x/(1 - x))/(27*(1 - x)^3), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Mar 23 2023 *)
  • PARI
    a(n) = if(n==0, 1, my(m=3); sum(i=0, n-1, binomial(n-1, i)*binomial(n+m-1, n-i)*(n-i)!*m^(i-1))) \\ Andrew Howroyd, Mar 23 2023

Formula

a(n) = (m+n-1)*(2*a(n-1) - (n-2)*a(n-2)) where m=3, a(0)=a(1)=1.
a(n) = Sum_{i=0..n-1} binomial(n-1,i) * binomial(n+m-1,n-i)*(n-i)!*m^(i-1) where m = 3 for n >= 1.
a(n) = (n + 2)!*hypergeom([1 - n], [3], -3) / 6 for n >= 1. - Peter Luschny, Mar 23 2023
From Vaclav Kotesovec, Mar 23 2023: (Start)
E.g.f.: 23/27 + (4 + 3*x + 2*x^3) * exp(3*x/(1-x)) / (27*(1-x)^3).
a(n) ~ exp(2*sqrt(3*n) - n - 3/2) * n^(n + 5/4) / (sqrt(2) * 3^(9/4)). (End)

Extensions

Terms a(12) and beyond from Andrew Howroyd, Mar 23 2023

A093190 Array t read by antidiagonals: number of {112,212}-avoiding words.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 6, 9, 4, 1, 8, 21, 16, 5, 1, 10, 39, 52, 25, 6, 1, 12, 63, 136, 105, 36, 7, 1, 14, 93, 292, 365, 186, 49, 8, 1, 16, 129, 544, 1045, 816, 301, 64, 9, 1, 18, 171, 916, 2505, 3006, 1603, 456, 81, 10, 1, 20, 219, 1432, 5225, 9276, 7315, 2864, 657, 100, 11
Offset: 1

Views

Author

Ralf Stephan, Apr 20 2004

Keywords

Comments

t(k,n) = number of n-long k-ary words that simultaneously avoid the patterns 112 and 212.

Examples

			Square array begins as:
  1  1   1   1    1    1 ... 1*A000012;
  2  4   6   8   10   12 ... 2*A000027;
  3  9  21  39   63   93 ... 3*A002061;
  4 16  52 136  292  544 ... 4*A135859;
  5 25 105 365 1045 2505 ... ;
Antidiagonal rows begins as:
  1;
  1,  2;
  1,  4,  3;
  1,  6,  9,   4;
  1,  8, 21,  16,   5;
  1, 10, 39,  52,  25,  6;
  1, 12, 63, 136, 105, 36, 7;
		

Crossrefs

Main diagonal is A052852.
Antidiagonal sums are in A084261 - 1.

Programs

  • Magma
    [(&+[Factorial(j)*Binomial(k,j)*Binomial(n-k,j-1): j in [0..n-k+1]]): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 09 2021
  • Mathematica
    T[n_, k_]:= Sum[j!*Binomial[k, j]*Binomial[n-k, j-1], {j,0,n-k+1}];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 09 2021 *)
  • PARI
    t(n,k)=sum(j=0,k,j!*binomial(k,j)*binomial(n-1,j-1))
    
  • Sage
    flatten([[ sum(factorial(j)*binomial(k,j)*binomial(n-k,j-1) for j in (0..n-k+1)) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 09 2021
    

Formula

t(n, k) = Sum{j=0..n} j!*C(n, j)*C(k-1, j-1). (square array)
T(n, k) = Sum_{j=0..n-k+1} j!*binomial(k,j)*binomial(n-k,j-1). (number triangle) - G. C. Greubel, Mar 09 2021

A102289 Total number of odd lists in all sets of lists, cf. A000262.

Original entry on oeis.org

0, 1, 2, 15, 76, 665, 5286, 56287, 597080, 7601841, 99702730, 1484554511, 23049638052, 393702612745, 7036703742446, 135702811542495, 2737989749177776, 58848546456947297, 1321063959370833810, 31310238786268648591, 773291778432688011260, 20031956775840631151481
Offset: 0

Views

Author

Vladeta Jovovic, Feb 19 2005

Keywords

Crossrefs

Programs

  • Maple
    G:=(x/(1-x^2))*exp(x/(1-x)): Gser:=series(G,x=0,25): seq(n!*coeff(Gser,x^n),n=1..22); # Emeric Deutsch
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add(
          (p-> p+`if`(j::odd, [0, p[1]], 0))(b(n-j)*
            binomial(n-1, j-1)*j!), j=1..n))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 10 2016
  • Mathematica
    Rest[CoefficientList[Series[x/(1-x^2)*E^(x/(1-x)), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Sep 29 2013 *)
    nxt[{n_,a_,b_,c_}]:={n+1,b,c,(n+1)*c+(n+1)^2*b-(n-1)^2 (n+1)*a}; NestList[ nxt,{2,0,1,2},30][[All,2]] (* Harvey P. Dale, Jan 13 2019 *)

Formula

E.g.f.: x/(1-x^2)*exp(x/(1-x)).
a(n) = n*a(n-1) + n^2*a(n-2) - (n-2)^2*n*a(n-3). - Vaclav Kotesovec, Sep 29 2013
a(n) ~ sqrt(2)/4 * n^(n+1/4)*exp(2*sqrt(n)-n-1/2) * (1 + 7/(48*sqrt(n))). - Vaclav Kotesovec, Sep 29 2013

Extensions

More terms from Emeric Deutsch, Jun 24 2005
a(0)=0 pepended by Alois P. Heinz, May 10 2016
Previous Showing 21-30 of 42 results. Next