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

A006600 Total number of triangles visible in regular n-gon with all diagonals drawn.

Original entry on oeis.org

1, 8, 35, 110, 287, 632, 1302, 2400, 4257, 6956, 11297, 17234, 25935, 37424, 53516, 73404, 101745, 136200, 181279, 236258, 306383, 389264, 495650, 620048, 772785, 951384, 1167453, 1410350, 1716191, 2058848, 2463384, 2924000, 3462305, 4067028, 4776219, 5568786, 6479551
Offset: 3

Views

Author

Keywords

Comments

Place n equally-spaced points on a circle, join them in all possible ways; how many triangles can be seen?

Examples

			a(4) = 8 because in a quadrilateral the diagonals cross to make four triangles, which pair up to make four more.
		

References

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

Crossrefs

Often confused with A005732.
Row sums of A363174.
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_]:=If[Mod[n,m]==0,1,0]; Tri[n_]:=n(n-1)(n-2)(n^3+18n^2-43n+60)/720 - del[2,n](n-2)(n-7)n/8 - del[4,n](3n/4) - del[6,n](18n-106)n/3 + del[12,n]*33n + del[18,n]*36n + del[24,n]*24n - del[30,n]*96n - del[42,n]*72n - del[60,n]*264n - del[84,n]*96n - del[90,n]*48n - del[120,n]*96n - del[210,n]*48n; Table[Tri[n], {n,3,1000}] (* T. D. Noe, Dec 21 2006 *)

Formula

a(2n-1) = A005732(2n-1) for n > 1; a(2n) = A005732(2n) - A260417(n) for n > 1. - Jonathan Sondow, Jul 25 2015

Extensions

a(3)-a(8) computed by Victor Meally (personal communication to N. J. A. Sloane, circa 1975); later terms and recurrence from S. Sommars and T. Sommars.

A005732 a(n) = binomial(n+3,6) + binomial(n+1,5) + binomial(n,5).

Original entry on oeis.org

1, 8, 35, 111, 287, 644, 1302, 2430, 4257, 7084, 11297, 17381, 25935, 37688, 53516, 74460, 101745, 136800, 181279, 237083, 306383, 391644, 495650, 621530, 772785, 953316, 1167453, 1419985, 1716191, 2061872, 2463384, 2927672, 3462305, 4075512, 4776219, 5574087, 6479551
Offset: 3

Views

Author

Keywords

Comments

Place n points in general position on a circle, join them in all possible ways; how many triangles can be seen?
Equals binomial transform of [1, 7, 20, 29, 22, 8, 1, 0, 0, 0, ...]. - Gary W. Adamson, Jun 13 2008

References

  • C. L. Liu, Introduction to Combinatorial Analysis. McGraw-Hill, NY, 1968, p. 20.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Often confused with A006600.

Programs

  • Haskell
    a005732 n = a005732_list !! (n-3)
    a005732_list = 1 : 8 : f (drop 5 a007318_tabl) where
       f (us:pss@(vs::ws:)) = (us !! 5 + vs !! 5 + ws !! 6) : f pss
    -- Reinhard Zumkeller, Mar 11 2014
    
  • Magma
    [Binomial(n+3, 6) + Binomial(n+1, 5) +Binomial(n,5): n in [3..100]]; // Vincenzo Librandi, Apr 10 2011
    
  • Mathematica
    Table[Binomial[n+3,6]+Binomial[n+1,5]+Binomial[n,5],{n,3,40}]  (* Harvey P. Dale, Apr 09 2011 *)
  • PARI
    a(n)=binomial(n+3,6) + binomial(n+1,5) + binomial(n,5) \\ Charles R Greathouse IV, Feb 19 2017

Formula

G.f.: x^3*(-1-x+x^3) / (x-1)^7 . - Simon Plouffe in his 1992 dissertation
a(2n-1) = A006600(2n-1) for n > 1; a(2n) = A006600(2n) + A260417(n) for n > 1. - Jonathan Sondow, Jul 25 2015

Extensions

Thanks to Joshua Zucker, Ted Alper and Joe Keane for clarifying the connection with A006600.

A363174 Array read by rows: T(n,k) is the number of triangles inside a regular n-gon formed by intersecting line segments, considering all configurations of 3 line segments from k distinct vertices, with n >= 3, 3 <= k <= 6.

Original entry on oeis.org

1, 0, 0, 0, 4, 4, 0, 0, 10, 20, 5, 0, 20, 60, 30, 0, 35, 140, 105, 7, 56, 280, 280, 16, 84, 504, 630, 84, 120, 840, 1260, 180, 165, 1320, 2310, 462, 220, 1980, 3960, 796, 286, 2860, 6435, 1716, 364, 4004, 10010, 2856, 455, 5460, 15015, 5005, 560, 7280, 21840, 7744
Offset: 3

Views

Author

Paolo Xausa, May 19 2023

Keywords

Comments

See Sommars and Sommars (1998) for a complete analysis of the problem.

Examples

			Array begins:
  n\k|     3     4     5     6
  ---+---------------------------
   3 |     1,    0,    0,    0;
   4 |     4,    4,    0,    0;
   5 |    10,   20,    5,    0;
   6 |    20,   60,   30,    0;
   7 |    35,  140,  105,    7;
   8 |    56,  280,  280,   16;
   9 |    84,  504,  630,   84;
  10 |   120,  840, 1260,  180;
  ...
		

Crossrefs

Cf. A000579, A006561, A006600 (row sums), A260417.
Cf. A000292 (column k = 3), A033488 (column k = 4), A174002 (column k = 5), A363173 (column k = 6).

Programs

  • Mathematica
    A363174list[rowmax_]:=Module[{d},d[m_,n_]:=Boole[Divisible[n,m]];Table[Binomial[n,k]If[4<=k<=5,k,1]-If[k==6&&EvenQ[n],((1/8n^2-9/8n+7/4)d[2,n]+3/4d[4,n]+(6n-106/3)d[6,n]-33d[12,n]-36d[18,n]-24d[24,n]+96d[30,n]+72d[42,n]+264d[60,n]+96d[84,n]+48d[90,n]+96d[120,n]+48d[210,n])n,0],{n,3,rowmax},{k,3,6}]];A363174list[20]

Formula

T(n,3) = binomial(n,3) = A000292(n-2).
T(n,4) = 4*binomial(n,4) = A033488(n-3).
T(n,5) = 5*binomial(n,5) = A174002(n-4), for n >= 4.
T(n,6) = binomial(n,6) = A000579(n) if n is odd, A000579(n) - A260417(n/2) if n is even.
Sum_{k=3..6} T(n,k) = A006600(n).

A363173 Number of triangles inside a regular n-gon formed by intersecting line segments, considering all configurations of 3 line segments from 6 distinct vertices.

Original entry on oeis.org

0, 0, 0, 0, 7, 16, 84, 180, 462, 796, 1716, 2856, 5005, 7744, 12376, 17508, 27132, 38160, 54264, 73788, 100947, 132216, 177100, 228748, 296010, 374808, 475020, 584140, 736281, 903168, 1107568, 1341232, 1623160, 1939308, 2324784, 2755380, 3262623, 3832080, 4496388
Offset: 3

Views

Author

Paolo Xausa, May 19 2023

Keywords

Crossrefs

Column k = 6 of A363174.

Programs

  • Mathematica
    A363173list[nmax_]:=Module[{d},d[m_,n_]:=Boole[Divisible[n,m]];Table[Binomial[n, 6]-If[EvenQ[n],((1/8n^2-9/8n+7/4)d[2,n]+3/4d[4,n]+(6n-106/3)d[6,n]-33d[12,n]-36d[18,n]-24d[24,n]+96d[30,n]+72d[42,n]+264d[60,n]+96d[84,n]+48d[90,n]+96d[120,n]+48d[210,n])n,0],{n,3,nmax}]];A363173list[50]

Formula

a(n) = binomial(n,6) = A000579(n) if n is odd, A000579(n) - A260417(n/2) if n is even.
Showing 1-4 of 4 results.