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

A001405 a(n) = binomial(n, floor(n/2)).

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 462, 924, 1716, 3432, 6435, 12870, 24310, 48620, 92378, 184756, 352716, 705432, 1352078, 2704156, 5200300, 10400600, 20058300, 40116600, 77558760, 155117520, 300540195, 601080390, 1166803110
Offset: 0

Views

Author

Keywords

Comments

Sperner's theorem says that this is the maximal number of subsets of an n-set such that no one contains another.
When computed from index -1, [seq(binomial(n,floor(n/2)), n = -1..30)]; -> [1,1,1,2,3,6,10,20,35,70,126,...] and convolved with aerated Catalan numbers [seq(((n+1) mod 2)*binomial(n,n/2)/((n/2)+1), n = 0..30)]; -> [1,0,1,0,2,0,5,0,14,0,42,0,132,0,...] shifts left by one: [1,1,2,3,6,10,20,35,70,126,252,...] and if again convolved with aerated Catalan numbers, gives A037952 apart from the initial term. - Antti Karttunen, Jun 05 2001 [This is correct because the g.f.'s satisfy (1+x*g001405(x))*g126120(x) = g001405(x) and g001405(x)*g126120(x) = g037952(x)/x. - R. J. Mathar, Sep 23 2021]
Number of ordered trees with n+1 edges, having nonroot nodes of outdegree 0 or 2. - Emeric Deutsch, Aug 02 2002
Gives for n >= 1 the maximum absolute column sum norm of the inverse of the Vandermonde matrix (a_ij) i=0..n-1, j=0..n-1 with a_00=1 and a_ij=i^j for (i,j) != (0,0). - Torsten Muetze, Feb 06 2004
Image of Catalan numbers A000108 under the Riordan array (1/(1-2x),-x/(1-2x)) or A065109. - Paul Barry, Jan 27 2005
Number of left factors of Dyck paths, consisting of n steps. Example: a(4)=6 because we have UDUD, UDUU, UUDD, UUDU, UUUD and UUUU, where U=(1,1) and D=(1,-1). - Emeric Deutsch, Apr 23 2005
Number of dispersed Dyck paths of length n; they are defined as concatenations of Dyck paths and (1,0)-steps on the x-axis; equivalently, Motzkin paths with no (1,0)-steps at positive height. Example: a(4)=6 because we have HHHH, HHUD, HUDH, UDHH, UDUD, and UUDD, where U=(1,1), H=(1,0), and D=(1,-1). - Emeric Deutsch, Jun 04 2011
a(n) is odd iff n=2^k-1. - Jon Perry, May 05 2005
An inverse Chebyshev transform of binomial(1,n)=(1,1,0,0,0,...) where g(x)->(1/sqrt(1-4*x^2))*g(x*c(x^2)), with c(x) the g.f. of A000108. - Paul Barry, May 13 2005
In a random walk on the number line, starting at 0 and with 0 absorbing after the first step, number of ways of ending up at a positive integer after n steps. - Joshua Zucker, Jul 31 2005
Maximum number of sums of the form Sum_{i=1..n} e(i)*a(i) that are congruent to 0 mod q, where e_i=0 or 1 and gcd(a_i,q)=1, provided that q > ceiling(n/2). - Ralf Stephan, Apr 27 2003
Also the number of standard tableaux of height <= 2. - Mike Zabrocki, Mar 24 2007
Hankel transform of this sequence forms A000012 = [1,1,1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
A001263 * [1, -2, 3, -4, 5, ...] = [1, -1, -2, 3, 6, -10, -20, 35, 70, -126, ...]. - Gary W. Adamson, Jan 02 2008
Equals right border of triangle A153585. - Gary W. Adamson, Dec 28 2008
Second binomial transform of A168491. - Philippe Deléham, Nov 27 2009
a(n) is also the number of distinct strings of length n, each of which is a prefix of a string of balanced parentheses; see example. - Lee A. Newberg, Apr 26 2010
Number of symmetric balanced strings of n pairs of parentheses; see example. - Joerg Arndt, Jul 25 2011
a(n) is the number of permutation patterns modulo 2. - Olivier Gérard, Feb 25 2011
For n >= 2, a(n-1) is the number of incongruent two-color bracelets of 2*n-1 beads, n of which are black (A007123), having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
The number of permutations of n elements where p(k-2) < p(k) for all k. - Joerg Arndt, Jul 23 2011
Also size of the equivalence class of S_{n+1} containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> cba where a < b < c, cf. A210668. - Tom Roby, May 15 2012
a(n) is the number of symmetric Dyck paths of length 2n. - Matt Watson, Sep 26 2012
a(n) is divisible by A000108(floor(n/2)) = abs(A129996(n-2)). - Paul Curtz, Oct 23 2012
a(n) is the number of permutations of length n avoiding both 213 and 231 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Number of symmetric standard Young tableaux of shape (n,n). - Ran Pan, Apr 10 2015
From Luciano Ancora, May 09 2015: (Start)
Also "stepped path" in the array formed by partial sums of the all 1's sequence (or a Pascal's triangle displayed as a square). Example:
[1], [1], 1, 1, 1, 1, 1, ... A000012
1, [2], [3], 4, 5, 6, 7, ...
1, 3, [6], [10], 15, 21, 28, ...
1, 4, 10, [20], [35], 56, 84, ...
1, 5, 15, 35, [70], [126], 210, ...
Sequences in second formula are the mixed diagonals shown in this array. (End)
a(n) = A265848(n,n). - Reinhard Zumkeller, Dec 24 2015
The constant Sum_{n >= 0} a(n)/n! is 1 + A130820. - Peter Bala, Jul 02 2016
Number of meanders (walks starting at the origin and ending at any altitude >= 0 that may touch but never go below the x-axis) with n steps from {-1,1}. - David Nguyen, Dec 20 2016
a(n) is also the number of paths of n steps (either up or down by 1) that end at the maximal value achieved along the path. - Winston Luo, Jun 01 2017
Number of binary n-tuples such that the number of 1's in the even positions is the same as the number of 1's in the odd positions. - Juan A. Olmos, Dec 21 2017
Equivalently, a(n) is the number of subsets of {1,...,n} containing as many even numbers as odd numbers. - Gus Wiseman, Mar 17 2018
a(n) is the number of Dyck paths with semilength = n+1, returns to the x-axis = floor((n+3)/2) and up movements in odd positions = floor((n+3)/2). Example: a(4)=6, U=up movement in odd position, u=up movement in even position, d=down movement, -=return to x-axis: Uududd-Ud-Ud-, Ud-Uudd-Uudd-, Uudd-Uudd-Ud-, Ud-Ud-Uududd-, Uudd-Ud-Uudd-, Ud-Uududd-Ud-. - Roger Ford, Dec 29 2017
Let C_n(R, H) denote the transition matrix from the ribbon basis to the homogeneous basis of the graded component of the algebra of noncommutative symmetric functions of order n. Letting I(2^(n-1)) denote the identity matrix of order 2^(n-1), it has been conjectured that the dimension of the kernel of C_n(R, H) - I(2^(n-1)) is always equal to a(n-1). - John M. Campbell, Mar 30 2018
The number of U-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are U-equivalent iff the positions of pattern U are identical in these paths. - Sergey Kirgizov, Apr 08 2018
All binary self-dual codes of length 2n, for n > 0, must contain at least a(n) codewords of weight n. More to the point, there will always be at least one, perhaps unique, binary self-dual code of length 2n that will contain exactly a(n) codewords that have a hamming weight equal to half the length of the code (n). This code can be constructed by direct summing the unique binary self-dual code of length 2 (up to permutation equivalence) to itself n times. A permutation equivalent code can be constructed by augmenting two identity matrices of length n together. - Nathan J. Russell, Nov 25 2018
Closed under addition. - Torlach Rush, Apr 18 2019
The sequence starting (1, 2, 3, 6, ...) is the invert transform of A097331: (1, 1, 0, 1, 0, 2, 0, 5, 0, 14, 0, 42, ...). - Gary W. Adamson, Feb 22 2020
From Gary W. Adamson, Feb 24 2020: (Start)
The sequence is the culminating limit of an infinite set of sequences with convergents of 2*cos(Pi/N), N = (3, 5, 7, 9, ...).
The first few such sequences are:
N = 3: (1, 1, 1, 1, 1, 1, 1, 1, ...)
N = 5: (1, 1, 2, 3, 5, 8, 13, 21, ...) = A000045
N = 7: (1, 1, 2, 3, 6, 10, 19, 33, ...) = A028495, a(n)/a(n-1) tends to 1.801937...
N = 9 (1, 1, 2, 3, 6, 10, 20, 35, ...) = A061551, a(n)/a(n_1) tends to 1.879385...
...
In the limit one gets the current sequence with ratio 2. (End)
a(n) is also the number of monotone lattice paths from (0,0) to (floor(n/2),ceiling(n/2)). These are the number of Grand Dyck paths when n is even. - Nachum Dershowitz, Aug 12 2020
The maximum number of preimages that a permutation of length n+1 can have under the consecutive-132-avoiding stack-sorting map. - Colin Defant, Aug 28 2020
Counts faro permutations of length n. Faro permutations are permutations avoiding the three consecutive patterns 231, 321 and 312. They are obtained by a perfect faro shuffle of two nondecreasing words of lengths differing by at most one. - Sergey Kirgizov, Jan 12 2021
Per "Sperner's Theorem", the largest possible familes of finite sets none of which contain any other sets in the family. - Renzo Benedetti, May 26 2021
a(n-1) are the incomplete, primitive Dyck paths of n steps without a first return: paths of U and D steps starting at the origin, never touching the horizontal axis later on, and ending above the horizontal axis. n=1: {U}, n=2: {UU}, n=3: {UUU, UUD}, n=4: {UUUU, UUUD, UUDU}, n=5: {UUUUU, UUUUD, UUUDD, UUDUU, UUUDU, UUDUD}. For comparison: A037952 counts incomplete Dyck paths with n steps with any number of intermediate returns to the horizontal axis, ending above the horizontal axis. - R. J. Mathar, Sep 24 2021
a(n) is the number of noncrossing partitions of [n] whose nontrivial blocks are of type {a,b}, with a <= n/2, b > n/2. - Francesca Aicardi, May 29 2022
Maximal coefficient of (1+x)^n. - Vaclav Kotesovec, Dec 30 2022
Sums of lower-left-to-upper-right diagonals of the Catalan Triangle A001263. - Howard A. Landman, Sep 16 2024

Examples

			For n = 4, the a(4) = 6 distinct strings of length 4, each of which is a prefix of a string of balanced parentheses, are ((((, (((), (()(, ()((, ()(), and (()). - _Lee A. Newberg_, Apr 26 2010
There are a(5)=10 symmetric balanced strings of 5 pairs of parentheses:
[ 1] ((((()))))
[ 2] (((()())))
[ 3] ((()()()))
[ 4] ((())(()))
[ 5] (()()()())
[ 6] (()(())())
[ 7] (())()(())
[ 8] ()()()()()
[ 9] ()((()))()
[10] ()(()())() - _Joerg Arndt_, Jul 25 2011
G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 35*x^7 + 70*x^8 + ...
The a(4)=6 binary 4-tuples such that the number of 1's in the even positions is the same as the number of 1's in the odd positions are 0000, 1100, 1001, 0110, 0011, 1111. - _Juan A. Olmos_, Dec 21 2017
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 135.
  • K. Engel, Sperner Theory, Camb. Univ. Press, 1997; Theorem 1.1.1.
  • P. Frankl, Extremal sets systems, Chap. 24 of R. L. Graham et al., eds, Handbook of Combinatorics, North-Holland.
  • J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.16(b), p. 452.

Crossrefs

Row sums of Catalan triangle A053121 and of symmetric Dyck paths A088855.
Enumerates the structures encoded by A061854 and A061855.
First differences are in A037952.
Apparently a(n) = lim_{k->infinity} A094718(k, n).
Partial sums are in A036256. Column k=2 of A182172. Column k=1 of A335570.
Bisections: A000984 (even part), A001700 (odd part).
Cf. A097331.
Cf. A107373, A340567, A340568, A340569 (popularity of certain patterns in faro permutations).

Programs

  • GAP
    List([0..40],n->Binomial(n,Int(n/2))); # Muniru A Asiru, Apr 08 2018
    
  • Haskell
    a001405 n = a007318_row n !! (n `div` 2) -- Reinhard Zumkeller, Nov 09 2011
    
  • Magma
    [Binomial(n, Floor(n/2)): n in [0..40]]; // Vincenzo Librandi, Nov 16 2014
    
  • Maple
    A001405 := n->binomial(n, floor(n/2)): seq(A001405(n), n=0..33);
  • Mathematica
    Table[Binomial[n, Floor[n/2]], {n, 0, 40}] (* Stefan Steinerberger, Apr 08 2006 *)
    Table[DifferenceRoot[Function[{a,n},{-4 n a[n]-2 a[1+n]+(2+n) a[2+n] == 0,a[1] == 1,a[2] == 1}]][n], {n, 30}] (* Luciano Ancora, Jul 08 2015 *)
    Array[Binomial[#,Floor[#/2]]&,40,0] (* Harvey P. Dale, Mar 05 2018 *)
  • Maxima
    A001405(n):=binomial(n,floor(n/2))$
    makelist(A001405(n),n,0,30); /* Martin Ettl, Nov 01 2012 */
    
  • PARI
    a(n) = binomial(n, n\2);
    
  • PARI
    first(n) = x='x+O('x^n); Vec((-1+2*x+sqrt(1-4*x^2))/(2*x-4*x^2)) \\ Iain Fox, Dec 20 2017 (edited by Iain Fox, May 07 2018)
    
  • Python
    from math import comb
    def A001405(n): return comb(n,n//2) # Chai Wah Wu, Jun 07 2022

Formula

a(n) = max_{k=0..n} binomial(n, k).
a(2*n) = A000984(n), a(2*n+1) = A001700(n).
By symmetry, a(n) = binomial(n, ceiling(n/2)). - Labos Elemer, Mar 20 2003
P-recursive with recurrence: a(0) = 1, a(1) = 1, and for n >= 2, (n+1)*a(n) = 2*a(n-1) + 4*(n-1)*a(n-2). - Peter Bala, Feb 28 2011
G.f.: (1+x*c(x^2))/sqrt(1-4*x^2) = 1/(1 - x - x^2*c(x^2)); where c(x) = g.f. for Catalan numbers A000108.
G.f.: (-1 + 2*x + sqrt(1-4*x^2))/(2*x - 4*x^2). - Lee A. Newberg, Apr 26 2010
G.f.: 1/(1 - x - x^2/(1 - x^2/(1 - x^2/(1 - x^2/(1 - ... (continued fraction). - Paul Barry, Aug 12 2009
a(0) = 1; a(2*m+2) = 2*a(2*m+1); a(2*m+1) = Sum_{k = 0..2*m} (-1)^k*a(k)*a(2*m-k). - Len Smiley, Dec 09 2001
G.f.: (sqrt((1+2*x)/(1-2*x)) - 1)/(2*x). - Vladeta Jovovic, Apr 28 2003
The o.g.f. A(x) satisfies A(x) + x*A^2(x) = 1/(1-2*x). - Peter Bala, Feb 28 2011
E.g.f.: BesselI(0, 2*x) + BesselI(1, 2*x). - Vladeta Jovovic, Apr 28 2003
a(0) = 1; a(2*m+2) = 2*a(2*m+1); a(2*m+1) = 2*a(2*m) - c(m), where c(m)=A000108(m) are the Catalan numbers. - Christopher Hanusa (chanusa(AT)washington.edu), Nov 25 2003
a(n) = Sum_{k=0..n} (-1)^k*2^(n-k)*binomial(n, k)*A000108(k). - Paul Barry, Jan 27 2005
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*binomial(1, n-2*k). - Paul Barry, May 13 2005
From Paul Barry, Nov 02 2004: (Start)
a(n) = Sum_{k=0..floor((n+1)/2)} (binomial(n+1, k)*(cos((n-2*k+1)*Pi/2) + sin((n-2*k+1)*Pi/2))).
a(n) = Sum_{k=0..n+1}, (binomial(n+1, (n-k+1)/2)*(1-(-1)^(n-k))*(cos(k*Pi/2) + sin(k*Pi))/2). (End)
a(n) = Sum_{k=floor(n/2)..n} (binomial(n,n-k) - binomial(n,n-k-1)). - Paul Barry, Sep 06 2007
Inverse binomial transform of A005773 starting (1, 2, 5, 13, 35, 96, ...) and double inverse binomial transform of A001700. Row sums of triangle A132815. - Gary W. Adamson, Aug 31 2007
a(n) = Sum_{k=0..n} A120730(n,k). - Philippe Deléham, Oct 16 2008
a(n) = Sum_{k = 0..floor(n/2)} (binomial(n,k) - binomial(n,k-1)). - Nishant Doshi (doshinikki2004(AT)gmail.com), Apr 06 2009
Sum_{n>=0} a(n)/10^(n+1) = 0.1123724... = (sqrt(3)-sqrt(2))/(2*sqrt(2)); Sum_{n>=0} a(n)/100^(n+1) = 0.0101020306102035... = (sqrt(51)-sqrt(49))/(2*sqrt(49)). - Mark Dols, Jul 15 2010
Conjectured: a(n) = 2^n*2F1(1/2,-n;2;2), useful for number of paths in 1-d for which the coordinate is never negative. - Benjamin Phillabaum, Feb 20 2011
a(2*m+1) = (2*m+1)*a(2*m)/(m+1), e.g., a(7) = (7/4)*a(6) = (7/4)*20 = 35. - Jon Perry, Jan 20 2011
From Peter Bala, Feb 28 2011: (Start)
Let F(x) be the logarithmic derivative of the o.g.f. A(x). Then 1+x*F(x) is the o.g.f. for A027306.
Let G(x) be the logarithmic derivative of 1+x*A(x). Then x*G(x) is the o.g.f. for A058622. (End)
Let M = an infinite tridiagonal matrix with 1's in the super and subdiagonals and [1,0,0,0,...] in the main diagonal; and V = the vector [1,0,0,0,...]. a(n) = M^n*V, leftmost term. - Gary W. Adamson, Jun 13 2011
Let M = an infinite tridiagonal matrix with 1's in the super and subdiagonals and [1,0,0,0,...] in the main diagonal. a(n) = M^n_{1,1}. - Corrected by Gary W. Adamson, Jan 30 2012
a(n) = A007318(n, floor(n/2)). - Reinhard Zumkeller, Nov 09 2011
a(n+1) = Sum_{k=0..n} a(n-k)*A097331(k) = a(n) + Sum_{k=0..(n-1)/2} A000108(k)*a(n-2*k-1). - Philippe Deléham, Nov 27 2011
a(n) = A214282(n) - A214283(n), for n > 0. - Reinhard Zumkeller, Jul 14 2012
a(n) = Sum_{k=0..n} A168511(n,k)*(-1)^(n-k). - Philippe Deléham, Mar 19 2013
a(n+2*p-2) = Sum_{k=0..floor(n/2)} A009766(n-k+p-1, k+p-1) + binomial(n+2*p-2, p-2), for p >= 1. - Johannes W. Meijer, Aug 02 2013
O.g.f.: (1-x*c(x^2))/(1-2*x), with the o.g.f. c(x) of Catalan numbers A000108. See the rewritten formula given by Lee A. Newberg above. This is the o.g.f. for the row sums the Riordan triangle A053121. - Wolfdieter Lang, Sep 22 2013
a(n) ~ 2^n / sqrt(Pi * n/2). - Charles R Greathouse IV, Oct 23 2015
a(n) = 2^n*hypergeom([1/2,-n], [2], 2). - Vladimir Reshetnikov, Nov 02 2015
a(2*k) = Sum_{i=0..k} binomial(k, i)*binomial(k, i), a(2*k+1) = Sum_{i=0..k} binomial(k+1, i)*binomial(k, i). - Juan A. Olmos, Dec 21 2017
a(0) = 1, a(n) = 2 * a(n-1) for even n, a(n) = (2*n/(n+1)) * a(n-1) for odd n. - James East, Sep 25 2019
a(n) = A037952(n) + A000108(n/2) where A(.)=0 for non-integer argument. - R. J. Mathar, Sep 23 2021
From Amiram Eldar, Mar 10 2022: (Start)
Sum_{n>=0} 1/a(n) = 2*Pi/(3*sqrt(3)) + 2.
Sum_{n>=0} (-1)^n/a(n) = 2/3 - 2*Pi/(9*sqrt(3)). (End)
For k>2, Sum_{n>=0} a(n)/k^n = (sqrt((k+2)/(k-2)) - 1)*k/2. - Vaclav Kotesovec, May 13 2022
From Peter Bala, Mar 24 2023: (Start)
a(n) = Sum_{k = 0..n+1} (-1)^(k+binomial(n+2,2)) * k/(n+1) * binomial(n+1,k)^2.
(n + 1)*(2*n - 1)*a(n) = (-1)^(n+1)*2*a(n-1) + 4*(n - 1)*(2*n + 1)*a(n-2) with a(0) = a(1) = 1. (End)
a(n) = Integral_{x=-2..2} x^n*W(x)*dx, n>=0, where W(x) = sqrt((2+x)/(2-x))/(2*Pi) is a positive function on x=(-2,2) and is singular at x = 2. Therefore a(n) is a positive definite sequence. - Karol A. Penson, May 12 2025

A007595 a(n) = C_n / 2 if n is even or ( C_n + C_((n-1)/2) ) / 2 if n is odd, where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 3, 7, 22, 66, 217, 715, 2438, 8398, 29414, 104006, 371516, 1337220, 4847637, 17678835, 64823110, 238819350, 883634026, 3282060210, 12233141908, 45741281820, 171529836218, 644952073662, 2430973304732, 9183676536076, 34766775829452, 131873975875180
Offset: 1

Views

Author

Keywords

Comments

Number of necklaces of 2 colors with 2n beads and n-1 black ones. - Wouter Meeussen, Aug 03 2002
Number of rooted planar binary trees up to reflection (trees with n internal nodes, or a total of 2n+1 nodes). - Antti Karttunen, Aug 19 2002
Number of even permutations avoiding 132.
Number of Dyck paths of length 2n having an even number of peaks at even height. Example: a(3)=3 because we have UDUDUD, U(UD)(UD)D and UUUDDD, where U=(1,1), D=(1,-1) and the peaks at even height are shown between parentheses. - Emeric Deutsch, Nov 13 2004
Number of planar trees (A002995) on n edges with one distinguished edge. - David Callan, Oct 08 2005
Assuming offset 0 this is an analog of A275165: pairs of two Catalan nestings with index sum n. - R. J. Mathar, Jul 19 2016

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A047996(2*n, n-1) for n >= 1 and a(n) = A072506(n, n-1) for n >= 2.
Occurs in A073201 as rows 0, 2, 4, etc. (with a(0)=1 included).
Cf. also A003444, A007123.

Programs

  • Maple
    A007595 := n -> (1/2)*(Cat(n) + (`mod`(n,2)*Cat((n-1)/2))); Cat := n -> binomial(2*n,n)/(n+1);
  • Mathematica
    Table[(Plus@@(EulerPhi[ # ]Binomial[2n/#, (n-1)/# ] &)/@Intersection[Divisors[2n], Divisors[n-1]])/(2n), {n, 2, 32}] (* or *) Table[If[EvenQ[n], CatalanNumber[n]/2, (CatalanNumber[n] + CatalanNumber[(n-1)/2])/2], {n, 24}]
    Table[(CatalanNumber[n] + 2^n Binomial[1/2, (n + 1)/2] Sin[Pi n/2])/2, {n, 1, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
    Table[If[EvenQ[n],CatalanNumber[n]/2,(CatalanNumber[n]+CatalanNumber[(n-1)/2])/2],{n,30}] (* Harvey P. Dale, Sep 06 2021 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n % 2, (catalan(n) + catalan((n-1)/2))/2, catalan(n)/2); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: (2-2*x-sqrt(1-4*x)-sqrt(1-4*x^2))/x/4. - Vladeta Jovovic, Sep 26 2003
D-finite with recurrence: n*(n+1)*a(n) -6*n*(n-1)*a(n-1) +4*(2*n^2-10*n+9)*a(n-2) +8*(n^2+n-9)*a(n-3) -48*(n-3)*(n-4)*a(n-4) +32*(2*n-9)*(n-5)*a(n-5)=0. - R. J. Mathar, Jun 03 2014, adapted to offset Feb 20 2020
a(n) ~ 4^n /(2*sqrt(Pi)*n^(3/2)). - Ilya Gutkovskiy, Jul 19 2016
a(2n) = A000150(2n). - R. J. Mathar, Jul 19 2016
a(n) = (A000108(n) + 2^n * binomial(1/2, (n+1)/2) * sin(Pi*n/2))/2. - Vladimir Reshetnikov, Oct 03 2016
Sum_{n>=1} a(n)/4^n = (3-sqrt(3))/2 (A334843). - Amiram Eldar, Mar 20 2022

Extensions

Description corrected by Reiner Martin and Wouter Meeussen, Aug 04 2002

A073201 Array of cycle count sequences for the table A073200.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 7, 4, 1, 1, 1, 22, 11, 3, 1, 1, 1, 66, 31, 7, 2, 1, 1, 1, 217, 96, 22, 4, 3, 1, 1, 1, 715, 305, 66, 11, 7, 2, 1, 1, 1, 2438, 1007, 217, 30, 22, 4, 2, 2, 1, 1, 8398, 3389, 715, 93, 66, 11, 3, 5, 1, 1, 1, 29414, 11636, 2438, 292, 217, 30, 6, 14, 2, 2, 1, 1
Offset: 0

Views

Author

Antti Karttunen, Jun 25 2002

Keywords

Comments

Each row of this table gives the counts of separate orbits/cycles to which the Catalan bijection given in the corresponding row of A073200 partitions each A000108(n) structures encoded in the range [A014137(n-1)..A014138(n-1)] of the sequence A014486/A063171.
Note that for involutions (self-inverse Catalan bijections) this is always (A000108(n)+Affffff(n))/2, where Affffff is the corresponding "fix-count sequence" from the table A073202.

Crossrefs

Only the first known occurrence(s) given (marked with ? if not yet proved/unclear): rows 0, 2, 4, etc.: A007595, Row 1: A073191, Rows 6 (& 8): A073431, Row 7: A000108, Rows 12, 14, 20, ...: A057513, Rows 16, 18, ...: A003239, Row 57, ..., 164: A007123, Row 168: A073193, Row 261: A002995, Row 2614: A057507, Row 2618 (?), row 17517: A001683.

A085161 Involution of natural numbers induced by Catalan Automorphism *A085161 acting on symbolless S-expressions encoded by A014486/A063171.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 17, 14, 12, 21, 11, 20, 16, 10, 18, 19, 15, 13, 22, 23, 45, 37, 31, 58, 28, 54, 42, 26, 49, 51, 40, 35, 63, 25, 48, 39, 34, 62, 30, 57, 44, 24, 46, 56, 38, 32, 59, 33, 61, 53, 29, 55, 47, 43, 27, 50, 60, 52, 41, 36, 64, 65, 129, 107, 87, 170
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

This automorphism reflects the interpretations (pp)-(rr) of Stanley, obtained from the Dyck paths with the "rising slope mapping" illustrated on the example lines.

Examples

			Map the Dyck paths (Stanley's interpretation (i)) to noncrossing Murasaki-diagrams (Stanley's interpretation (rr)) by drawing a vertical line above each rising slope / and connect those vertical lines that originate from the same height without any lower valleys between, as in illustration below:
..................................................
...._____..___....................................
...|.|...||...|...................................
...|.||..|||..|...................._.___...___....
...|.||..|||..|...................|.|...|.|...|...
...|.||..||/\.|....i.e..equal.to..|.|.|.|.|.|.|...
...|.|/\.|/..\/\..................|.|.|.|.|.|.|...
.../\/..\/......\.................|.|.|.|.|.|.|...
...10110011100100=11492=A014486(250)..............
...()(())((())()).................................
Now this automorphism gives the parenthesization such that the corresponding Murasaki-diagram is a reflection of the original one:
....___.._____....................................
...|...||...|.|...................................
...||..|||..|.|....................___..._____....
...||..|||..|.|...................|...|.|...|.|...
...||..||/\.|.|....i.e..equal.to..|.|.|.|.|.|.|...
...|/\.|/..\/\/\..................|.|.|.|.|.|.|...
.../..\/........\.................|.|.|.|.|.|.|...
...11001110010100=13204=A014486(360)..............
...(())((())()()).................................
So we have A085161(250)=360 and A085161(360)=250.
		

Crossrefs

a(n) = A085163(A057508(n)) = A074684(A057164(A074683(n))). Occurs in A073200. Cf. also A085159, A085160, A085162, A085175. Alternative mappings illustrated in A086431 & A085169.
Number of cycles: A007123. Number of fixed points: A001405 (in each range limited by A014137 and A014138).

A291883 Number T(n,k) of symmetrically unique Dyck paths of semilength n and height k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 5, 3, 1, 0, 1, 9, 11, 4, 1, 0, 1, 19, 31, 19, 5, 1, 0, 1, 35, 91, 69, 29, 6, 1, 0, 1, 71, 250, 252, 127, 41, 7, 1, 0, 1, 135, 690, 855, 540, 209, 55, 8, 1, 0, 1, 271, 1863, 2867, 2117, 1005, 319, 71, 9, 1, 0, 1, 527, 5017, 9339, 8063, 4411, 1705, 461, 89, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Examples

			: T(4,2) = 5:       /\      /\        /\/\    /\  /\    /\/\/\
:              /\/\/  \  /\/  \/\  /\/    \  /  \/  \  /      \
:
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,   1;
  0, 1,   2,   1;
  0, 1,   5,   3,   1;
  0, 1,   9,  11,   4,   1;
  0, 1,  19,  31,  19,   5,   1;
  0, 1,  35,  91,  69,  29,   6,  1;
  0, 1,  71, 250, 252, 127,  41,  7, 1;
  0, 1, 135, 690, 855, 540, 209, 55, 8, 1;
  ...
		

Crossrefs

Main and first two lower diagonals give A000012, A001477, A028387(n-1) for n>0.
Row sums give A007123(n+1).
T(2n,n) give A291885.

Programs

  • Maple
    b:= proc(x, y, k) option remember; `if`(x=0, z^k, `if`(y0, b(x-1, y-1, k), 0))
        end:
    g:= proc(x, y, k) option remember; `if`(x=0, z^k, `if`(y>0,
          g(x-2, y-1, k), 0)+ g(x-2, y+1, max(y+1, k)))
        end:
    T:= n-> (p-> seq(coeff(p, z, i)/2, i=0..n))(b(2*n, 0$2)+g(2*n, 0$2)):
    seq(T(n), n=0..14);
  • Mathematica
    b[x_, y_, k_] := b[x, y, k] = If[x == 0, z^k, If[y < x - 1, b[x - 1, y + 1, Max[y + 1, k]], 0] + If[y > 0, b[x - 1, y - 1, k], 0]];
    g[x_, y_, k_] := g[x, y, k] = If[x == 0, z^k, If[y > 0, g[x - 2, y - 1, k], 0] + g[x - 2, y + 1, Max[y + 1, k]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i]/2, {i, 0, n}]][b[2*n, 0, 0] + g[2*n, 0, 0]];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 03 2018, from Maple *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import Poly, Symbol, flatten
    z=Symbol('z')
    @cacheit
    def b(x, y, k): return z**k if x==0 else (b(x - 1, y + 1, max(y + 1, k)) if y0 else 0)
    @cacheit
    def g(x, y, k): return z**k if x==0 else (g(x - 2, y - 1, k) if y>0 else 0) + g(x - 2, y + 1, max(y + 1, k))
    def T(n): return 1 if n==0 else [i//2 for i in Poly(b(2*n, 0, 0) + g(2*n, 0, 0)).all_coeffs()[::-1]]
    print(flatten(map(T, range(15)))) # Indranil Ghosh, Sep 06 2017

Formula

T(n,k) = (A080936(n,k) + A132890(n,k))/2.
Sum_{k=1..n} k * T(n,k) = A291886(n).

A086431 Involution of natural numbers induced by the Catalan bijection gma086431 acting on symbolless S-expressions encoded by A014486/A063171.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 11, 10, 12, 13, 17, 18, 16, 14, 15, 21, 20, 19, 22, 23, 28, 25, 30, 33, 24, 29, 26, 31, 32, 27, 35, 34, 36, 45, 48, 46, 49, 50, 44, 47, 42, 37, 39, 43, 38, 40, 41, 58, 59, 57, 54, 55, 56, 53, 51, 52, 63, 62, 61, 60, 64, 65, 79, 70, 84, 93
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

This Catalan bijection reflects the interpretations (pp)-(rr) of Stanley, obtained with the "descending slope mapping" from the Dyck paths encoded by A014486.

Examples

			Map the Dyck paths (Stanley's interpretation (i)) to noncrossing Murasaki-diagrams (Stanley's interpretation (rr)) by drawing a vertical line above each descending slope \ and connect those vertical lines that originate from the same height without any lower valleys between, as in illustration below:
..................................................
.....___________..................................
....|...|....._.|.................................
....|..||...||.||..................___________....
....|..||...||.||.................|...|...._..|...
....|..||../\|.||..i.e..equal.to..|.|.|.|.|.|.|...
....|./\|./..\/\|.................|.|.|.|.|.|.|...
.../\/..\/......\.................|.|.|.|.|.|.|...
...10110011100100=11492=A014486(250)
Now the Catalan bijection gma086431 gives the parenthesization such that the corresponding Murasaki-diagram is a reflection of the original one:
.....___________..................................
....|...._..|...|.................................
....|...|.|||..||..................___________....
....|...|.|||..||.................|.._....|...|...
....|../\/\||..||..i.e..equal.to..|.|.|.|.|.|.|...
....|./....\|./\|.................|.|.|.|.|.|.|...
.../\/......\/..\.................|.|.|.|.|.|.|...
...10111010001100=11916=A014486(296)
So we have A086431(250)=296 and A086431(296)=250.
		

Crossrefs

a(n) = A057164(A085161(A057164(n))) = A086425(A057164(A086426(n))). Occurs in A073200. Cf. also A086427, A086430.
Number of cycles: A007123. Number of fixed points: A001405. (In range [A014137(n-1)..A014138(n-1)] of this permutation.).

A082313 Involution of natural numbers: A057501-conjugate of A057164.

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 6, 7, 5, 9, 21, 14, 18, 13, 11, 22, 16, 17, 12, 19, 20, 10, 15, 23, 58, 37, 49, 35, 28, 62, 42, 46, 32, 51, 55, 27, 41, 25, 59, 39, 50, 36, 30, 63, 44, 45, 31, 53, 54, 26, 40, 33, 64, 47, 48, 34, 56, 57, 24, 38, 60, 61, 29, 43, 52, 65, 170, 107, 142, 100
Offset: 0

Views

Author

Antti Karttunen, Apr 17 2003. Proposed by Wouter Meeussen in Dec 15 2001

Keywords

Comments

Note: This is isomorphic with Meeussen's "skewcatacycleft" operation acting on the interpretation (gg) of the exercise 19 by Stanley.

Crossrefs

a(n) = A069888(A057502(n)). Occurs in A073200 as row 604463486276865131809167. Cf. also A082314, A082315, A082333, A082334.
Number of cycles: A007123. Number of fixed-points: A001405. Max. cycle size: A046698. LCM of cycle sizes: A046698. (In range [A014137(n-1)..A014138(n-1)] of this permutation, possibly shifted one term left or right).

Formula

a(n) = A057501(A057164(A057502(n)))

A085162 Permutation of natural numbers induced by Catalan Automorphism *A085162.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 17, 16, 12, 21, 14, 15, 11, 10, 18, 20, 19, 13, 22, 23, 45, 44, 31, 58, 42, 43, 30, 26, 49, 57, 56, 35, 63, 37, 40, 39, 38, 41, 28, 29, 25, 24, 46, 48, 47, 32, 59, 54, 55, 53, 51, 52, 34, 33, 27, 50, 62, 61, 60, 36, 64, 65, 129, 128, 87, 170
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Crossrefs

a(n) = A057163(A085161(A057163(n))). Cf. also A085165, A085166, A086431. Occurs in A073200.
Number of cycles: A007123. Number of fixed points: A001405 (in each range limited by A014137 and A014138).

A378941 Number of Motzkin paths of length n up to reversal.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 32, 70, 179, 435, 1142, 2947, 7889, 21051, 57192, 155661, 427795, 1179451, 3271214, 9102665, 25434661, 71282431, 200406472, 564905068, 1596435581, 4521772933, 12835116530, 36504093693, 104012240063, 296871993373, 848694481664, 2429882584254, 6966789756243
Offset: 0

Views

Author

Andrew Howroyd, Dec 17 2024

Keywords

Comments

A Motzkin path of length n is a path from (0,0) to (n,0) using only steps U = (1,1), H = (1,0) and D = (1,-1). This sequence considers a path and its reversal to be the same. The number of symmetric paths of length 2n (and also 2n+1) is given by A005773(n+1).
a(n) + 1 is an upper bound on the order of the linear recurrence of column n-1 of A287151. At least for columns up to 7, this bound gives the actual order of the recurrence. For example, a(5) = 13 and the order of the recurrence of column 4 (=A059524) is 14.

Examples

			The Motzkin paths for a(1)..a(5) are:
a(1) = 1: H;
a(2) = 2: HH, UD;
a(3) = 3: HHH, UHD, HUD=UDH;
a(4) = 7: HHHH, HUDH, UHHD, UUDD, UDUD, HHUD=UDHH, HUHD=UHDH.
a(5) = 13: HHHHH, HUHDH, UHHHD, UUHDD, UDHUD, HHHUD=UDHHH, HHUHD=UHDHH, HHUDH=HUDHH, HUHHD=UHHDH, HUUDD=UUDDH, HUDUD=UDUDH, UHUDD=UUHDD, UHDUD=UPUHD.
		

Crossrefs

Cf. A001006, A005773, A007123 (similar for Dyck paths), A175954, A185100, A287151, A292357.

Programs

  • PARI
    Vec(-3/(4*x)-(1+sqrt(1-2*x-3*x^2+O(x^40)))/(4*x^2)+(1+x)/(-1+3*x^2+sqrt(1-2*x^2-3*x^4+O(x^40)))) \\ Thomas Scheuerle, Dec 18 2024

Formula

a(n) = (A001006(n) + A005773(floor(1 + n/2))) / 2.

A005217 Number of unlabeled unit interval graphs with n nodes.

Original entry on oeis.org

1, 2, 4, 9, 21, 55, 151, 447, 1389, 4502, 15046, 51505, 179463, 634086, 2265014, 8163125, 29637903, 108282989, 397761507, 1468063369, 5441174511, 20242989728, 75566702558, 282959337159, 1062523000005, 4000108867555, 15095081362907, 57088782570433
Offset: 1

Views

Author

Keywords

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6.7.
  • R. W. Robinson, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1980.

Programs

  • Mathematica
    m = 30;
    A[x_] = (-1 + Exp[Sum[psi[x^k]/k, {k, 1, m}]] /. psi[x_] -> (1 + 2 x - Sqrt[1 - 4 x] Sqrt[1 - 4 x^2])/(4 Sqrt[1 - 4 x^2])) + O[x]^m;
    CoefficientList[A[x], x] // Rest (* Jean-François Alcover, Oct 24 2019 *)

Formula

G.f. A(x) = x + 2x^2 + 4x^3 + 9x^4 + 21x^5 + ... satisfies 1 + A(x) = exp( Sum_{k >= 1} psi(x^k)/k ), where psi(x) = (1+2*x-sqrt(1-4*x)*sqrt(1-4*x^2))/(4*sqrt(1-4*x^2)) is the g.f. for A007123.
For asymptotics, see for example Finch.
Showing 1-10 of 14 results. Next