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

A001006 Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n (labeled) points on a circle.

Original entry on oeis.org

1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2188, 5798, 15511, 41835, 113634, 310572, 853467, 2356779, 6536382, 18199284, 50852019, 142547559, 400763223, 1129760415, 3192727797, 9043402501, 25669818476, 73007772802, 208023278209, 593742784829, 1697385471211
Offset: 0

Views

Author

Keywords

Comments

Number of 4321-, (3412,2413)-, (3412,3142)- and 3412-avoiding involutions in S_n.
Number of sequences of length n-1 consisting of positive integers such that the first and last elements are 1 or 2 and the absolute difference between any 2 consecutive elements is 0 or 1. - Jon Perry, Sep 04 2003
From David Callan, Jul 15 2004: (Start)
Also number of Motzkin n-paths: paths from (0,0) to (n,0) in an n X n grid using only steps U = (1,1), F = (1,0) and D = (1,-1).
Number of Dyck n-paths with no UUU. (Given such a Dyck n-path, change each UUD to U, then change each remaining UD to F. This is a bijection to Motzkin n-paths. Example with n=5: U U D U D U U D D D -> U F U D D.)
Number of Dyck (n+1)-paths with no UDU. (Given such a Dyck (n+1)-path, mark each U that is followed by a D and each D that is not followed by a U. Then change each unmarked U whose matching D is marked to an F. Lastly, delete all the marked steps. This is a bijection to Motzkin n-paths. Example with n=6 and marked steps in small type: U U u d D U U u d d d D u d -> U U u d D F F u d d d D u d -> U U D F F D.) (End)
a(n) is the number of strings of length 2n+2 from the following recursively defined set: L contains the empty string and, for any strings a and b in L, we also find (ab) in L. The first few elements of L are e, (), (()), ((())), (()()), (((()))), ((()())), ((())()), (()(())) and so on. This proves that a(n) is less than or equal to C(n), the n-th Catalan number. See Orrick link (2024). - Saul Schleimer (saulsch(AT)math.rutgers.edu), Feb 23 2006 (Additional linked comment added by William P. Orrick, Jun 13 2024.)
a(n) = number of Dyck n-paths all of whose valleys have even x-coordinate (when path starts at origin). For example, T(4,2)=3 counts UDUDUUDD, UDUUDDUD, UUDDUDUD. Given such a path, split it into n subpaths of length 2 and transform UU->U, DD->D, UD->F (there will be no DUs for that would entail a valley with odd x-coordinate). This is a bijection to Motzkin n-paths. - David Callan, Jun 07 2006
Also the number of standard Young tableaux of height <= 3. - Mike Zabrocki, Mar 24 2007
a(n) is the number of RNA shapes of size 2n+2. RNA Shapes are essentially Dyck words without "directly nested" motifs of the form A[[B]]C, for A, B and C Dyck words. The first RNA Shapes are []; [][]; [][][], [[][]]; [][][][], [][[][]], [[][][]], [[][]][]; ... - Yann Ponty (ponty(AT)lri.fr), May 30 2007
The sequence is self-generated from top row A going to the left starting (1,1) and bottom row = B, the same sequence but starting (0,1) and going to the right. Take dot product of A and B and add the result to n-th term of A to get the (n+1)-th term of A. Example: a(5) = 21 as follows: Take dot product of A = (9, 4, 2, 1, 1) and (0, 1, 1, 2, 4) = (0, + 4 + 2 + 2 + 4) = 12; which is added to 9 = 21. - Gary W. Adamson, Oct 27 2008
Equals A005773 / A005773 shifted (i.e., (1,2,5,13,35,96,...) / (1,1,2,5,13,35,96,...)). - Gary W. Adamson, Dec 21 2008
Starting with offset 1 = iterates of M * [1,1,0,0,0,...], where M = a tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super and subdiagonals. - Gary W. Adamson, Jan 07 2009
a(n) is the number of involutions of {1,2,...,n} having genus 0. The genus g(p) of a permutation p of {1,2,...,n} is defined by g(p)=(1/2)[n+1-z(p)-z(cp')], where p' is the inverse permutation of p, c = 234...n1 = (1,2,...,n), and z(q) is the number of cycles of the permutation q. Example: a(4)=9; indeed, p=3412=(13)(24) is the only involution of {1,2,3,4} with genus > 0. This follows easily from the fact that a permutation p of {1,2,...,n} has genus 0 if and only if the cycle decomposition of p gives a noncrossing partition of {1,2,...,n} and each cycle of p is increasing (see Lemma 2.1 of the Dulucq-Simion reference). [Also, redundantly, for p=3412=(13)(24) we have cp'=2341*3412=4123=(1432) and so g(p)=(1/2)(4+1-2-1)=1.] - Emeric Deutsch, May 29 2010
Let w(i,j,n) denote walks in N^2 which satisfy the multivariate recurrence w(i,j,n) = w(i, j + 1, n - 1) + w(i - 1, j, n - 1) + w(i + 1, j - 1, n - 1) with boundary conditions w(0,0,0) = 1 and w(i,j,n) = 0 if i or j or n is < 0. Then a(n) = Sum_{i = 0..n, j = 0..n} w(i,j,n) is the number of such walks of length n. - Peter Luschny, May 21 2011
a(n)/a(n-1) tends to 3.0 as N->infinity: (1+2*cos(2*Pi/N)) relating to longest odd N regular polygon diagonals, by way of example, N=7: Using the tridiagonal generator [cf. comment of Jan 07 2009], for polygon N=7, we extract an (N-1)/2 = 3 X 3 matrix, [0,1,0; 1,1,1; 0,1,1] with an e-val of 2.24697...; the longest Heptagon diagonal with edge = 1. As N tends to infinity, the diagonal lengths tend to 3.0, the convergent of the sequence. - Gary W. Adamson, Jun 08 2011
Number of (n+1)-length permutations avoiding the pattern 132 and the dotted pattern 23\dot{1}. - Jean-Luc Baril, Mar 07 2012
Number of n-length words w over alphabet {a,b,c} such that for every prefix z of w we have #(z,a) >= #(z,b) >= #(z,c), where #(z,x) counts the letters x in word z. The a(4) = 9 words are: aaaa, aaab, aaba, abaa, aabb, abab, aabc, abac, abca. - Alois P. Heinz, May 26 2012
Number of length-n restricted growth strings (RGS) [r(1), r(2), ..., r(n)] such that r(1)=1, r(k)<=k, and r(k)!=r(k-1); for example, the 9 RGS for n=4 are 1010, 1012, 1201, 1210, 1212, 1230, 1231, 1232, 1234. - Joerg Arndt, Apr 16 2013
Number of length-n restricted growth strings (RGS) [r(1), r(2), ..., r(n)] such that r(1)=0, r(k)<=k and r(k)-r(k-1) != 1; for example, the 9 RGS for n=4 are 0000, 0002, 0003, 0004, 0022, 0024, 0033, 0222, 0224. - Joerg Arndt, Apr 17 2013
Number of (4231,5276143)-avoiding involutions in S_n. - Alexander Burstein, Mar 05 2014
a(n) is the number of increasing unary-binary trees with n nodes that have an associated permutation that avoids 132. For more information about unary-binary trees with associated permutations, see A245888. - Manda Riehl, Aug 07 2014
a(n) is the number of involutions on [n] avoiding the single pattern p, where p is any one of the 8 (classical) patterns 1234, 1243, 1432, 2134, 2143, 3214, 3412, 4321. Also, number of (3412,2413)-, (3412,3142)-, (3412,2413,3142)-avoiding involutions on [n] because each of these 3 sets actually coincides with the 3412-avoiding involutions on [n]. This is a complete list of the 8 singles, 2 pairs, and 1 triple of 4-letter classical patterns whose involution avoiders are counted by the Motzkin numbers. (See Barnabei et al. 2011 reference.) - David Callan, Aug 27 2014
From Tony Foster III, Jul 28 2016: (Start)
A series created using 2*a(n) + a(n+1) has Hankel transform of F(2n), offset 3, F being the Fibonacci bisection, A001906 (empirical observation).
A series created using 2*a(n) + 3*a(n+1) + a(n+2) gives the Hankel transform of Sum_{k=0..n} k*Fibonacci(2*k), offset 3, A197649 (empirical observation). (End)
Conjecture: (2/n)*Sum_{k=1..n} (2k+1)*a(k)^2 is an integer for each positive integer n. - Zhi-Wei Sun, Nov 16 2017
The Rubey and Stump reference proves a refinement of a conjecture of René Marczinzik, which they state as: "The number of 2-Gorenstein algebras which are Nakayama algebras with n simple modules and have an oriented line as associated quiver equals the number of Motzkin paths of length n." - Eric M. Schmidt, Dec 16 2017
Number of U_{k}-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are P-equivalent iff the positions of pattern P are identical in these paths. - Sergey Kirgizov, Apr 08 2018
If tau_1 and tau_2 are two distinct permutation patterns chosen from the set {132,231,312}, then a(n) is the number of valid hook configurations of permutations of [n+1] that avoid the patterns tau_1 and tau_2. - Colin Defant, Apr 28 2019
Number of permutations of length n that are sorted to the identity by a consecutive-321-avoiding stack followed by a classical-21-avoiding stack. - Colin Defant, Aug 29 2020
From Helmut Prodinger, Dec 13 2020: (Start)
a(n) is the number of paths in the first quadrant starting at (0,0) and consisting of n steps from the infinite set {(1,1), (1,-1), (1,-2), (1,-3), ...}.
For example, denoting U=(1,1), D=(1,-1), D_ j=(1,-j) for j >= 2, a(4) counts UUUU, UUUD, UUUD_2, UUUD_3, UUDU, UUDD, UUD_2U, UDUU, UDUD.
This step set is inspired by {(1,1), (1,-1), (1,-3), (1,-5), ...}, suggested by Emeric Deutsch around 2000.
See Prodinger link that contains a bijection to Motzkin paths. (End)
Named by Donaghey (1977) after the Israeli-American mathematician Theodore Motzkin (1908-1970). In Sloane's "A Handbook of Integer Sequences" (1973) they were called "generalized ballot numbers". - Amiram Eldar, Apr 15 2021
Number of Motzkin n-paths a(n) is split into A107587(n), number of even Motzkin n-paths, and A343386(n), number of odd Motzkin n-paths. The value A107587(n) - A343386(n) can be called the "shadow" of a(n) (see A343773). - Gennady Eremin, May 17 2021
Conjecture: If p is a prime of the form 6m+1 (A002476), then a(p-2) is divisible by p. Currently, no counterexample exists for p < 10^7. Personal communication from Robert Gerbicz: mod such p this is equivalent to A066796 with comment: "Every A066796(n) from A066796((p-1)/2) to A066796(p-1) is divisible by prime p of form 6m+1". - Serge Batalov, Feb 08 2022
From Rob Burns, Nov 11 2024: (Start)
The conjecture is proved in the 2017 paper by Rob Burns in the Links below. The result is contained in Tables 4 and 5 of the paper, which show that a(p-2) == 0 (mod p) when p == 1 (mod 6) and a(p-2) == -1 (mod p) when p == -1 (mod 6).
In fact, the 2017 paper by Burns establishes more general congruences for a(p^k - 2) where k >= 1.
If p == 1 (mod 6) then a(p^k - 2) == 0 (mod p) for k >= 1.
If p == -1 (mod 6) then a(p^k - 2) == -1 (mod p) when k is odd and a(p^k - 2) == 0 (mod p) when k is even.
These are consequences of the transitions provided in Tables 4, 5 and 6 of the paper.
The 2024 paper by Nadav Kohen also proves the conjecture. Proposition 6 of the paper states that a prime p divides a(p-2) if and only if p = (1 mod 3). (End)
From Peter Bala, Feb 10 2022: (Start)
Conjectures:
(1) For prime p == 1 (mod 6) and n, r >= 1, a(n*p^r - 2) == -A005717(n-1) (mod p), where we take A005717(0) = 0 to match Batalov's conjecture above.
(2) For prime p == 5 (mod 6) and n >= 1, a(n*p - 2) == -A005773(n) (mod p).
(3) For prime p >= 3 and k >= 1, a(n + p^k) == a(n) (mod p) for 0 <= n <= (p^k - 3).
(4) For prime p >= 5 and k >= 2, a(n + p^k) == a(n) (mod p^2) for 0 <= n <= (p^(k-1) - 3). (End)
The Hankel transform of this sequence with a(0) omitted gives the period-6 sequence [1, 0, -1, -1, 0, 1, ...] which is A010892 with its first term omitted, while the Hankel transform of the current sequence is the all-ones sequence A000012, and also it is the unique sequence with this property which is similar to the unique Hankel transform property of the Catalan numbers. - Michael Somos, Apr 17 2022
The number of terms in which the exponent of any variable x_i is not greater than 2 in the expansion of Product_{j=1..n} Sum_{i=1..j} x_i. E.g.: a(4) = 9: 3*x1^2*x2^2, 4*x1^2*x2*x3, 2*x1^2*x2*x4, x1^2*x3^2, x1^2*x3*x4, 2*x1*x2^2*x3, x1*x2^2*x4, x1*x2*x3^2, x1*x2*x3*x4. - Elif Baser, Dec 20 2024

Examples

			G.f.: 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 21*x^5 + 51*x^6 + 127*x^7 + 323*x^8 + ...
.
The 21 Motzkin-paths of length 5: UUDDF, UUDFD, UUFDD, UDUDF, UDUFD, UDFUD, UDFFF, UFUDD, UFDUD, UFDFF, UFFDF, UFFFD, FUUDD, FUDUD, FUDFF, FUFDF, FUFFD, FFUDF, FFUFD, FFFUD, FFFFF.
		

References

  • F. Bergeron, L. Favreau, and D. Krob, Conjectures on the enumeration of tableaux of bounded height, Discrete Math, vol. 139, no. 1-3 (1995), 463-468.
  • F. R. Bernhart, Catalan, Motzkin, and Riordan numbers, Discr. Math., 204 (1999) 73-112.
  • R. Bojicic and M. D. Petkovic, Orthogonal Polynomials Approach to the Hankel Transform of Sequences Based on Motzkin Numbers, Bulletin of the Malaysian Mathematical Sciences, 2015, doi:10.1007/s40840-015-0249-3.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pp. 24, 298, 618, 912.
  • A. J. Bu, Automated counting of restricted Motzkin paths, Enumerative Combinatorics and Applications, ECA 1:2 (2021) Article S2R12.
  • Naiomi Cameron, JE McLeod, Returns and Hills on Generalized Dyck Paths, Journal of Integer Sequences, Vol. 19, 2016, #16.6.1.
  • L. Carlitz, Solution of certain recurrences, SIAM J. Appl. Math., 17 (1969), 251-259.
  • Michael Dairyko, Samantha Tyner, Lara Pudwell, and Casey Wynn, Non-contiguous pattern avoidance in binary trees. Electron. J. Combin. 19 (2012), no. 3, Paper 22, 21 pp. MR2967227.
  • D. E. Davenport, L. W. Shapiro, and L. C. Woodson, The Double Riordan Group, The Electronic Journal of Combinatorics, 18(2) (2012), #P33.
  • E. Deutsch and L. Shapiro, A survey of the Fine numbers, Discrete Math., 241 (2001), 241-265.
  • T. Doslic, D. Svrtan, and D. Veljan, Enumerative aspects of secondary structures, Discr. Math., 285 (2004), 67-82.
  • Tomislav Doslic and Darko Veljan, Logarithmic behavior of some combinatorial sequences. Discrete Math. 308 (2008), no. 11, 2182-2212. MR2404544 (2009j:05019).
  • S. Dulucq and R. Simion, Combinatorial statistics on alternating permutations, J. Algebraic Combinatorics, 8, 1998, 169-191.
  • M. Dziemianczuk, "Enumerations of plane trees with multiple edges and Raney lattice paths." Discrete Mathematics 337 (2014): 9-24.
  • Wenjie Fang, A partial order on Motzkin paths, Discrete Math., 343 (2020), #111802.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (5.2.10).
  • N. S. S. Gu, N. Y. Li, and T. Mansour, 2-Binary trees: bijections and related issues, Discr. Math., 308 (2008), 1209-1221.
  • Kris Hatch, Presentation of the Motzkin Monoid, Senior Thesis, Univ. Cal. Santa Barbara, 2012; http://ccs.math.ucsb.edu/senior-thesis/Kris-Hatch.pdf.
  • V. Jelinek, Toufik Mansour, and M. Shattuck, On multiple pattern avoiding set partitions, Advances in Applied Mathematics Volume 50, Issue 2, February 2013, pp. 292-326.
  • Hana Kim and R. P. Stanley, A refined enumeration of hex trees and related polynomials, http://www-math.mit.edu/~rstan/papers/hextrees.pdf, Preprint 2015.
  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. See p. 399 Table A.7.
  • A. Kuznetsov et al., Trees associated with the Motzkin numbers, J. Combin. Theory, A 76 (1996), 145-147.
  • T. Lengyel, On divisibility properties of some differences of Motzkin numbers, Annales Mathematicae et Informaticae, 41 (2013) pp. 121-136.
  • W. A. Lorenz, Y. Ponty, and P. Clote, Asymptotics of RNA Shapes, Journal of Computational Biology. 2008, 15(1): 31-63. doi:10.1089/cmb.2006.0153.
  • Piera Manara and Claudio Perelli Cippo, The fine structure of 4321 avoiding involutions and 321 avoiding involutions, PU. M. A. Vol. 22 (2011), 227-238; http://www.mat.unisi.it/newsito/puma/public_html/22_2/manara_perelli-cippo.pdf.
  • Toufik Mansour, Restricted 1-3-2 permutations and generalized patterns, Annals of Combin., 6 (2002), 65-76.
  • Toufik Mansour, Matthias Schork, and Mark Shattuck, Catalan numbers and pattern restricted set partitions. Discrete Math. 312(2012), no. 20, 2979-2991. MR2956089.
  • T. S. Motzkin, Relations between hypersurface cross ratios and a combinatorial formula for partitions of a polygon, for permanent preponderance and for non-associative products, Bull. Amer. Math. Soc., 54 (1948), 352-360.
  • Jocelyn Quaintance and Harris Kwong, A combinatorial interpretation of the Catalan and Bell number difference tables, Integers, 13 (2013), #A29.
  • J. Riordan, Enumeration of plane trees by branches and endpoints, J. Combin. Theory, A 23 (1975), 214-222.
  • A. Sapounakis et al., Ordered trees and the inorder transversal, Disc. Math., 306 (2006), 1732-1741.
  • A. Sapounakis, I. Tasoulas, and P. Tsikouras, Counting strings in Dyck paths, Discrete Math., 307 (2007), 2909-2924.
  • E. Schroeder, Vier combinatorische Probleme, Z. f. Math. Phys., 15 (1870), 361-376.
  • L. W. Shapiro et al., The Riordan group, Discrete Applied Math., 34 (1991), 229-239.
  • Mark Shattuck, On the zeros of some polynomials with combinatorial coefficients, Annales Mathematicae et Informaticae, 42 (2013) pp. 93-101, http://ami.ektf.hu.
  • 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).
  • Michael Z. Spivey and Laura L. Steil, The k-Binomial Transforms and the Hankel Transform, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.37. Also Problem 7.16(b), y_3(n).
  • P. R. Stein and M. S. Waterman, On some new sequences generalizing the Catalan and Motzkin numbers, Discrete Math., 26 (1979), 261-272.
  • Z.-W. Sun, Conjectures involving arithmetical sequences, Number Theory: Arithmetic in Shangri-La (eds., S. Kanemitsu, H.-Z. Li and J.-Y. Liu), Proc. the 6th China-Japan Sem. Number Theory (Shanghai, August 15-17, 2011), World Sci., Singapore, 2013, pp. 244-258; http://math.nju.edu.cn/~zwsun/142p.pdf.
  • Chenying Wang, Piotr Miska, and István Mező, "The r-derangement numbers." Discrete Mathematics 340.7 (2017): 1681-1692.
  • Ying Wang and Guoce Xin, A Classification of Motzkin Numbers Modulo 8, Electron. J. Combin., 25(1) (2018), #P1.54.
  • Wen-Jin Woan, A combinatorial proof of a recursive relation of the Motzkin sequence by lattice paths. Fibonacci Quart. 40 (2002), no. 1, 3-8.
  • Wen-jin Woan, A Recursive Relation for Weighted Motzkin Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.1.6.
  • F. Yano and H. Yoshida, Some set partition statistics in non-crossing partitions and generating functions, Discr. Math., 307 (2007), 3147-3160.

Crossrefs

Bisections: A026945, A099250.
Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.
a(n) = A005043(n)+A005043(n+1).
A086246 is another version, although this is the main entry. Column k=3 of A182172.
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.
Cf. A004148, A004149, A023421, A023422, A023423, A290277 (inv. Euler Transf.).

Programs

  • Haskell
    a001006 n = a001006_list !! n
    a001006_list = zipWith (+) a005043_list $ tail a005043_list
    -- Reinhard Zumkeller, Jan 31 2012
    
  • Maple
    # Three different Maple scripts for this sequence:
    A001006 := proc(n)
        add(binomial(n,2*k)*A000108(k),k=0..floor(n/2)) ;
    end proc:
    A001006 := proc(n) option remember; local k; if n <= 1 then 1 else procname(n-1) + add(procname(k)*procname(n-k-2),k=0..n-2); end if; end proc:
    # n -> [a(0),a(1),..,a(n)]
    A001006_list := proc(n) local w, m, j, i; w := proc(i,j,n) option remember;
    if min(i,j,n) < 0 or max(i,j) > n then 0
    elif n = 0 then if i = 0 and j = 0 then 1 else 0 fi else
    w(i, j + 1, n - 1) + w(i - 1, j, n - 1) + w(i + 1, j - 1, n - 1) fi end:
    [seq( add( add( w(i, j, m), i = 0..m), j = 0..m), m = 0..n)] end:
    A001006_list(29); # Peter Luschny, May 21 2011
  • Mathematica
    a[0] = 1; a[n_Integer] := a[n] = a[n - 1] + Sum[a[k] * a[n - 2 - k], {k, 0, n - 2}]; Array[a, 30]
    (* Second program: *)
    CoefficientList[Series[(1 - x - (1 - 2x - 3x^2)^(1/2))/(2x^2), {x, 0, 29}], x] (* Jean-François Alcover, Nov 29 2011 *)
    Table[Hypergeometric2F1[(1-n)/2, -n/2, 2, 4], {n,0,29}] (* Peter Luschny, May 15 2016 *)
    Table[GegenbauerC[n,-n-1,-1/2]/(n+1),{n,0,100}] (* Emanuele Munarini, Oct 20 2016 *)
    MotzkinNumber = DifferenceRoot[Function[{y, n}, {(-3n-3)*y[n] + (-2n-5)*y[n+1] + (n+4)*y[n+2] == 0, y[0] == 1, y[1] == 1}]];
    Table[MotzkinNumber[n], {n, 0, 29}] (* Jean-François Alcover, Oct 27 2021 *)
  • Maxima
    a[0]:1$
    a[1]:1$
    a[n]:=((2*n+1)*a[n-1]+(3*n-3)*a[n-2])/(n+2)$
    makelist(a[n],n,0,12); /* Emanuele Munarini, Mar 02 2011 */
    
  • Maxima
    M(n) := coeff(expand((1+x+x^2)^(n+1)),x^n)/(n+1);
    makelist(M(n),n,0,60); /* Emanuele Munarini, Apr 04 2012 */
    
  • Maxima
    makelist(ultraspherical(n,-n-1,-1/2)/(n+1),n,0,12); /* Emanuele Munarini, Oct 20 2016 */
    
  • PARI
    {a(n) = polcoeff( ( 1 - x - sqrt((1 - x)^2 - 4 * x^2 + x^3 * O(x^n))) / (2 * x^2), n)}; /* Michael Somos, Sep 25 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n++; polcoeff( serreverse( x / (1 + x + x^2) + x * O(x^n)), n))}; /* Michael Somos, Sep 25 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp(x + x * O(x^n)) * besseli(1, 2 * x + x * O(x^n)), n))}; /* Michael Somos, Sep 25 2003 */
    
  • Python
    from gmpy2 import divexact
    A001006 = [1, 1]
    for n in range(2, 10**3):
        A001006.append(divexact(A001006[-1]*(2*n+1)+(3*n-3)*A001006[-2],n+2))
    # Chai Wah Wu, Sep 01 2014
    
  • Python
    def mot():
        a, b, n = 0, 1, 1
        while True:
            yield b//n
            n += 1
            a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1))
    A001006 = mot()
    print([next(A001006) for n in range(30)]) # Peter Luschny, May 16 2016
    
  • Python
    # A simple generator of Motzkin-paths (see the first comment of David Callan).
    C = str.count
    def aGen(n: int):
        a = [""]
        for w in a:
            if len(w) == n:
                if C(w, "U") == C(w, "D"): yield w
            else:
                for j in "UDF":
                    u = w + j
                    if C(u, "U") >= C(u, "D"): a += [u]
        return a
    for n in range(6):
        MP = [w for w in aGen(n)];
        print(len(MP), ":", MP)  # Peter Luschny, Dec 03 2024

Formula

G.f.: A(x) = ( 1 - x - (1-2*x-3*x^2)^(1/2) ) / (2*x^2).
G.f. A(x) satisfies A(x) = 1 + x*A(x) + x^2*A(x)^2.
G.f.: F(x)/x where F(x) is the reversion of x/(1+x+x^2). - Joerg Arndt, Oct 23 2012
a(n) = (-1/2) Sum_{i+j = n+2, i >= 0, j >= 0} (-3)^i*C(1/2, i)*C(1/2, j).
a(n) = (3/2)^(n+2) * Sum_{k >= 1} 3^(-k) * Catalan(k-1) * binomial(k, n+2-k). [Doslic et al.]
a(n) ~ 3^(n+1)*sqrt(3)*(1 + 1/(16*n))/((2*n+3)*sqrt((n+2)*Pi)). [Barcucci, Pinzani and Sprugnoli]
Limit_{n->infinity} a(n)/a(n-1) = 3. [Aigner]
a(n+2) - a(n+1) = a(0)*a(n) + a(1)*a(n-1) + ... + a(n)*a(0). [Bernhart]
a(n) = (1/(n+1)) * Sum_{i} (n+1)!/(i!*(i+1)!*(n-2*i)!). [Bernhart]
From Len Smiley: (Start)
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*A000108(k+1), inv. Binomial Transform of A000108.
a(n) = (1/(n+1))*Sum_{k=0..ceiling((n+1)/2)} binomial(n+1, k)*binomial(n+1-k, k-1);
D-finite with recurrence: (n+2)*a(n) = (2*n+1)*a(n-1) + (3*n-3)*a(n-2). (End)
a(n) = Sum_{k=0..n} C(n, 2k)*A000108(k). - Paul Barry, Jul 18 2003
E.g.f.: exp(x)*BesselI(1, 2*x)/x. - Vladeta Jovovic, Aug 20 2003
a(n) = A005043(n) + A005043(n+1).
The Hankel transform of this sequence gives A000012 = [1, 1, 1, 1, 1, 1, ...]. E.g., Det([1, 1, 2, 4; 1, 2, 4, 9; 2, 4, 9, 21; 4, 9, 21, 51]) = 1. - Philippe Deléham, Feb 23 2004
a(m+n) = Sum_{k>=0} A064189(m, k)*A064189(n, k). - Philippe Deléham, Mar 05 2004
a(n) = (1/(n+1))*Sum_{j=0..floor(n/3)} (-1)^j*binomial(n+1, j)*binomial(2*n-3*j, n). - Emeric Deutsch, Mar 13 2004
a(n) = A086615(n) - A086615(n-1) (n >= 1). - Emeric Deutsch, Jul 12 2004
G.f.: A(x)=(1-y+y^2)/(1-y)^2 where (1+x)*(y^2-y)+x=0; A(x)=4*(1+x)/(1+x+sqrt(1-2*x-3*x^2))^2; a(n)=(3/4)*(1/2)^n*Sum_(k=0..2*n, 3^(n-k)*C(k)*C(k+1, n+1-k) ) + 0^n/4 [after Doslic et al.]. - Paul Barry, Feb 22 2005
G.f.: c(x^2/(1-x)^2)/(1-x), c(x) the g.f. of A000108. - Paul Barry, May 31 2006
Asymptotic formula: a(n) ~ sqrt(3/4/Pi)*3^(n+1)/n^(3/2). - Benoit Cloitre, Jan 25 2007
a(n) = A007971(n+2)/2. - Zerinvary Lajos, Feb 28 2007
a(n) = (1/(2*Pi))*Integral_{x=-1..3} x^n*sqrt((3-x)*(1+x)) is the moment representation. - Paul Barry, Sep 10 2007
Given an integer t >= 1 and initial values u = [a_0, a_1, ..., a_{t-1}], we may define an infinite sequence Phi(u) by setting a_n = a_{n-1} + a_0*a_{n-1} + a_1*a_{n-2} + ... + a_{n-2}*a_1 for n >= t. For example, Phi([1]) is the Catalan numbers A000108. The present sequence is Phi([0,1,1]), see the 6th formula. - Gary W. Adamson, Oct 27 2008
G.f.: 1/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x-x^2/.... (continued fraction). - Paul Barry, Dec 06 2008
G.f.: 1/(1-(x+x^2)/(1-x^2/(1-(x+x^2)/(1-x^2/(1-(x+x^2)/(1-x^2/(1-.... (continued fraction). - Paul Barry, Feb 08 2009
a(n) = (-3)^(1/2)/(6*(n+2)) * (-1)^n*(3*hypergeom([1/2, n+1],[1],4/3) - hypergeom([1/2, n+2],[1],4/3)). - Mark van Hoeij, Nov 12 2009
G.f.: 1/(1-x/(1-x/(1-x^2/(1-x/(1-x/(1-x^2/(1-x/(1-x/(1-x^2/(1-... (continued fraction). - Paul Barry, Mar 02 2010
G.f.: 1/(1-x/(1-x/(1+x-x/(1-x/(1+x-x/(1-x/(1+x-x/(1-x/(1+x-x/(1-... (continued fraction). - Paul Barry, Jan 26 2011 [Adds apparently a third '1' in front. - R. J. Mathar, Jan 29 2011]
Let A(x) be the g.f., then B(x)=1+x*A(x) = 1 + 1*x + 1*x^2 + 2*x^3 + 4*x^4 + 9*x^5 + ... = 1/(1-z/(1-z/(1-z/(...)))) where z=x/(1+x) (continued fraction); more generally B(x)=C(x/(1+x)) where C(x) is the g.f. for the Catalan numbers (A000108). - Joerg Arndt, Mar 18 2011
a(n) = (2/Pi)*Integral_{x=-1..1} (1+2*x)^n*sqrt(1-x^2). - Peter Luschny, Sep 11 2011
G.f.: (1-x-sqrt(1-2*x-3*(x^2)))/(2*(x^2)) = 1/2/(x^2)-1/2/x-1/2/(x^2)*G(0); G(k) = 1+(4*k-1)*x*(2+3*x)/(4*k+2-x*(2+3*x)*(4*k+1)*(4*k+2) /(x*(2+3*x)*(4*k+1)+(4*k+4)/G(k+1))), if -1 < x < 1/3; (continued fraction). - Sergei N. Gladkovskii, Dec 01 2011
G.f.: (1-x-sqrt(1-2*x-3*(x^2)))/(2*(x^2)) = (-1 + 1/G(0))/(2*x); G(k) = 1-2*x/(1+x/(1+x/(1-2*x/(1-x/(2-x/G(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, Dec 11 2011
0 = a(n) * (9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1) * ( -3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2) * (a(n+2) + a(n+3)) unless n=-2. - Michael Somos, Mar 23 2012
a(n) = (-1)^n*hypergeometric([-n,3/2],[3],4). - Peter Luschny, Aug 15 2012
Representation in terms of special values of Jacobi polynomials P(n,alpha,beta,x), in Maple notation: a(n)= 2*(-1)^n*n!*JacobiP(n,2,-3/2-n,-7)/(n+2)!, n>=0. - Karol A. Penson, Jun 24 2013
G.f.: Q(0)/x - 1/x, where Q(k) = 1 + (4*k+1)*x/((1+x)*(k+1) - x*(1+x)*(2*k+2)*(4*k+3)/(x*(8*k+6)+(2*k+3)*(1+x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
Catalan(n+1) = Sum_{k=0..n} binomial(n,k)*a(k). E.g.: 42 = 1*1 + 4*1 + 6*2 + 4*4 + 1*9. - Doron Zeilberger, Mar 12 2015
G.f. A(x) with offset 1 satisfies: A(x)^2 = A( x^2/(1-2*x) ). - Paul D. Hanna, Nov 08 2015
a(n) = GegenbauerPoly(n,-n-1,-1/2)/(n+1). - Emanuele Munarini, Oct 20 2016
a(n) = a(n-1) + A002026(n-1). Number of Motzkin paths that start with an F step plus number of Motzkin paths that start with an U step. - R. J. Mathar, Jul 25 2017
G.f. A(x) satisfies A(x)*A(-x) = F(x^2), where F(x) is the g.f. of A168592. - Alexander Burstein, Oct 04 2017
G.f.: A(x) = exp(int((E(x)-1)/x dx)), where E(x) is the g.f. of A002426. Equivalently, E(x) = 1 + x*A'(x)/A(x). - Alexander Burstein, Oct 05 2017
G.f. A(x) satisfies: A(x) = Sum_{j>=0} x^j * Sum_{k=0..j} binomial(j,k)*x^k*A(x)^k. - Ilya Gutkovskiy, Apr 11 2019
From Gennady Eremin, May 08 2021: (Start)
G.f.: 2/(1 - x + sqrt(1-2*x-3*x^2)).
a(n) = A107587(n) + A343386(n) = 2*A107587(n) - A343773(n) = 2*A343386(n) + A343773(n). (End)
Revert transform of A049347 (after Michael Somos). - Gennady Eremin, Jun 11 2021
Sum_{n>=0} 1/a(n) = 2.941237337631025604300320152921013604885956025483079699366681494505960039781389... - Vaclav Kotesovec, Jun 17 2021
Let a(-1) = (1 - sqrt(-3))/2 and a(n) = a(-3-n)*(-3)^(n+3/2) for all n in Z. Then a(n) satisfies my previous formula relation from Mar 23 2012 now for all n in Z. - Michael Somos, Apr 17 2022
Let b(n) = 1 for n <= 1, otherwise b(n) = Sum_{k=2..n} b(k-1) * b(n-k), then a(n) = b(n+1) (conjecture). - Joerg Arndt, Jan 16 2023
From Peter Bala, Feb 03 2024: (Start)
G.f.: A(x) = 1/(1 + x)*c(x/(1 + x))^2 = 1 + x/(1 + x)*c(x/(1 + x))^3, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108.
A(x) = 1/(1 - 3*x)*c(-x/(1 -3*x))^2.
a(n+1) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n, k)*A000245(k+1).
a(n) = 3^n * Sum_{k = 0..n} (-3)^(-k)*binomial(n, k)*Catalan(k+1).
a(n) = 3^n * hypergeom([3/2, -n], [3], 4/3). (End)
G.f. A(x) satisfies A(x) = exp( x*A(x) + Integral x*A(x)/(1 - x^2*A(x)) dx ). - Paul D. Hanna, Mar 04 2024
a(n) = hypergeom([-n/2,1/2-n/2],[2],4). - Karol A. Penson, May 18 2025

A002426 Central trinomial coefficients: largest coefficient of (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 141, 393, 1107, 3139, 8953, 25653, 73789, 212941, 616227, 1787607, 5196627, 15134931, 44152809, 128996853, 377379369, 1105350729, 3241135527, 9513228123, 27948336381, 82176836301, 241813226151, 712070156203, 2098240353907, 6186675630819
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n + 1 edges, having root of odd degree and nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 02 2002
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), running from (0,0) to (n,0) (i.e., grand Motzkin paths of length n). For example, a(3) = 7 because we have HHH, HUD, HDU, UDH, DUH, UHD and DHU. - Emeric Deutsch, May 31 2003
Number of lattice paths from (0,0) to (n,n) using steps (2,0), (0,2), (1,1). It appears that 1/sqrt((1 - x)^2 - 4*x^s) is the g.f. for lattice paths from (0,0) to (n,n) using steps (s,0), (0,s), (1,1). - Joerg Arndt, Jul 01 2011
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Binomial transform of A000984, with interpolated zeros. - Paul Barry, Jul 01 2003
Number of leaves in all 0-1-2 trees with n edges, n > 0. (A 0-1-2 tree is an ordered tree in which every vertex has at most two children.) - Emeric Deutsch, Nov 30 2003
a(n) is the number of UDU-free paths of n + 1 upsteps (U) and n downsteps (D) that start U. For example, a(2) = 3 counts UUUDD, UUDDU, UDDUU. - David Callan, Aug 18 2004
Diagonal sums of triangle A063007. - Paul Barry, Aug 31 2004
Number of ordered ballots from n voters that result in an equal number of votes for candidates A and B in a three candidate election. Ties are counted even when candidates A and B lose the election. For example, a(3) = 7 because ballots of the form (voter-1 choice, voter-2 choice, voter-3 choice) that result in equal votes for candidates A and B are the following: (A,B,C), (A,C,B), (B,A,C), (B,C,A), (C,A,B), (C,B,A) and (C,C,C). - Dennis P. Walsh, Oct 08 2004
a(n) is the number of weakly increasing sequences (a_1,a_2,...,a_n) with each a_i in [n]={1,2,...,n} and no element of [n] occurring more than twice. For n = 3, the sequences are 112, 113, 122, 123, 133, 223, 233. - David Callan, Oct 24 2004
Note that n divides a(n+1) - a(n). In fact, (a(n+1) - a(n))/n = A007971(n+1). - T. D. Noe, Mar 16 2005
Row sums of triangle A105868. - Paul Barry, Apr 23 2005
Number of paths of length n with steps U = (1,1), D = (1,-1) and H = (1,0), starting at (0,0), staying weakly above the x-axis (i.e., left factors of Motzkin paths) and having no H steps on the x-axis. Example: a(3) = 7 because we have UDU, UHD, UHH, UHU, UUD, UUH and UUU. - Emeric Deutsch, Oct 07 2007
Equals right border of triangle A152227; starting with offset 1, the row sums of triangle A152227. - Gary W. Adamson, Nov 29 2008
Starting with offset 1 = iterates of M * [1,1,1,...] where M = a tridiagonal matrix with [0,1,1,1,...] in the main diagonal and [1,1,1,...] in the super and subdiagonals. - Gary W. Adamson, Jan 07 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
a(n) is prime for n = 2, 3 and 4, with no others for n <= 10^5 (E. W. Weisstein, Mar 14 2005). It has apparently not been proved that no [other] prime central trinomials exist. - Jonathan Vos Post, Mar 19 2010
a(n) is not divisible by 3 for n whose base-3 representation contains no 2 (A005836).
a(n) = number of (n-1)-lettered words in the alphabet {1,2,3} with as many occurrences of the substring (consecutive subword) [1,2] as those of [2,1]. See the papers by Ekhad-Zeilberger and Zeilberger. - N. J. A. Sloane, Jul 05 2012
a(n) = coefficient of x^n in (1 + x + x^2)^n. - L. Edson Jeffery, Mar 23 2013
a(n) is the number of ordered pairs (A,B) of subsets of {1,2,...,n} such that (i.) A and B are disjoint and (ii.) A and B contain the same number of elements. For example, a(2) = 3 because we have: ({},{}) ; ({1},{2}) ; ({2},{1}). - Geoffrey Critzer, Sep 04 2013
Also central terms of A082601. - Reinhard Zumkeller, Apr 13 2014
a(n) is the number of n-tuples with entries 0, 1, or 2 and with the sum of entries equal to n. For n=3, the seven 3-tuples are (1,1,1), (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), and (2,1,0). - Dennis P. Walsh, May 08 2015
The series 2*a(n) + 3*a(n+1) + a(n+2) = 2*A245455(n+3) has Hankel transform of L(2n+1)*2^n, offset n = 1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
The series (2*a(n) + 3*a(n+1) + a(n+2))/2 = A245455(n+3) has Hankel transform of L(2n+1), offset n=1, L being a Lucas number, see A002878 (empirical observation). - Tony Foster III, Sep 05 2016
Conjecture: An integer n > 3 is prime if and only if a(n) == 1 (mod n^2). We have verified this for n up to 8*10^5, and proved that a(p) == 1 (mod p^2) for any prime p > 3 (cf. A277640). - Zhi-Wei Sun, Nov 30 2016
This is the analog for Coxeter type B of Motzkin numbers (A001006) for Coxeter type A. - F. Chapoton, Jul 19 2017
a(n) is also the number of solutions to the equation x(1) + x(2) + ... + x(n) = 0, where x(1), ..., x(n) are in the set {-1,0,1}. Indeed, the terms in (1 + x + x^2)^n that produce x^n are of the form x^i(1)*x^i(2)*...*x^i(n) where i(1), i(2), ..., i(n) are in {0,1,2} and i(1) + i(2) + ... + i(n) = n. By setting j(t) = i(t) - 1 we obtain that j(1), ..., j(n) satisfy j(1) + ... + j(n) =0 and j(t) in {-1,0,1} for all t = 1..n. - Lucien Haddad, Mar 10 2018
If n is a prime greater than 3 then a(n)-1 is divisible by n^2. - Ira M. Gessel, Aug 08 2021
Let f(m) = ceiling((q+log(q))/log(9)), where q = -log(log(27)/(2*m^2*Pi)) then f(a(n)) = n, for n > 0. - Miko Labalan, Oct 07 2024
Diagonal of the rational function 1 / (1 - x^2 - y^2 - x*y). - Ilya Gutkovskiy, Apr 23 2025

Examples

			For n = 2, (x^2 + x + 1)^2 = x^4 + 2*x^3 + 3*x^2 + 2*x + 1, so a(2) = 3. - _Michael B. Porter_, Sep 06 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 78 and 163, #19.
  • L. Euler, Exemplum Memorabile Inductionis Fallacis, Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 15, p. 59.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 575.
  • P. Henrici, Applied and Computational Complex Analysis. Wiley, NY, 3 vols., 1974-1986. (Vol. 1, p. 42.)
  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 579.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 74.
  • 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 Example 6.3.8.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 22.
  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346. See p. 341.

Crossrefs

INVERT transform is A007971. Partial sums are A097893. Squares are A168597.
Main column of A027907. Column k=2 of A305161. Column k=0 of A328347. Column 1 of A201552(?).
Cf. A001006, A002878, A005043, A005717, A082758 (bisection), A273055 (bisection), A102445, A113302, A113303, A113304, A113305 (divisibility of central trinomial coefficients), A152227, A277640.

Programs

  • Haskell
    a002426 n = a027907 n n  -- Reinhard Zumkeller, Jan 22 2013
    
  • Magma
    P:=PolynomialRing(Integers()); [Max(Coefficients((1+x+x^2)^n)): n in [0..26]]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    A002426 := proc(n) local k;
        sum(binomial(n, k)*binomial(n-k, k), k=0..floor(n/2));
    end proc: # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    # Alternatively:
    a := n -> simplify(GegenbauerC(n,-n,-1/2)):
    seq(a(n), n=0..29); # Peter Luschny, May 07 2016
  • Mathematica
    Table[ CoefficientList[ Series[(1 + x + x^2)^n, {x, 0, n}], x][[ -1]], {n, 0, 27}] (* Robert G. Wilson v *)
    a=b=1; Join[{a,b}, Table[c=((2n-1)b + 3(n-1)a)/n; a=b; b=c; c, {n,2,100}]]; Table[Sqrt[-3]^n LegendreP[n,1/Sqrt[-3]],{n,0,26}] (* Wouter Meeussen, Feb 16 2013 *)
    a[ n_] := If[ n < 0, 0, 3^n Hypergeometric2F1[ 1/2, -n, 1, 4/3]]; (* Michael Somos, Jul 08 2014 *)
    Table[4^n *JacobiP[n,-n-1/2,-n-1/2,-1/2], {n,0,29}] (* Peter Luschny, May 13 2016 *)
    a[n_] := a[n] = Sum[n!/((n - 2*i)!*(i!)^2), {i, 0, n/2}]; Table[a[n], {n, 0, 29}] (* Shara Lalo and Zagros Lalo, Oct 03 2018 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    makelist(trinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    makelist(ultraspherical(n,-n,-1/2),n,0,12); /* Emanuele Munarini, Dec 20 2016 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, n))};
    
  • PARI
    /* as lattice paths: same as in A092566 but use */
    steps=[[2, 0], [0, 2], [1, 1]];
    /* Joerg Arndt, Jul 01 2011 */
    
  • PARI
    a(n)=polcoeff(sum(m=0, n, (2*m)!/m!^2 * x^(2*m) / (1-x+x*O(x^n))^(2*m+1)), n) \\ Paul D. Hanna, Sep 21 2013
    
  • Python
    from math import comb
    def A002426(n): return sum(comb(n,k)*comb(k,n-k) for k in range(n+1)) # Chai Wah Wu, Nov 15 2022
  • Sage
    A002426 = lambda n: hypergeometric([-n/2, (1-n)/2], [1], 4)
    [simplify(A002426(n)) for n in (0..29)]
    # Peter Luschny, Sep 17 2014
    
  • Sage
    def A():
        a, b, n = 1, 1, 1
        yield a
        while True:
            yield b
            n += 1
            a, b = b, ((3 * (n - 1)) * a + (2 * n - 1) * b) // n
    A002426 = A()
    print([next(A002426) for  in range(30)])  # _Peter Luschny, May 16 2016
    

Formula

G.f.: 1/sqrt(1 - 2*x - 3*x^2).
E.g.f.: exp(x)*I_0(2x), where I_0 is a Bessel function. - Michael Somos, Sep 09 2002
a(n) = 2*A027914(n) - 3^n. - Benoit Cloitre, Sep 28 2002
a(n) is asymptotic to d*3^n/sqrt(n) with d around 0.5.. - Benoit Cloitre, Nov 02 2002, d = sqrt(3/Pi)/2 = 0.4886025119... - Alec Mihailovs (alec(AT)mihailovs.com), Feb 24 2005
D-finite with recurrence: a(n) = ((2*n - 1)*a(n-1) + 3*(n - 1)*a(n-2))/n; a(0) = a(1) = 1; see paper by Barcucci, Pinzani and Sprugnoli.
Inverse binomial transform of A000984. - Vladeta Jovovic, Apr 28 2003
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, k/2)*(1 + (-1)^k)/2; a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*binomial(2*k, k). - Paul Barry, Jul 01 2003
a(n) = Sum_{k>=0} binomial(n, 2*k)*binomial(2*k, k). - Philippe Deléham, Dec 31 2003
a(n) = Sum_{i+j=n, 0<=j<=i<=n} binomial(n, i)*binomial(i, j). - Benoit Cloitre, Jun 06 2004
a(n) = 3*a(n-1) - 2*A005043(n). - Joost Vermeij (joost_vermeij(AT)hotmail.com), Feb 10 2005
a(n) = Sum_{k=0..n} binomial(n, k)*binomial(k, n-k). - Paul Barry, Apr 23 2005
a(n) = (-1/4)^n*Sum_{k=0..n} binomial(2*k, k)*binomial(2*n-2*k, n-k)*(-3)^k. - Philippe Deléham, Aug 17 2005
a(n) = A111808(n,n). - Reinhard Zumkeller, Aug 17 2005
a(n) = Sum_{k=0..n} (((1 + (-1)^k)/2)*Sum_{i=0..floor((n-k)/2)} binomial(n, i)*binomial(n-i, i+k)*((k + 1)/(i + k + 1))). - Paul Barry, Sep 23 2005
a(n) = 3^n*Sum_{j=0..n} (-1/3)^j*C(n, j)*C(2*j, j); follows from (a) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/2)^n*Sum_{j=0..n} 3^j*binomial(n, j)*binomial(2*n-2*j, n) = (3/2)^n*Sum_{j=0..n} (1/3)^j*binomial(n, j)*binomial(2*j, n); follows from (c) in A027907. - Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006
a(n) = (1/Pi)*Integral_{x=-1..3} x^n/sqrt((3 - x)*(1 + x)) is moment representation. - Paul Barry, Sep 10 2007
G.f.: 1/(1 - x - 2x^2/(1 - x - x^2/(1 - x - x^2/(1 - ... (continued fraction). - Paul Barry, Aug 05 2009
a(n) = sqrt(-1/3)*(-1)^n*hypergeometric([1/2, n+1], [1], 4/3). - Mark van Hoeij, Nov 12 2009
a(n) = (1/Pi)*Integral_{x=-1..1} (1 + 2*x)^n/sqrt(1 - x^2) = (1/Pi)*Integral_{t=0..Pi} (1 + 2*cos(t))^n. - Eli Wolfhagen, Feb 01 2011
In general, g.f.: 1/sqrt(1 - 2*a*x + x^2*(a^2 - 4*b)) = 1/(1 - a*x)*(1 - 2*x^2*b/(G(0)*(a*x - 1) + 2*x^2*b)); G(k) = 1 - a*x - x^2*b/G(k+1); for g.f.: 1/sqrt(1 - 2*x - 3*x^2) = 1/(1 - x)*(1 - 2*x^2/(G(0)*(x - 1) + 2*x^2)); G(k) = 1 - x - x^2/G(k+1), a = 1, b = 1; (continued fraction). - Sergei N. Gladkovskii, Dec 08 2011
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*binomial(2*n-3*k-1, n-3*k)*binomial(n, k). - Gopinath A. R., Feb 10 2012
G.f.: A(x) = x*B'(x)/B(x) where B(x) satisfies B(x) = x*(1 + B(x) + B(x)^2). - Vladimir Kruchinin, Feb 03 2013 (B(x) = x*A001006(x) - Michael Somos, Jul 08 2014)
G.f.: G(0), where G(k) = 1 + x*(2 + 3*x)*(4*k + 1)/(4*k + 2 - x*(2 + 3*x)*(4*k + 2)*(4*k + 3)/(x*(2 + 3*x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 29 2013
E.g.f.: exp(x) * Sum_{k>=0} (x^k/k!)^2. - Geoffrey Critzer, Sep 04 2013
G.f.: Sum_{n>=0} (2*n)!/n!^2*(x^(2*n)/(1 - x)^(2*n+1)). - Paul D. Hanna, Sep 21 2013
0 = a(n)*(9*a(n+1) + 9*a(n+2) - 6*a(n+3)) + a(n+1)*(3*a(n+1) + 4*a(n+2) - 3*a(n+3)) + a(n+2)*(-a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = hypergeometric([-n/2, (1-n)/2], [1], 4). - Peter Luschny, Sep 17 2014
a(n) = A132885(n,0), that is, a(n) = A132885(A002620(n+1)). - Altug Alkan, Nov 29 2015
a(n) = GegenbauerC(n,-n,-1/2). - Peter Luschny, May 07 2016
a(n) = 4^n*JacobiP[n,-n-1/2,-n-1/2,-1/2]. - Peter Luschny, May 13 2016
From Alexander Burstein, Oct 03 2017: (Start)
G.f.: A(4*x) = B(-x)*B(3*x), where B(x) is the g.f. of A000984.
G.f.: A(2*x)*A(-2*x) = B(x^2)*B(9*x^2).
G.f.: A(x) = 1 + x*M'(x)/M(x), where M(x) is the g.f. of A001006. (End)
a(n) = Sum_{i=0..n/2} n!/((n - 2*i)!*(i!)^2). [Cf. Lalo and Lalo link. It is Luschny's terminating hypergeometric sum.] - Shara Lalo and Zagros Lalo, Oct 03 2018
From Peter Bala, Feb 07 2022: (Start)
a(n)^2 = Sum_{k = 0..n} (-3)^(n-k)*binomial(2*k,k)^2*binomial(n+k,n-k) and has g.f. Sum_{n >= 0} binomial(2*n,n)^2*x^n/(1 + 3*x)^(2*n+1). Compare with the g.f. for a(n) given above by Hanna.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all prime p and positive integers n and k.
Conjecture: The stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all prime p >= 5 and positive integers n and k. (End)
a(n) = A005043(n) + A005717(n) for n >= 1. - Amiram Eldar, May 17 2024
For even n, a(n) = (n-1)!!* 2^{n/2}/ (n/2)!* 2F1(-n/2,-n/2;1/2;1/4). For odd n, a(n) = n!! *2^(n/2-1/2) / (n/2-1/2)! * 2F1(1/2-n/2,1/2-n/2;3/2;1/4). - R. J. Mathar, Mar 19 2025

A321620 The Riordan square of the Riordan numbers, triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 5, 3, 1, 1, 6, 13, 10, 7, 4, 1, 1, 15, 29, 26, 16, 9, 5, 1, 1, 36, 73, 61, 42, 23, 11, 6, 1, 1, 91, 181, 157, 103, 61, 31, 13, 7, 1, 1, 232, 465, 398, 271, 156, 83, 40, 15, 8, 1, 1, 603, 1205, 1040, 702, 419, 221, 108, 50, 17, 9, 1, 1
Offset: 0

Views

Author

Peter Luschny, Nov 15 2018

Keywords

Comments

If gf is a generating function of the sequence a then by the 'Riordan square of a' we understand the integer triangle given by the Riordan array (gf, gf). This mapping can be seen as an operator RS: Z[[x]] -> Mat[Z].
For instance A039599 is the Riordan square of the Catalan numbers, A172094 is the Riordan square of the little Schröder numbers and A063967 is the Riordan square of the Fibonacci numbers. The Riordan square of the simplest sequence of positive numbers (A000012) is the Pascal triangle.
The generating functions used are listed in the table below. They may differ slightly from those defined elsewhere in order to ensure that RS(a) is invertible (as a matrix). We understand this as a kind of normalization.
---------------------------------------------------------------------------
Sequence a | RS(a) | gf(a)
---------------------------------------------------------------------------
Catalan | A039599 | (1 - sqrt(1 - 4*x))/(2*x).
1, Riordan | A321620 | 1 + 2*x/(1 + x + sqrt(1 - 2*x - 3*x^2)).
Motzkin | A321621 | (1 - x - sqrt(1 - 2*x - 3*x^2))/(2*x^2).
Fine | A321622 | 1 + (1 - sqrt(1 - 4*x))/(3 - sqrt(1 - 4*x)).
large Schröder | A321623 | (1 - x - sqrt(1 - 6*x + x^2))/(2*x).
little Schröder | A172094 | (1 + x - sqrt(1 - 6*x + x^2))/(4*x).
Lucas | A321624 | 1 + x*(1 + 2*x)/(1 - x - x^2).
swinging factorial | A321625 | (1 + x/(1 - 4*x^2))/sqrt(1 - 4*x^2).
ternary trees ||A109956|| u = sqrt(x*3/4); sin(arcsin(3*u)/3)/u.
central trinomial | A116392 | 1/sqrt(1 - 2*x - 3*x^2)
Bell | A154380 | Sum_{k>=0} x^k/Product_{j=1..k}(1 - j*x).
(2*n-1)!! | A321627 | 1/(1-x/(1-2*x/(1-3*x/(1-4*x/(1-5*x/...
powers of 2 | A038208 | 1/(1 - 2*x).
the all 1's seq. | A007318 | 1/(1 - x).
Fibonacci | A063967 | 1/(1 - x - x^2).
tribonacci | A187889 | 1/(1 - x - x^2 - x^3).
tetranacci | A353593 | 1/(1 - x - x^2 - x^3 - x^4).
Jacobsthal | A322942 | (2*x^2-1)/((x + 1)*(2*x - 1))

Examples

			The triangle starts:
   [ 0]   1
   [ 1]   1    1
   [ 2]   0    1    1
   [ 3]   1    1    1   1
   [ 4]   1    3    2   1   1
   [ 5]   3    5    5   3   1   1
   [ 6]   6   13   10   7   4   1   1
   [ 7]  15   29   26  16   9   5   1  1
   [ 8]  36   73   61  42  23  11   6  1  1
   [ 9]  91  181  157 103  61  31  13  7  1 1
   [10] 232  465  398 271 156  83  40 15  8 1 1
		

Crossrefs

Programs

  • Maple
    RiordanSquare := proc(d, n, exp:=false) local td, M, k, m, u, j;
        series(d, x, n+1); td := [seq(coeff(%, x, j), j = 0..n)];
        M := Matrix(n); for k from 1 to n do M[k, 1] := td[k] od;
        for k from 1 to n-1 do for m from k to n-1 do
           M[m+1, k+1] := add(M[j, k]*td[m-j+2], j = k..m) od od;
        if exp then u := 1;
           for k from 1 to n-1 do u := u * k;
              for m from 1 to k do j := `if`(m = 1, u, j/(m-1));
                 M[k+1, m] := M[k+1, m] * j od od fi;
    M end:
    RiordanSquare(1 + 2*x/(1 + x + sqrt(1 - 2*x - 3*x^2)), 8);
  • Mathematica
    RiordanSquare[gf_, len_] := Module[{T}, T[n_, k_] := T[n, k] = If[k == 0, SeriesCoefficient[gf, {x, 0, n}], Sum[T[j, k-1] T[n-j, 0], {j, k-1, n-1}]]; Table[T[n, k], {n, 0, len-1}, {k, 0, n}]];
    M = RiordanSquare[1 + 2x/(1 + x + Sqrt[1 - 2x - 3x^2]), 12];
    M // Flatten (* Jean-François Alcover, Nov 24 2018 *)
  • Sage
    # uses[riordan_array from A256893]
    def riordan_square(gf, len, exp=false):
        return riordan_array(gf, gf, len, exp)
    riordan_square(1 + 2*x/(1 + x + sqrt(1 - 2*x - 3*x^2)), 10)
    # Alternatively, given a list S:
    def riordan_square_array(S):
        N = len(S)
        M = matrix(ZZ, N, N)
        for n in (0..N-1): M[n, 0] = S[n]
        for k in (1..N-1):
            for m in (k..N-1):
                M[m, k] = sum(M[j, k-1]*S[m-j] for j in (k-1..m-1))
        return M
    riordan_square_array([1, 1, 0, 1, 1, 3, 6, 15, 36]) # Peter Luschny, Apr 03 2020

Formula

Given a generating function g and an positive integer N compute the Taylor expansion at the origin t(k) = [x^k] g(x) for k in [0...N-1] and set T(n, 0) = t(n) for n in [0...N-1]. Then compute T(m, k) = Sum_{j in [k-1...m-1]} T(j, k - 1) t(m - j) for k in [1...N-1] and for m in [k...N-1]. The resulting (0, 0)-based lower triangular array is the Riordan square generated by g.

A086246 Expansion of (1 + x - sqrt(1 - 2*x - 3*x^2)) / 2 in powers of x.

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2188, 5798, 15511, 41835, 113634, 310572, 853467, 2356779, 6536382, 18199284, 50852019, 142547559, 400763223, 1129760415, 3192727797, 9043402501, 25669818476, 73007772802, 208023278209, 593742784829, 1697385471211, 4859761676391, 13933569346707
Offset: 0

Views

Author

Michael Somos, Jul 13 2003

Keywords

Comments

A variant of the Motzkin numbers: see A001006 for the main entry.
Equals row sums of triangle A144218 starting with "1". - Gary W. Adamson, Sep 14 2008
Starting (1, 1, 1, ...) = inverse binomial transform of A014137: (1, 2, 4, 9, 23, 65, ...). - Gary W. Adamson, Apr 02 2009
With a(0) = 1 this is the Riordan transform with the Riordan matrix R(n, m) = (-1)^(n-m)*A097805(n, m) (the inverse of A097805) of the Catalan sequence A000108. See a Feb 17 2017 comment on A097805 for Riordan transforms, and the g.f. given below in terms of the Catalan g.f. - Wolfdieter Lang, Feb 17 2017

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + 4*x^5 + 9*x^6 + 21*x^7 + 51*x^8 + 127*x^9 + ...
		

Crossrefs

a(n+2) = A001006(n).

Programs

  • Maple
    with(PolynomialTools): CoefficientList(convert(taylor((1 + x - sqrt(1 - 2*x - 3*x^2))/2, x = 0, 33), polynom), x); # Taras Goy, Aug 07 2017
  • Mathematica
    a[ n_] := SeriesCoefficient[ (1 + x - Sqrt[1 - 2 x - 3 x^2])/2, {x, 0, n}] (* Michael Somos, Jan 25 2014 *)
    a = DifferenceRoot[Function[{y, n}, {(3n-3)*y[n] + (2n+1)*y[n+1] + (-n-2)*y[n+2] == 0, y[0] == 0, y[1] == 1, y[2] == 1}]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 28 2021 *)
  • Maxima
    a(n):=sum((binomial(2*k-2,k-1)*(-1)^(n-k)*binomial(n-2,n-k))/k,k,1,n); /* Vladimir Kruchinin, May 27 2014 */
  • PARI
    {a(n) = polcoeff( (1 + x - sqrt(1 - 2*x - 3*x^2 + x * O(x^n))) / 2, n)}
    
  • PARI
    x='x+O('x^99); concat(0, Vec((1+x-(1-2*x-3*x^2)^(1/2))/2)) \\ Altug Alkan, May 01 2018
    

Formula

Series reversion of g.f. A(x) is -A(-x).
a(n) + a(n-1) = a(0)*a(n) + a(1)*a(n-1) + ... + a(n)*a(0), n > 2.
G.f. A(x) satisfies 0 = f(x, A(x)) where f(x, y) = x - y - x*y + x^2 + y^2.
G.f. A(x) satisfies 0 = f(x, A(x)) where f(x, y) = (y^2 - y^3) - (x^2 + x^3).
G.f.: (1 + x - sqrt(1 - 2*x - 3*x^2)) / 2.
G.f. A(x) satisfies A(x) = x + C(x*A(x)) where C(x) is g.f. for Catalan numbers A000108 (offset 1).
G.f.: (1+x-sqrt(1-2*x-3*x^2))/2 = (x+x/G(0))/2 where G(k) = 1 - 2*x/(1+x/(1+x/(1-2*x/(1-x/(2-x/G(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, Dec 11 2011
G.f.: x + x^2*Q(0), where Q(k) = 1 + x/(1 - x - x/(x + 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 25 2013
G.f.: x*Q(0), where Q(k) = 1 + (4*k+1)*x/((1+x)*(k+1) - x*(1+x)*(2*k+2)*(4*k+3)/(x*(8*k+6)+(2*k+3)*(1+x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
0 = a(n) * (9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1) * (-3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2) * (a(n+2) + a(n+3)) if n>0. - Michael Somos, Jan 25 2014
a(n) ~ 3^(n-1/2)/(2*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 20 2014
a(n) = Sum_{k=1..n} binomial(2*k-2, k-1)*(-1)^(n-k)*binomial(n-2, n-k)/k. - Vladimir Kruchinin, May 27 2014
G.f. if a(0) = 1: C(x/(1+x)) with C the g.f. of A000108 (Catalan). See an above implicit formula. - Wolfdieter Lang, Feb 17 2017
D-finite with recurrence: (3*n-3)*a(n)+(1+2*n)*a(n+1)+(-n-2)*a(n+2)=0 for n >= 1. - Robert Israel, May 01 2018
a(n) = A007971(n)/2, n>=2. - R. J. Mathar, Jan 20 2020

A128018 Expansion of (1-4*x)/(1-2*x+4*x^2).

Original entry on oeis.org

1, -2, -8, -8, 16, 64, 64, -128, -512, -512, 1024, 4096, 4096, -8192, -32768, -32768, 65536, 262144, 262144, -524288, -2097152, -2097152, 4194304, 16777216, 16777216, -33554432, -134217728, -134217728, 268435456, 1073741824, 1073741824, -2147483648, -8589934592
Offset: 0

Views

Author

Paul Barry, Feb 11 2007

Keywords

Comments

Hankel transform of A128014(n+1). Binomial transform of A128019.
Hankel transform of A002426(n+1). - Paul Barry, Mar 15 2008
Hankel transform of A007971(n+1). - Paul Barry, Sep 30 2009
Hankel transform of A103970 is a(n)/4^C(n+1,2). - Paul Barry, Nov 20 2009
The real part of Q^(n+1), where Q is the quaternion 1+i+j+k. - Stanislav Sykora, Jun 11 2012.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - 4*x)/(1 - 2*x + 4*x^2), {x,0,50}], x] (* or *) LinearRecurrence[{2,-4},{1,-2},50] (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    x='x+O('x^50); Vec((1-4*x)/(1-2*x+4*x^2)) \\ G. C. Greubel, Feb 28 2017

Formula

a(n) = A138340(n)/2^n. - Philippe Deléham, Nov 14 2008
a(n) = 2^(n+1)*cos(Pi*(n+1)/3). - Richard Choulet, Nov 19 2008
From Paul Barry, Oct 21 2009: (Start)
a(n) = Sum_{k=0..floor((n+1)/2)} C(n+1,2*k)*(-3)^k.
a(n) = ((1+i*sqrt(3))^(n+1) + (1-i*sqrt(3))^(n+1))/2, i=sqrt(-1). (End)
G.f.: G(0)/(2*x)-1/x, where G(k)= 1 + 1/(1 - x*(3*k+1)/(x*(3*k+4) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 27 2013
a(n) = 2^n*A057079(n+2). - R. J. Mathar, Mar 04 2018
Sum_{n>=0} 1/a(n) = 1/3. - Amiram Eldar, Feb 14 2023

A025178 First differences of the central trinomial coefficients A002426.

Original entry on oeis.org

0, 2, 4, 12, 32, 90, 252, 714, 2032, 5814, 16700, 48136, 139152, 403286, 1171380, 3409020, 9938304, 29017878, 84844044, 248382516, 727971360, 2135784798, 6272092596, 18435108258, 54228499920, 159636389850, 470256930052, 1386170197704
Offset: 1

Views

Author

Keywords

Comments

Previous name was: "a(n) = number of (s(0), s(1), ..., s(n)) such that s(i) is an integer, s(0) = 0 = s(n), |s(1)| = 1, |s(i) - s(i-1)| <= 1 for i >= 2. Also a(n) = T(n,n), where T is the array defined in A025177."
Note that n-1 divides a(n) for n>=2. - T. D. Noe, Mar 16 2005

Crossrefs

Programs

  • Maple
    a := n -> 2*(n-1)*hypergeom([1-n/2, 3/2-n/2], [2], 4):
    seq(simplify(a(n)), n=1..28); # Peter Luschny, Oct 29 2015
  • Mathematica
    Rest[Differences[CoefficientList[Series[x/Sqrt[1-2x-3x^2],{x,0,30}],x]]] (* Harvey P. Dale, Aug 22 2011 *)
    Differences[Table[Hypergeometric2F1[(1-n)/2,1-n/2,1,4],{n,1,29}]] (* Peter Luschny, Nov 03 2015 *)
  • PARI
    a(n) = sum(k=1, n\2, binomial(n-1,2*k-1)*binomial(2*k,k)); \\ Altug Alkan, Oct 29 2015
    
  • Sage
    def a():
        b, c, n = 0, 2, 2
        yield b
        while True:
            yield c
            b, c = c, ((2*n-1)*c+3*(n-1)*b)*n//((n+1)*(n-1))
            n += 1
    A025178 = a()
    print([next(A025178) for  in (1..20)]) # _Peter Luschny, Nov 04 2015

Formula

a(n) = T(n,n) for n>=1, where T is the array defined in A025177.
a(n) = A002426(n+1) - A002426(n). - Benoit Cloitre, Nov 02 2002
a(n) is asymptotic to c*3^n/sqrt(n) with c around 1.02... - Benoit Cloitre, Nov 02 2002
a(n) = 2*(n-1)*A001006(n-2). - M. F. Hasler, Oct 24 2011
a(n) = 2*A005717(n-1). - R. J. Mathar, Jul 09 2012
E.g.f. Integral(Integral(2*exp(x)*((1-1/x)*BesselI(1,2*x) + 2*BesselI(0,2*x)))). - Sergei N. Gladkovskii, Aug 16 2012
G.f.: -1/x + (1/x-1)/sqrt(1-2*x-3*x^2). - Sergei N. Gladkovskii, Aug 16 2012
D-finite with recurrence: a(n) = ((2+n)*a(n-2)+3*(3-n)*a(n-3)+3*(n-1)*a(n-1))/n, a(0)=1, a(1)=0, a(2)=2. - Sergei N. Gladkovskii, Aug 16 2012 [adapted to new offset by Peter Luschny, Nov 04 2015]
G.f.: (1-x)/x^2*G(0) - 1/x^2 , where G(k)= 1 + x*(2+3*x)*(4*k+1)/( 4*k+2 - x*(2+3*x)*(4*k+2)*(4*k+3)/(x*(2+3*x)*(4*k+3) + 4*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 06 2013
From Peter Bala, Oct 28 2015: (Start)
a(n) = Sum_{k = 0..floor(n/2)} binomial(n-1,2*k-1)*binomial(2*k,k). Cf. A097893.
n*(n-2)*a(n) = (2*n-3)*(n-1)*a(n-1) + 3*(n-1)*(n-2)*a(n-2) with a(1) = 0, a(2) = 2. (End)
From Peter Luschny, Oct 29 2015: (Start)
a(n) = 2*(n-1)*hypergeom([1-n/2,3/2-n/2],[2],4).
a(n) = (n-1)!*[x^(n-1)](2*exp(x)*BesselI(1,2*x)).
a(n) = (n-1)*A007971(n) for n>=2.
A105696(n) = a(n-1) + a(n) for n>=2.
A162551(n-2) = (1/2)*Sum_{k=1..n} binomial(n,k)*a(k) for n>=2.
A079309(n) = (1/2)*Sum_{k=1..2*n} (-1)^k*binomial(2*n,k)*a(k) for n>=1.
(End)

Extensions

New name based on a comment by T. D. Noe, Mar 16 2005, offset set to 1 and a(1) = 0 prepended by Peter Luschny, Nov 04 2015

A167022 Expansion of sqrt(1 - 2*x - 3*x^2) in powers of x.

Original entry on oeis.org

1, -1, -2, -2, -4, -8, -18, -42, -102, -254, -646, -1670, -4376, -11596, -31022, -83670, -227268, -621144, -1706934, -4713558, -13072764, -36398568, -101704038, -285095118, -801526446, -2259520830, -6385455594, -18086805002, -51339636952, -146015545604
Offset: 0

Views

Author

Michael Somos, Oct 27 2009

Keywords

Comments

Sequence is to Motzkin numbers as A002420 is to Catalan numbers.

Examples

			G.f. = 1 - x - 2*x^2 - 2*x^3 - 4*x^4 - 8*x^5 - 18*x^6 - 42*x^7 - 102*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ Sqrt[1 - 2 x - 3 x^2], {x, 0, n}] (* Michael Somos, Jan 25 2014 *)
  • PARI
    {a(n) = polcoeff( sqrt(1 - 2*x - 3*x^2 + x * O(x^n)), n)}

Formula

D-finite with recurrence: n*a(n) = (2*n - 3)*a(n-1) + (3*n - 9)*a(n-2) for n>1.
0 = a(n) * (9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1) * (-3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2) * (a(n+2) + a(n+3)) for all n in Z. - Michael Somos, Mar 23 2012
G.f.: sqrt(1 - 2*x - 3*x^2).
Convolution inverse of A002426. A007971(n) = -a(n) unless n=0. A126068(n) = -a(n) unless n=0 or n=1. A001006(n) = -a(n+2)/2 unless n=0 or n=1.
G.f.: A(x)=sqrt(1-2*a*x+((a)^2-4*b)*(x^2)) =1-a*x-2*b*x^2/G(0) ; G(k) = 1 - a*x - b*x^2/G(k+1). - Sergei N. Gladkovskii, Dec 05 2011
a=1;b=1;A(x)=(1-2*x-3*x^2)^(1/2)=1-x-2*x^2/G(0) ; G(k) = 1 - x - x^2/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 05 2011
G.f.: sqrt(1-2*x-3*(x^2))=1 - x/G(0) = (3*x+2)*G(0) - 1 ; G(k) = 1 - 2*x/(1 + x/(1 + x/(1 - 2*x/(1 - x/(2 - x/G(k+1)))))) ; (continued fraction). - Sergei N. Gladkovskii, Dec 11 2011
a(n) ~ -3^(n - 1/2) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Jun 05 2018
a(n) = 2*A168051(n), n>1. - R. J. Mathar, Jan 23 2020

A168055 Expansion of 2 - x - sqrt(1-2x-3x^2).

Original entry on oeis.org

1, 0, 2, 2, 4, 8, 18, 42, 102, 254, 646, 1670, 4376, 11596, 31022, 83670, 227268, 621144, 1706934, 4713558, 13072764, 36398568, 101704038, 285095118, 801526446, 2259520830, 6385455594, 18086805002, 51339636952, 146015545604
Offset: 0

Views

Author

Paul Barry, Nov 17 2009

Keywords

Comments

Hankel transform is A168054.

Examples

			G.f. = 1 + 2*x^2 + 2*x^3 + 4*x^4 + 8*x^5 + 18*x^6 + 42*x^7 + 102*x^8 + 254*x^9 + ...
		

Crossrefs

Cf. A168049.
Cf. A126068, A007971. [R. J. Mathar, Nov 18 2009]

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ 2 - x - Sqrt[1 - 2 x - 3 x^2], {x, 0, n}] (* Michael Somos, Jan 25 2014 *)
  • PARI
    {a(n) = polcoeff( 2 - x - sqrt(1 - 2*x - 3*x^2 + x * O(x^n)), n)} /* Michael Somos, Jan 25 2014 */

Formula

a(n+2) = 2*A001006(n).
a(n) = 0^n + 2*Sum_{k=0..floor((n-2)/2)} C(n-2,2k)*A000108(k).
0 = a(n) * (9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1) * (-3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2) * (a(n+2) + a(n+3)) if n>0. - Michael Somos, Jan 25 2014
D-finite with recurrence: n*a(n) +(-2*n+3)*a(n-1) +3*(-n+3)*a(n-2)=0. - R. J. Mathar, Nov 19 2014

Extensions

Name corrected by Michael Somos, Mar 23 2012

A126068 Expansion of 1 - x - sqrt(1 - 2*x - 3*x^2) in powers of x.

Original entry on oeis.org

0, 0, 2, 2, 4, 8, 18, 42, 102, 254, 646, 1670, 4376, 11596, 31022, 83670, 227268, 621144, 1706934, 4713558, 13072764, 36398568, 101704038, 285095118, 801526446, 2259520830, 6385455594, 18086805002, 51339636952, 146015545604
Offset: 0

Views

Author

Zerinvary Lajos, Feb 28 2007

Keywords

Comments

Except for initial terms, identical to A007971.

Examples

			G.f. = 2*x^2 + 2*x^3 + 4*x^4 + 8*x^5 + 18*x^6 + 42*x^7 + 102*x^8 + 254*x^9 + ...
		

Crossrefs

Cf. A007971.

Programs

  • Maple
    zl:=4*(1-z+sqrt(1-2*z-3*z^2))/(1-z+sqrt(1-2*z-3*z^2))^2: gser:=series(zl, z=0, 35): seq(coeff(gser, z, n), n=-2..27);
  • Mathematica
    a[ n_] := SeriesCoefficient[ 1 - x - Sqrt[1 - 2 x - 3 x^2], {x, 0, n}]; (* Michael Somos, Jan 25 2014 *)
    CoefficientList[Series[1 - x - Sqrt[1 - 2 x - 3 x^2], {x, 0, 40}], x] (* Vincenzo Librandi, Apr 20 2014 *)
  • PARI
    {a(n) = polcoeff( (1 - x - sqrt(1 - 2*x - 3*x^2 + x * O(x^n))), n)}; /* Michael Somos, Jan 25 2014 */

Formula

G.f.: 1 - x - sqrt(1 - 2*x - 3*x^2). - Michael Somos, Jan 25 2014
0 = a(n) * (9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1) * (-3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2) * (a(n+2) + a(n+3)) if n>0. - Michael Somos, Jan 25 2014
a(n) ~ 3^(n-1/2)/(sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 20 2014

Extensions

Better name by Michael Somos, Jan 25 2014

A152227 Eigentriangle, row sums = A002426.

Original entry on oeis.org

1, 2, 1, 2, 2, 3, 4, 2, 6, 7, 8, 4, 6, 14, 19, 18, 8, 12, 14, 38, 51, 42, 18, 24, 28, 38, 102, 141, 102, 42, 54, 56, 76, 102, 282, 393254, 102, 126, 126, 152, 204, 282, 786, 1107, 646, 254, 306, 2944, 342, 408, 564, 786, 2214, 3139
Offset: 1

Views

Author

Gary W. Adamson, Nov 29 2008

Keywords

Comments

Row sums = A002426 starting with offset 1: (1, 3, 7, 19, 51, 141, 393,...).
Right border = A002426, left border = A007971
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
2, 1;
2, 2, 3;
4, 2, 6, 7;
8, 4, 6, 14, 19;
18, 8, 12, 14, 38, 51;
42, 18, 24, 28, 38, 102, 141;
102, 42, 54, 56, 76, 102, 282, 393;
254, 102, 126, 126, 152, 204, 282, 786, 1107;
646, 254, 306, 394, 342, 408, 564, 786, 2214, 3139;
...
Row 3 = (4, 2, 6, 7) = termwise products of (4, 2, 2, 1) and (1, 1, 3, 7)
		

Formula

Triangle read by rows, M*Q. M = an infinite lower triangular matrix with A007971 in every column: (1, 2, 2, 4, 8, 18, 42,...); and Q = a matrix with A002426 as the main diagonal and the rest zeros.
Showing 1-10 of 12 results. Next