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

A374825 Place n equally spaced points on the circumference of a circle of radius r and then connect each pair of points with straight lines whose intersections create A007569(n) - n additional points. Draw a circle of radius r around each of the A007569(n) points. The sequence gives the total number of vertices formed from all circle intersections.

Original entry on oeis.org

0, 1, 4, 13, 71, 313, 1625, 3073, 17443, 28601, 115094, 95965, 527463, 587441
Offset: 1

Views

Author

Scott R. Shannon, Jul 21 2024

Keywords

Crossrefs

Cf. A374826 (regions), A374827 (edges), A374828 (k-gons), A007569 (total circles), A370980, A374338.

Formula

a(n) = A374827(n) - A374826(n) + 1, by Euler's formula.

A374826 Place n equally spaced points on the circumference of a circle of radius r and then connect each pair of points with straight lines whose intersections create A007569(n) - n additional points. Draw a circle of radius r around each of the A007569(n) points. The sequence gives the total number of regions formed from all circle intersections.

Original entry on oeis.org

1, 2, 6, 16, 80, 324, 1666, 3120, 17703, 28780, 115401, 96624, 528073, 589708
Offset: 1

Views

Author

Scott R. Shannon, Jul 21 2024

Keywords

Crossrefs

Cf. A374825 (vertices), A374827 (edges), A374828 (k-gons), A007569 (total circles), A093005, A374337.

Formula

a(n) = A374827(n) - A374825(n) + 1, by Euler's formula.

A374827 Place n equally spaced points on the circumference of a circle of radius r and then connect each pair of points with straight lines whose intersections create A007569(n) - n additional points. Draw a circle of radius r around each of the A007569(n) points. The sequence gives the total number of curved edges formed from all circle intersections.

Original entry on oeis.org

1, 2, 9, 28, 150, 636, 3290, 6192, 35145, 57380, 230494, 192588, 1055535, 1177148
Offset: 1

Views

Author

Scott R. Shannon, Jul 21 2024

Keywords

Crossrefs

Cf. A374825 (vertices), A374826 (regions), A374828 (k-gons), A007569 (total circles), A183207, A374339.

Formula

a(n) = A374825(n) + A374826(n) - 1, by Euler's formula.

A374828 Irregular table read by rows: Place n equally spaced points on the circumference of a circle of radius r and then connect each pair of points with straight lines whose intersections create A007569(n) - n additional points. Draw a circle of radius r around each of the A007569(n) points. T(n,k) is the number of k-sided regions, k>=2, formed from all circle intersections.

Original entry on oeis.org

3, 3, 0, 12, 4, 5, 45, 10, 10, 10, 0, 156, 84, 48, 30, 6, 0, 742, 476, 294, 119, 21, 14, 0, 1104, 1296, 512, 152, 40, 16, 0, 6669, 6768, 2790, 1179, 207, 81, 9, 0, 10280, 11130, 5490, 1440, 260, 150, 20, 10, 0, 40777, 45342, 20669, 6963, 1177, 374, 77, 11, 11
Offset: 3

Views

Author

Scott R. Shannon, Jul 21 2024

Keywords

Comments

It is likely that n = 5 is the last graph that produces 2-sided regions, although this is unknown.

Examples

			The table begins:
3, 3;
0, 12, 4;
5, 45, 10, 10, 10;
0, 156, 84, 48, 30, 6;
0, 742, 476, 294, 119, 21, 14;
0, 1104, 1296, 512, 152, 40, 16;
0, 6669, 6768, 2790, 1179, 207, 81, 9;
0, 10280, 11130, 5490, 1440, 260, 150, 20, 10;
0, 40777, 45342, 20669, 6963, 1177, 374, 77, 11, 11;
0, 33672, 39552, 16236, 5772, 1080, 288, 0, 12, 0, 12;
0, 181467, 212186, 97461, 30082, 5252, 1430, 78, 104, 0, 0, 13;
0, 198772, 246134, 104356, 33348, 5614, 1190, 252, 28, 0, 0, 0, 14;
.
.
		

Crossrefs

Cf. A374825 (vertices), A374826 (regions), A374827 (edges), A007569 (total circles).

Formula

Sum of row n = A374826(n).

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

A007678 Number of regions in regular n-gon with all diagonals drawn.

Original entry on oeis.org

0, 0, 1, 4, 11, 24, 50, 80, 154, 220, 375, 444, 781, 952, 1456, 1696, 2500, 2466, 4029, 4500, 6175, 6820, 9086, 9024, 12926, 13988, 17875, 19180, 24129, 21480, 31900, 33856, 41416, 43792, 52921, 52956, 66675, 69996, 82954, 86800, 102050, 97734, 124271, 129404, 149941
Offset: 1

Views

Author

N. J. A. Sloane, Bjorn Poonen (poonen(AT)math.princeton.edu)

Keywords

Comments

This sequence and A006533 are two equivalent ways of presenting the same sequence.
A quasipolynomial of order 2520. - Charles R Greathouse IV, Jan 15 2013
Also the circuit rank of the n-polygon diagonal intersection graph. - Eric W. Weisstein, Mar 08 2018
This sequence only counts polygons, in contrast to A006533 which also counts the n segments of the circumscribed circle delimited by the edges of the regular n-gon. Therefore a(n) = A006533(n) - n. See also A006561 which counts the intersection points, and A350000 which considers iterated "cutting along diagonals". - M. F. Hasler, Dec 13 2021
The Petrie polygon orthographic projection of a regular n-simplex is a regular (n+1)-gon with all diagonals drawn. Hence a(n+1) is the number of regions in the Petrie polygon of a regular n-simplex. - Mohammed Yaseen, Nov 05 2022

References

  • Jean Meeus, Wiskunde Post (Belgium), Vol. 10, 1972, pp. 62-63.
  • C. A. Pickover, The Mathematics of Oz, Problem 58 "The Beauty of Polygon Slicing", Cambridge University Press, 2002.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001006, A054726, A006533, A006561, A006600, A007569 (number of vertices), A006522, A135565 (number of line segments).
A062361 gives number of triangles, A331450 and A331451 give distribution of polygons by number of sides.
A333654, A335614, A335646, A337330 give the number of internal n-gon to k-gon contacts for n>=3, k>=n.
A187781 gives number of distinct regions.

Programs

  • Mathematica
    del[m_,n_]:=If[Mod[n,m]==0,1,0]; R[n_]:=If[n<3, 0, (n^4-6n^3+23n^2-42n+24)/24 + del[2,n](-5n^3+42n^2-40n-48)/48 - del[4,n](3n/4) + del[6,n](-53n^2+310n)/12 + del[12,n](49n/2) + del[18,n]*32n + del[24,n]*19n - del[30,n]*36n - del[42,n]*50n - del[60,n]*190n - del[84,n]*78n - del[90,n]*48n - del[120,n]*78n - del[210,n]*48n]; Table[R[n], {n,1,1000}] (* T. D. Noe, Dec 21 2006 *)
  • PARI
    /* Only for odd n > 3, not suitable for other values of n! */ { a(n)=local(nr,x,fn,cn,fn2); nr=0; fn=floor(n/2); cn=ceil(n/2); fn2=(fn-1)^2-1; nr=fn2*n+fn+(n-2)*fn+cn; x=(n-5)/2; if (x>0,nr+=x*(x+1)*(2*x+1)/6*n); nr; } \\ Jon Perry, Jul 08 2003
    
  • PARI
    apply( {A007678(n)=if(n%2, (((n-6)*n+23)*n-42)*n/24+1, ((n^3/2 -17*n^2/4 +22*n -if(n%4, 31, 40) +!(n%6)*(310 -53*n))/12 +!(n%12)*49/2 +!(n%18)*32 +!(n%24)*19 -!(n%30)*36 -!(n%42)*50 -!(n%60)*190 -!(n%84)*78 -!(n%90)*48 -!(n%120)*78 -!(n%210)*48)*n)}, [1..44]) \\ M. F. Hasler, Aug 06 2021
    
  • Python
    def d(n,m): return not n % m
    def A007678(n): return (1176*d(n,12)*n - 3744*d(n,120)*n + 1536*d(n,18)*n - d(n,2)*(5*n**3 - 42*n**2 + 40*n + 48) - 2304*d(n,210)*n + 912*d(n,24)*n - 1728*d(n,30)*n - 36*d(n,4)*n - 2400*d(n,42)*n - 4*d(n,6)*n*(53*n - 310) - 9120*d(n,60)*n - 3744*d(n,84)*n - 2304*d(n,90)*n + 2*n**4 - 12*n**3 + 46*n**2 - 84*n)//48 + 1 # Chai Wah Wu, Mar 08 2021

Formula

For odd n > 3, a(n) = sumstep {i=5, n, 2, (i-2)*floor(n/2)+(i-4)*ceiling(n/2)+1} + x*(x+1)*(2*x+1)/6*n), where x = (n-5)/2. Simplifying the floor/ceiling components gives the PARI code below. - Jon Perry, Jul 08 2003
For odd n, a(n) = (24 - 42*n + 23*n^2 - 6*n^3 + n^4)/24. - Graeme McRae, Dec 24 2004
a(n) = A006533(n) - n. - T. D. Noe, Dec 23 2006
For odd n, binomial transform of [1, 10, 29, 36, 16, 0, 0, 0, ...] = [1, 11, 50, 154, ...]. - Gary W. Adamson, Aug 02 2011
a(n) = A135565(n) - A007569(n) + 1. - Max Alekseyev
See the Mma code in A006533 for the explicit Poonen-Rubenstein formula that holds for all n. - N. J. A. Sloane, Jan 23 2020

Extensions

More terms from Graeme McRae, Dec 26 2004
a(1) = a(2) = 0 prepended by Max Alekseyev, Dec 01 2011

A054726 Number of graphs with n nodes on a circle without crossing edges.

Original entry on oeis.org

1, 1, 2, 8, 48, 352, 2880, 25216, 231168, 2190848, 21292032, 211044352, 2125246464, 21681954816, 223623069696, 2327818174464, 24424842461184, 258054752698368, 2742964283768832, 29312424612462592, 314739971287154688, 3393951437605044224, 36739207546043105280
Offset: 0

Views

Author

Philippe Flajolet, Apr 20 2000

Keywords

Comments

Related to Schröder's second problem.
A001006 gives number of ways of drawing any number of nonintersecting chords between n points on a circle, while this sequence gives number of ways of drawing noncrossing chords between n points on a circle. The difference is that nonintersection chords have no point in common, while noncrossing chords may share an endpoint. - David W. Wilson, Jan 30 2003
For n>0, a(n) = number of lattice paths from (0,0) to (n-1,n-1) that consist of steps (i,j), i,j nonnegative integers not both 0 and that stay strictly below the line y=x except at their endpoints. For example, a(3)=8 counts the paths with following step sequences: {(2, 2)}, {(2, 1), (0, 1)}, {(2, 0), (0, 2)}, {(2, 0), (0, 1), (0, 1)}, {(1, 0), (1, 2)}, {(1, 0), (1, 1), (0, 1)}, {(1, 0), (1, 0), (0, 2)}, {(1, 0), (1, 0), (0, 1), (0, 1)}. If the word "strictly" is replaced by "weakly", the counting sequence becomes A059435. - David Callan, Jun 07 2006
The nodes on the circle are distinguished by their positions but are otherwise unlabeled. - Lee A. Newberg, Aug 09 2011
From Gus Wiseman, Jun 22 2019: (Start)
Conjecture: Also the number of simple graphs with vertices {1..n} not containing any pair of nesting edges. Two edges {a,b}, {c,d} where a < b and c < d are nesting if a < c and b > d or a > c and b < d. For example, the a(0) = 1 through a(3) = 8 non-nesting edge-sets are:
{} {} {} {}
{12} {12}
{13}
{23}
{12,13}
{12,23}
{13,23}
{12,13,23}
(End)

Crossrefs

Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.
Cf. A000108 (non-crossing set partitions), A000124, A006125, A007297 (connected case), A194560, A306438, A324167, A324169 (covering case), A324173, A326210.

Programs

  • Maple
    with(combstruct): br:= {EA = Union(Sequence(EA, card >= 2), Prod(V, Sequence(EA), Sequence(EA))), V=Union(Prod(Z, G)), G=Union(Epsilon, Prod(Z, G), Prod(V,V,Sequence(EA), Sequence(EA), Sequence(Union(Sequence(EA,card>=1), Prod(V,Sequence(EA),Sequence(EA)))))) }; ggSeq := [seq(count([G, br], size=i), i=0..20)];
  • Mathematica
    Join[{a = 1, b = 1}, Table[c = (6*(2*n - 3)*b)/n - (4*(n - 3) a)/n; a = b; b = c, {n, 1, 40}]] (* Vladimir Joseph Stephan Orlovsky, Jul 11 2011 *)
    nn=8;
    croXQ[stn_]:=MatchQ[stn,{_,{_,x_,_,y_,_},_,{_,z_,_,t_,_},_}/;xGus Wiseman, Feb 19 2019 *)
  • PARI
    z='z+O('z^66); Vec( 1+3/2*z-z^2-z/2*sqrt(1-12*z+4*z^2) ) \\ Joerg Arndt, Mar 01 2014

Formula

a(n) = 2^n*A001003(n-2) for n>2.
From Lee A. Newberg, Aug 09 2011: (Start)
G.f.: 1 + (3/2)*z - z^2 - (z/2)*sqrt(1 - 12*z + 4*z^2);
D-finite with recurrence: a(n) = ((12*n-30)*a(n-1) - (4*n-16)*a(n-2)) / (n-1) for n>1. (End)
a(n) ~ 2^(n - 7/4) * (1 + sqrt(2))^(2*n-3) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Oct 11 2012, simplified Dec 24 2017
a(n) = 2^(n-2) * (Legendre_P(n-1, 3) - Legendre_P(n-3, 3))/(2*n - 3) = 2^n * (Legendre_P(n-1, 3) - 3*Legendre_P(n-2, 3))/(4*n - 8), both for n >= 3. - Peter Bala, May 06 2024

Extensions

Offset changed to 0 by Lee A. Newberg, Aug 03 2011

A006561 Number of intersections of diagonals in the interior of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 1, 5, 13, 35, 49, 126, 161, 330, 301, 715, 757, 1365, 1377, 2380, 1837, 3876, 3841, 5985, 5941, 8855, 7297, 12650, 12481, 17550, 17249, 23751, 16801, 31465, 30913, 40920, 40257, 52360, 46981, 66045, 64981, 82251, 80881, 101270, 84841, 123410, 121441
Offset: 1

Views

Author

N. J. A. Sloane, Bjorn Poonen (poonen(AT)math.princeton.edu)

Keywords

References

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

Crossrefs

Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.
See also A101363, A292104, A292105.
See A290447 for an analogous problem on a line.

Programs

  • Maple
    delta:=(m,n) -> if (n mod m) = 0 then 1 else 0; fi;
    f:=proc(n) global delta;
    if n <= 2 then 0 else \
    binomial(n,4)  \
    + (-5*n^3 + 45*n^2 - 70*n + 24)*delta(2,n)/24 \
    - (3*n/2)*delta(4,n) \
    + (-45*n^2 + 262*n)*delta(6,n)/6  \
    + 42*n*delta(12,n) \
    + 60*n*delta(18,n) \
    + 35*n*delta(24,n) \
    - 38*n*delta(30,n) \
    - 82*n*delta(42,n) \
    - 330*n*delta(60,n) \
    - 144*n*delta(84,n) \
    - 96*n*delta(90,n) \
    - 144*n*delta(120,n) \
    - 96*n*delta(210,n); fi; end;
    [seq(f(n),n=1..100)]; # N. J. A. Sloane, Aug 09 2017
  • Mathematica
    del[m_,n_]:=If[Mod[n,m]==0,1,0]; Int[n_]:=If[n<4, 0, Binomial[n,4] + del[2,n](-5n^3+45n^2-70n+24)/24 - del[4,n](3n/2) + del[6,n](-45n^2+262n)/6 + del[12,n]*42n + del[18,n]*60n + del[24,n]*35n - del[30,n]*38n - del[42,n]*82n - del[60,n]*330n - del[84,n]*144n - del[90,n]*96n - del[120,n]*144n - del[210,n]*96n]; Table[Int[n], {n,1,1000}] (* T. D. Noe, Dec 21 2006 *)
  • PARI
    apply( {A006561(n)=binomial(n,4)+if(n%2==0, (n>2) + (-5*n^2+45*n-70)*n/24 + vecsum([t[2] | t<-[4,6,12,18,24,30,42,60,84,90,120,210;-3/2,(262-45*n)/6,42,60,35,-38,-82,-330,-144,-96,-144,-96], n%t[1]==0])*n)}, [1..44]) \\ M. F. Hasler, Aug 23 2017, edited Aug 06 2021
    
  • Python
    def d(n,m): return not n % m
    def A006561(n): return 0 if n == 2 else n*(42*d(n,12) - 144*d(n,120) + 60*d(n,18) - 96*d(n,210) + 35*d(n,24)- 38*d(n,30) - 82*d(n,42) - 330*d(n,60) - 144*d(n,84) - 96*d(n,90)) + (n**4 - 6*n**3 + 11*n**2 - 6*n -d(n,2)*(5*n**3 - 45*n**2 + 70*n - 24) - 36*d(n,4)*n - 4*d(n,6)*n*(45*n - 262))//24 # Chai Wah Wu, Mar 08 2021

Formula

Let delta(m,n) = 1 if m divides n, otherwise 0.
For n >= 3, a(n) = binomial(n,4) + (-5*n^3 + 45*n^2 - 70*n + 24)*delta(2,n)/24
- (3*n/2)*delta(4,n) + (-45*n^2 + 262*n)*delta(6,n)/6 + 42*n*delta(12,n)
+ 60*n*delta(18,n) + 35*n*delta(24,n) - 38*n*delta(30,n)
- 82*n*delta(42,n) - 330*n*delta(60,n) - 144*n*delta(84,n)
- 96*n*delta(90,n) - 144*n*delta(120,n) - 96*n*delta(210,n). [Poonen and Rubinstein, Theorem 1] - N. J. A. Sloane, Aug 09 2017
For odd n, a(n) = binomial(n,4) = n*(n-1)*(n-2)*(n-3)/24, see A053126. For even n, use this formula, but then subtract 2 for every 3-crossing, subtract 5 for every 4-crossing, subtract 9 for every 5-crossing, etc. The number to be subtracted for a d-crossing is (d-1)*(d-2)/2. - Graeme McRae, Dec 26 2004
a(n) = A007569(n) - n. - T. D. Noe, Dec 23 2006
a(2n+5) = A053126(n+4). - Philippe Deléham, Jun 07 2013

A135565 Number of line segments in regular n-gon with all diagonals drawn.

Original entry on oeis.org

0, 1, 3, 8, 20, 42, 91, 136, 288, 390, 715, 756, 1508, 1722, 2835, 3088, 4896, 4320, 7923, 8360, 12180, 12782, 17963, 16344, 25600, 26494, 35451, 36456, 47908, 38310, 63395, 64800, 82368, 84082, 105315, 99972, 132756, 135014, 165243, 167720
Offset: 1

Views

Author

Keywords

Comments

A line segment (or edge) is considered to end at any vertex where two or more chords meet.
I.e., edge count of the n-polygon diagonal intersection graph. - Eric W. Weisstein, Mar 08 2018

Crossrefs

Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.

Programs

  • Mathematica
    del[m_, n_] := Boole[Mod[n, m] == 0];
    A007569[n_] :=
    If[n < 4, n,
      n + Binomial[n, 4] + del[2, n] (-5 n^3 + 45 n^2 - 70 n + 24)/24 -
       del[4, n] (3 n/2) + del[6, n] (-45 n^2 + 262 n)/6 +
       del[12, n]*42 n + del[18, n]*60 n + del[24, n]*35 n -
       del[30, n]*38 n - del[42, n]*82 n - del[60, n]*330 n -
       del[84, n]*144 n - del[90, n]*96 n - del[120, n]*144 n -
       del[210, n]*96 n];
    A007678[n_] :=
      If[n < 3,
       0, (n^4 - 6 n^3 + 23 n^2 - 42 n + 24)/24 +
        del[2, n] (-5 n^3 + 42 n^2 - 40 n - 48)/48 - del[4, n] (3 n/4) +
        del[6, n] (-53 n^2 + 310 n)/12 + del[12, n] (49 n/2) +
        del[18, n]*32 n + del[24, n]*19 n - del[30, n]*36 n -
        del[42, n]*50 n - del[60, n]*190 n - del[84, n]*78 n -
        del[90, n]*48 n - del[120, n]*78 n - del[210, n]*48 n];
    a[n_] := A007569[n] + A007678[n] - 1;
    Array[a, 40] (* Jean-François Alcover, Sep 07 2017, after Max Alekseyev, using T. D. Noe's code for A007569 and A007678 *)

Formula

a(n) = A007569(n) + A007678(n) - 1. - Max Alekseyev

A331450 Irregular triangle read by rows: Take a regular n-sided polygon (n>=3) with all diagonals drawn, as in A007678. Then T(n,k) = number of k-sided polygons in that figure for k = 3, 4, ..., max_k.

Original entry on oeis.org

1, 4, 10, 0, 1, 18, 6, 35, 7, 7, 0, 1, 56, 24, 90, 36, 18, 9, 0, 0, 1, 120, 90, 10, 176, 132, 44, 22, 276, 168, 377, 234, 117, 39, 0, 13, 0, 0, 0, 0, 1, 476, 378, 98, 585, 600, 150, 105, 15, 0, 0, 0, 0, 0, 0, 0, 1, 848, 672, 128, 48, 1054, 901, 357, 136, 17, 34, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1404, 954, 72, 18, 18, 1653, 1444, 646, 190, 57, 38, 2200, 1580, 580, 120, 0, 20, 2268, 2520, 903, 462, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 3

Views

Author

Keywords

Comments

Computed by Scott R. Shannon, Jan 24 2020
See A331451 for a version of this triangle giving the counts for k = 3 through n.
Mitosis of convex polygons, by Scott R. Shannon and N. J. A. Sloane, Dec 13 2021 (Start)
Borrowing a term from biology, we can think of this process as the "mitosis" of a regular polygon. Row 6 of this triangle shows that a regular hexagon "mitoses" into 18 triangles and 4 quadrilaterals, which we denote by 3^18 4^6.
What if we start with a convex but not necessarily regular n-gon? Let M(n) denote the number of different decompositions into cells that can be obtained. For n = 3, 4, and 5 there is only one possibility. For n = 6 there are two possibilities, 3^18 4^6 and 3^19 4^3 5^3. For n = 7 there are at least 11 possibilities. So the sequence M(n) for n >= 3 begins 1, 1, 1, 2, >=11, ...
The links below give further information. See also A350000. (End)

Examples

			A hexagon with all diagonals drawn contains 18 triangles and 6 quadrilaterals, so row 6 is [18, 6].
Triangle begins:
  1,
  4,
  10, 0, 1,
  18, 6,
  35, 7, 7, 0, 1,
  56, 24,
  90, 36, 18, 9, 0, 0, 1,
  120, 90, 10,
  176, 132, 44, 22, 0, 0, 0, 0, 1
  276, 168,
  377, 234, 117, 39, 0, 13, 0, 0, 0, 0, 1,
  476, 378, 98,
  585, 600, 150, 105, 15, 0, 0, 0, 0, 0, 0, 0, 1,
  848, 672, 128, 48,
  1054, 901, 357, 136, 17, 34, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  1404, 954, 72, 18, 18,
  1653, 1444, 646, 190, 57, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
  2200, 1580, 580, 120, 0, 20,
  2268, 2520, 903, 462, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  2992, 2860, 814, 66, 44, 44,
  3749, 2990, 1564, 644, 115, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  ...
The row sums are A007678, the first column is A062361.
		

Crossrefs

Extensions

Added "regular" to definition. - N. J. A. Sloane, Mar 06 2021
Showing 1-10 of 73 results. Next