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

A367118 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 regions in the resulting planar graph.

Original entry on oeis.org

1, 13, 82, 307, 841, 1891, 3718, 6637, 11017, 17281, 25906, 37423, 52417, 71527, 95446, 124921, 160753, 203797, 254962, 315211, 385561, 467083, 560902, 668197, 790201, 928201, 1083538, 1257607, 1451857, 1667791, 1906966, 2170993, 2461537, 2780317, 3129106, 3509731, 3924073, 4374067
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.

Crossrefs

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

Formula

Conjecture: a(n) = (1/4)*(9*n^4 + 12*n^3 + 15*n^2 + 12*n + 4).
a(n) = A367119(n) - A367117(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.

A334698 a(n) is the total number of points (both boundary and interior points) in the n-th figure shown in A255011 (meaning the figure with 4n points on the perimeter), where the interior points are counted with multiplicity.

Original entry on oeis.org

5, 58, 375, 1376, 3685, 8130, 15743, 27760, 45621, 70970, 105655, 151728, 211445, 287266, 381855, 498080, 639013, 807930, 1008311, 1243840, 1518405, 1836098, 2201215, 2618256, 3091925, 3627130, 4228983, 4902800, 5654101, 6488610, 7412255, 8431168, 9551685, 10780346, 12123895, 13589280, 15183653, 16914370, 18788991
Offset: 1

Views

Author

Keywords

Comments

An equivalent definition: Place n-1 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 vertices in the resulting planar graph. "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. - Scott R. Shannon and N. J. A. Sloane, Nov 05 2023
Equivalently, this is A334697(n) + 4*n.
This is an upper bound on A331449.

Crossrefs

For the "general position" version, see also A367121 (regions), A367122 (edges), and A367117.

Programs

  • Mathematica
    A334698[n_]:=n(17n^3-30n^2+19n+4)/2;Array[A334698,50] (* or *)
    LinearRecurrence[{5,-10,10,-5,1},{5,58,375,1376,3685},50] (* Paolo Xausa, Nov 14 2023 *)
  • PARI
    Vec(x*(5 + 33*x + 135*x^2 + 31*x^3) / (1 - x)^5 + O(x^40)) \\ Colin Barker, May 31 2020

Formula

Theorem: a(n) = n*(17*n^3-30*n^2+19*n+4)/2.
From Colin Barker, May 27 2020: (Start)
G.f.: x*(5 + 33*x + 135*x^2 + 31*x^3) / (1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>5.
(End)
a(n+1) = A367122(n) - A367121(n) + 1 by Euler's formula.

Extensions

Edited by N. J. A. Sloane, Nov 13 2023

A367183 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 vertices in the resulting planar graph.

Original entry on oeis.org

3, 12, 5, 72, 58, 10, 282, 375, 185, 19, 795, 1376, 1155, 451, 42, 1818, 3685, 4090, 2734, 938, 57, 3612, 8130, 10700, 9478, 5523, 1711, 135, 6492, 15743, 23235, 24463, 18858, 9981, 2943, 171, 10827, 27760, 44485, 52639, 48230, 33771, 16740, 4646, 341
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.

Examples

			The table begins:
3, 12, 72, 282, 795, 1818, 3612, 6492, 10827, 17040, 25608, 37062, 51987,...
5, 58, 375, 1376, 3685, 8130, 15743, 27760, 45621, 70970, 105655, 151728,...
10, 185, 1155, 4090, 10700, 23235, 44485, 77780, 126990, 196525, 291335,...
19, 451, 2734, 9478, 24463, 52639, 100126, 174214, 283363, 437203, 646534,...
42, 938, 5523, 18858, 48230, 103152, 195363, 338828, 549738, 846510, 1249787,...
57, 1711, 9981, 33771, 85849, 182847, 345261, 597451, 967641, 1487919, 2194237,...
135, 2943, 16740, 56106, 141885, 301185, 567378, 980100, 1585251, 2434995,...
171, 4646, 26336, 87831, 221351, 468746, 881496, 1520711, 2457131, 3771126,...
341, 7128, 39666, 131450, 330165, 697686, 1310078, 2257596, 3644685, 5589980,...
313, 10204, 57199, 189214, 474361, 1000948, 1877479, 3232654, 5215369, 7994716,...
728, 14677, 80457, 264602, 661570, 1393743, 2611427, 4492852, 7244172,...
771, 19909, 109586, 359892, 898591, 1891121, 3540594, 6087796, 9811187,...
1380, 27030, 146565, 479370, 1194600, 2511180, 4697805, 8072940, 13004820,...
1393, 35085, 191353, 625477, 1557297, 3271213, 6116185, 10505733,......
.
.
.
		

Crossrefs

Cf. A367117 (first row), A334698 (second row), A007569 (first column), A366253 (regions), A367190 (edges).

Formula

T(n,k) = A367190(n,k) - A366253(n,k) + 1 by Euler's formula.
T(3,k) = A367117(k) = (9/4)*k^4 + 3*k^3 + (3/4)*k^2 + 3*k + 3.
Conjectured:
T(4,k) = A334698(k+1) = (17/2)*k^4 + 19*k^3 + (31/2)*k^2 + 10*k + 5.
T(5,k) = (45/2)*k^4 + 60*k^3 + 60*k^2 + (65/2)*k + 10.
T(6,k) = (195/4)*k^4 + (285/2)*k^3 + (627/4)*k^2 + 84*k + 19.
T(7,k) = (371/4)*k^4 + 287*k^3 + (1337/4)*k^2 + 182*k + 42.
T(8,k) = 161*k^4 + 518*k^3 + 627*k^2 + 348*k + 57.
T(9,k) = 261*k^4 + 864*k^3 + (2151/2)*k^2 + (1215/2)*k + 135.
T(10,k) = (1605/4)*k^4 + (2715/2)*k^3 + (6905/4)*k^2 + 990*k + 171.
Showing 1-7 of 7 results.