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

A092867 Number of regions in an equilateral triangular figure formed by the straight line segments connecting all vertices and all points that divide the sides into n equal parts.

Original entry on oeis.org

1, 12, 75, 252, 715, 1572, 3109, 5676, 9291, 14556, 22081, 32502, 44935, 62868, 83286, 108384, 140152, 181710, 225565, 282978, 342792, 415614, 502318, 606642, 708505, 839874, 983007, 1141416, 1315102, 1529526, 1733476, 1994550, 2259420, 2559990, 2878053, 3237414, 3593521, 4047906, 4510590, 5002350, 5506918, 6128100, 6704800, 7414518, 8113992, 8858622, 9682927, 10626774, 11478142, 12519492
Offset: 1

Views

Author

Hugo Pfoertner, Mar 15 2004

Keywords

Examples

			a(2)=12 because the 6 line segments mutually connecting the vertices and the mid-side nodes form 12 congruent right triangles of two different sizes.
a(3)=75: 48 triangles, 24 quadrilaterals and 3 pentagons are formed. See pictures at Pfoertner link.
		

Crossrefs

Cf. A092866 (number of intersections), A274585 (number of points both inside and on the triangle sides), A274586 (number of edges), A331911 (number of n-gons).
Cf. A092098 (regions in triangle cut by line segments connecting vertices with subdivision points on opposite side), A006533 (regions formed by all diagonals in regular n-gon), A002717 (triangles in triangular matchstick arrangement).
If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Formula

By the Euler characteristic, a(n) = A274586(n) - A274585(n) + 1 = A274586(n) - A092866(n) - 3n - 1.

Extensions

a(1)=1 prepended by Max Alekseyev, Jun 29 2016
a(6)-a(50) from Cynthia Miaina Rasamimanananivo, Jun 28 2016, Jul 01 2016, Aug 05 2016, Aug 15 2016
Definition edited by N. J. A. Sloane, May 13 2020

A274586 Number of edges formed by sides and straight "chords" in a right triangle when each side is divided by vertices into n equal segments.

Original entry on oeis.org

3, 21, 132, 429, 1272, 2826, 5640, 10461, 17094, 26847, 41046, 61041, 84051, 118974, 157209, 204393, 264855, 346524, 428880, 541683, 654087, 793611, 961179, 1167468, 1357515, 1615209, 1891980, 2198019, 2530275, 2957808, 3341439, 3860652, 4371006, 4959636, 5572167, 6277722, 6950064, 7859406, 8763780, 9722571, 10687506, 11934912, 13029834, 14450598, 15805026, 17250795, 18863397, 20763204, 22372839, 24450474
Offset: 1

Views

Author

Cynthia Miaina Rasamimanananivo and Max Alekseyev, Jun 29 2016, Sep 02 2016

Keywords

Crossrefs

If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Formula

By the Euler characteristic, a(n) = A274585(n) + A092867(n) - 1 = A092866(n) + A092867(n) + 3n - 1.

A092866 Number of intersections inside an equilateral triangular figure formed by the straight line segments mutually connecting all vertices and all points that divide the sides into n equal parts. If three or more lines meet at an interior point this intersection is counted only once.

Original entry on oeis.org

0, 4, 49, 166, 543, 1237, 2511, 4762, 7777, 12262, 18933, 28504, 39078, 56065, 73879, 95962, 124653, 164761, 203259, 258646, 311233, 377932, 458793, 560755, 648936, 775258, 908893, 1056520, 1215087, 1428193, 1607871, 1866007, 2111488, 2399545, 2694010, 3040201, 3356433, 3811387, 4253074, 4720102, 5180466, 5806687, 6324906, 7035949, 7690900, 8392036, 9180330, 10136287, 10894551, 11930833
Offset: 1

Views

Author

Hugo Pfoertner, Mar 10 2004

Keywords

Comments

A detailed example for n=5 is given at the Pfoertner link.

Examples

			a(2)=4 because there are 3 intersection points between the triangle medians and the line segments connecting the midpoints of the sides plus the intersection of the 3 medians at the centroid.
		

Crossrefs

Cf. A092867 (regions formed by the diagonals), A274585 (points both inside and on the triangle sides), A274586 (edges).
Cf. A006561 (number of intersections of diagonals of regular n-gon), A091908 (intersections between line segments connecting vertices with subdivision points on opposite side).
If the boundary points are in general position, we get A367117, A213827, A367118, A367119. - N. J. A. Sloane, Nov 09 2023

Programs

  • Maple
    Inter:= proc(p1x,p1y,p2x,p2y,q1x,q1y,q2x,q2y)
      local det,x,y;
      det:= p1x*q1y-p1x*q2y-p1y*q1x+p1y*q2x-p2x*q1y+p2x*q2y+p2y*q1x-p2y*q2x;
      if det = 0 then return NULL fi;
      x:= (p1x*p2y*q1x-p1x*p2y*q2x-p1x*q1x*q2y+p1x*q1y*q2x-p1y*p2x*q1x+p1y*p2x*q2x+p2x*q1x*q2y-p2x*q1y*q2x)/det;
      y:= (p1x*p2y*q1y-p1x*p2y*q2y-p1y*p2x*q1y+p1y*p2x*q2y-p1y*q1x*q2y+p1y*q1y*q2x+p2y*q1x*q2y-p2y*q1y*q2x)/det;
      if x >0 and y > 0 and x + y < 1 then [x,y]
      else NULL
      fi
    end proc:
    F:= proc(n) local A,B,C,Pairs,Pts;
         A:= [seq([j/n,0],j=0..n)];
         B:= [seq([0,j/n],j=0..n)];
         C:= [seq([j/n,1-j/n],j=0..n)];
         Pairs:= [seq(seq([A[i],B[j]],i=2..n+1),j=2..n+1),
                  seq(seq([A[i],C[j]],i=1..n),j=1..n),
                  seq(seq([B[i],C[j]],i=1..n),j=2..n+1)];
         Pts:= {seq(seq(Inter(op(Pairs[i][1]),op(Pairs[i][2]),op(Pairs[j][1]),op(Pairs[j][2])),j=1..i-1),i=2..nops(Pairs))};
         nops(Pts);
    end proc:
    map(F, [$1..20]); # Robert Israel, Jun 30 2016
  • Mathematica
    Inter[{p1x_, p1y_}, {p2x_, p2y_}, {q1x_, q1y_}, {q2x_, q2y_}] := Module[ {det, x, y}, det = p1x q1y - p1x q2y - p1y q1x + p1y q2x - p2x q1y + p2x q2y + p2y q1x - p2y q2x; If[det == 0, Return[Nothing]]; x = (p1x p2y q1x - p1x p2y q2x - p1x q1x q2y + p1x q1y q2x - p1y p2x q1x + p1y p2x q2x + p2x q1x q2y - p2x q1y q2x)/det; y = (p1x p2y q1y - p1x p2y q2y - p1y p2x q1y + p1y p2x q2y - p1y q1x q2y + p1y q1y q2x + p2y q1x q2y - p2y q1y q2x)/det; If[x > 0 && y > 0 && x + y < 1, {x, y}, Nothing]];
    F[n_] := F[n] = Module[{A, B, K, Pairs, Pts}, A = Table[{j/n, 0}, {j, 0, n}]; B = Table[{0, j/n}, {j, 0, n}]; K = Table[{j/n, 1 - j/n}, {j, 0, n}]; Pairs = {Table[Table[{A[[i]], B[[j]]}, {i, 2, n+1}], {j, 2, n+1}], Table[Table[{A[[i]], K[[j]]}, {i, 1, n}], {j, 1, n}], Table[Table[ {B[[i]], K[[j]]}, {i, 1, n}], {j, 2, n+1}]} // Flatten[#, 2]&; Pts = Table[Table[Inter[Pairs[[i, 1]], Pairs[[i, 2]], Pairs[[j, 1]], Pairs[[j, 2]]], {j, 1, i-1}], {i, 2, Length[Pairs]}]; Flatten[Pts, 1] // Union // Length];
    Table[Print[n, " ", F[n]]; F[n], {n, 1, 20}] (* Jean-François Alcover, Apr 11 2019, after Robert Israel *)

Formula

a(n) = A274585(n) - 3n.

Extensions

a(1) = 0 prepended by Max Alekseyev, Jun 29 2016
a(4) corrected and a(6)-a(20) added by Cynthia Miaina Rasamimanananivo, Jun 28 2016
a(20) corrected by Robert Israel, Jun 30 2016
a(21)-a(50) from Cynthia Miaina Rasamimanananivo, Jun 30 - Aug 23, 2016
"Equilateral" added to definition by N. J. A. Sloane, May 13 2020

A367117 Place n points in general position on each side of an equilateral triangle, and join every pair of the 3*n+3 boundary points by a chord; sequence gives number of vertices in the resulting planar graph.

Original entry on oeis.org

3, 12, 72, 282, 795, 1818, 3612, 6492, 10827, 17040, 25608, 37062, 51987, 71022, 94860, 124248, 159987, 202932, 253992, 314130, 384363, 465762, 559452, 666612, 788475, 926328, 1081512, 1255422, 1449507, 1665270, 1904268, 2168112, 2458467, 2777052, 3125640, 3506058, 3920187, 4369962
Offset: 0

Views

Author

Keywords

Comments

"In general position" implies that the internal lines (or chords) only have simple intersections. There is no interior point where three or more chords meet.
Note that although the number of k-gons in the graph will vary as the edge points change position, the total number of regions will stay constant as long as all internal vertices remain simple.

Crossrefs

Cf. A367118 (regions), A367119 (edges).
If the boundary points are equally spaced, we get A274585, A092866, A274586, A092867. - N. J. A. Sloane, Nov 09 2023

Programs

Formula

Theorem: a(n) = (3/4)*(n+1)*(3*n^3+n^2+4).
a(n) = A367119(n) - A367118(n) + 1 by Euler's formula.

A367119 Place n points in general position on each side of an equilateral triangle, and join every pair of the 3*n+3 boundary points by a chord; sequence gives number of edges in the resulting planar graph.

Original entry on oeis.org

3, 24, 153, 588, 1635, 3708, 7329, 13128, 21843, 34320, 51513, 74484, 104403, 142548, 190305, 249168, 320739, 406728, 508953, 629340, 769923, 932844, 1120353, 1334808, 1578675, 1854528, 2165049, 2513028, 2901363, 3333060, 3811233, 4339104, 4920003, 5557368, 6254745, 7015788
Offset: 0

Views

Author

Keywords

Comments

"In general position" implies that the internal lines (or chords) only have simple intersections. There is no interior point where three or more chords meet.
See A367117 and A367118 for images of the triangle.

Crossrefs

Cf. A367117 (vertices), A367118 (regions), A091908, A092098, A331782, A366932.
If the boundary points are equally spaced, we get A274585, A092866, A274586, A092867. - N. J. A. Sloane, Nov 09 2023

Formula

Conjecture: a(n) = (3/2)*(3*n^4 + 4*n^3 + 3*n^2 + 4*n + 2).
a(n) = A367117 (n) + A367118 (n) - 1 by Euler's formula.

A367121 Place n points in general position on each side of a square, and join every pair of the 4*n+4 boundary points by a chord; sequence gives number of regions in the resulting planar graph.

Original entry on oeis.org

4, 67, 406, 1441, 3796, 8299, 15982, 28081, 46036, 71491, 106294, 152497, 212356, 288331, 383086, 499489, 640612, 809731, 1010326, 1246081, 1520884, 1838827, 2204206, 2621521, 3095476, 3630979, 4233142, 4907281, 5658916, 6493771, 7417774, 8437057, 9557956, 10787011, 12130966
Offset: 0

Views

Author

Keywords

Comments

"In general position" implies that the internal lines (or chords) only have simple intersections. There is no interior point where three or more chords meet.
Note that although the number of k-gons in the graph will vary as the edge points change position, the total number of regions will stay constant as long as all internal vertices remain simple.

Crossrefs

Cf. A334698 (vertices), A367122 (edges), A255011, A367118.

Formula

Conjecture: a(n) = (17/2)*n^4 + 19*n^3 + (43/2)*n^2 + 14*n + 4.
a(n) = A367122(n) - A334698(n+1) + 1 by Euler's formula.

A366253 Table read by antidiagonals: Place k points in general position on each side of a regular n-gon and join every pair of the n*(k+1) boundary points by a chord; T(n,k) (n >= 3, k >= 0) gives number of regions in the resulting planar graph.

Original entry on oeis.org

1, 13, 4, 82, 67, 11, 307, 406, 206, 24, 841, 1441, 1216, 489, 50, 1891, 3796, 4211, 2835, 995, 80, 3718, 8299, 10901, 9672, 5671, 1802, 154, 6637, 15982, 23536, 24780, 19139, 10196, 3052, 220, 11017, 28081, 44906, 53109, 48686, 34166, 17011, 4810, 375
Offset: 3

Views

Author

Keywords

Comments

"In general position" implies that the internal lines (or chords) formed from the n*k edge points only have simple intersections; there is no interior points where three or more such chords meet. Note that for even-n n-gons, with n>=6, the chords from the n corner points do create non-simple intersections.
Note that although the number of regions with a given number of edges in the graph will vary as the edge points change position, the total number of regions will stay constant as long as all internal vertices created from the edge-point chords remain simple.

Examples

			The table begins:
1, 13, 82, 307, 841, 1891, 3718, 6637, 11017, 17281, 25906, 37423, 52417,...
4, 67, 406, 1441, 3796, 8299, 15982, 28081, 46036, 71491, 106294, 152497,...
11, 206, 1216, 4211, 10901, 23536, 44906, 78341, 127711, 197426, 292436,...
24, 489, 2835, 9672, 24780, 53109, 100779, 175080, 284472, 438585, 648219,...
50, 995, 5671, 19139, 48686, 103825, 196295, 340061, 551314, 848471, 1252175,...
80, 1802, 10196, 34166, 86480, 183770, 346532, 599126, 969776, 1490570,...
154, 3052, 17011, 56611, 142696, 302374, 569017, 982261, 1588006, 2438416,...
220, 4810, 26705, 88495, 222400, 470270, 883585, 1523455, 2460620, 3775450,...
375, 7305, 40096, 132243, 331431, 699535, 1312620, 2260941, 3648943, 5595261,...
444, 10509, 57810, 190263, 475980, 1003269, 1880634, 3236775, 5220588, 8001165,...
781, 14938, 81082, 265747, 663391, 1396396, 2615068, 4497637, 7250257,...
952, 20335, 110439, 361354, 900844, 1894347, 3544975, 6093514, 9818424,...
1456, 27391, 147421, 480931, 1197076, 2514781, 4702741, 8079421, 13013056,...
1696, 35716, 192552, 627484, 1560352, 3275556, 6122056, 10513372,...
.
.
.
		

Crossrefs

Cf. A367118 (first row), A367121 (second row), A007678 (first column), A367183 (vertices), A367190 (edges).

Formula

T(n,k) = A367190(n,k) - A367183(n,k) + 1 by Euler's formula.
Conjectured:
T(3,k) = A367118(k) = (9/4)*k^4 + 3*k^3 + (15/4)*k^2 + 3*k + 1.
T(4,k) = A367121(k) = (17/2)*k^4 + 19*k^3 + (43/2)*k^2 + 14*k + 4.
T(5,k) = (45/2)*k^4 + 60*k^3 + 70*k^2 + (85/2)*k + 11.
T(6,k) = (195/4)*k^4 + (285/2)*k^3 + (687/4)*k^2 + 102*k + 24.
T(7,k) = (371/4)*k^4 + 287*k^3 + (1421/4)*k^2 + 210*k + 50.
T(8,k) = 161*k^4 + 518*k^3 + 655*k^2 + 388*k + 80.
T(9,k) = 261*k^4 + 864*k^3 + (2223/2)*k^2 + (1323/2)*k + 154.
T(10,k) = (1605/4)*k^4 + (2715/2)*k^3 + (7085/4)*k^2 + 1060*k + 220.
Showing 1-7 of 7 results.