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.

Previous Showing 21-28 of 28 results.

A355841 Irregular table read by rows: T(n,k) is the number of k-sided polygons formed, for k>=3, in a square when straight line segments connect the n+1 points along each edge that divide it into n equal parts to the n+1 points on the edge on the opposite side of the square.

Original entry on oeis.org

4, 40, 128, 44, 12, 320, 152, 24, 616, 512, 84, 28, 1240, 744, 120, 40, 1936, 1928, 372, 136, 8, 3288, 2656, 616, 160, 4960, 4500, 1020, 332, 48, 7224, 6472, 1424, 392, 16, 9760, 11064, 2564, 824, 72, 16, 14144, 12424, 2696, 856, 32, 18312, 20604, 5308, 1468, 328, 16, 24384, 25392, 5968, 1584, 160, 8
Offset: 1

Views

Author

Scott R. Shannon, Jul 18 2022

Keywords

Comments

This sequence is similar to A355801 but here the corner vertices of the square are also connected to points on the opposite edge.
Up to n = 50 the maximum sided k-gon created is the 8-gon. It is plausible this is the maximum sided k-gon for all n, although this is unknown.
See A355838 for more images of the square.

Examples

			The table begins:
4;
40;
128,   44,    12;
320,   152,   24;
616,   512,   84,    28;
1240,  744,   120,   40;
1936,  1928,  372,   136,  8;
3288,  2656,  616,   160;
4960,  4500,  1020,  332,  48;
7224,  6472,  1424,  392,  16;
9760,  11064, 2564,  824,  72,  16;
14144, 12424, 2696,  856,  32;
18312, 20604, 5308,  1468, 328, 16;
24384, 25392, 5968,  1584, 160, 8;
31816, 32768, 7564,  2652, 240, 16;
40456, 42240, 10384, 3064, 248, 24;
49384, 59152, 15068, 4680, 704, 64;
.
.
		

Crossrefs

Cf. A355838 (regions), A355839 (vertices), A355840 (edges), A355801 (without corner vertices), A290131, A331452, A335678.

A359692 Number of regions in a regular drawing of a complete bipartite graph where the vertex positions on each part equal the Farey series of order n.

Original entry on oeis.org

2, 12, 94, 382, 2486, 4946, 24100, 53152, 138158, 233254, 700720, 999364, 2559344, 3785044, 6027148, 9210820
Offset: 1

Views

Author

Keywords

Comments

The number of vertices along each edge is A005728(n). No formula for a(n) is known.

Crossrefs

Cf. A359690 (vertices), A359691 (crossings), A359693 (edges), A359694 (k-gons), A005728, A290131, A359653, A358886, A358882, A006842, A006843.

Formula

a(n) = A359693(n) - A359690(n) + 1 by Euler's formula.

A331771 a(n) = Sum_{-n

Original entry on oeis.org

0, 12, 56, 172, 400, 836, 1496, 2564, 4080, 6212, 8984, 12788, 17488, 23644, 31112, 40148, 50912, 64172, 79448, 97868, 118912, 143108, 170504, 202500, 238080, 278700, 323864, 374508, 430272, 493380, 561832, 638692, 722656, 814604, 914360, 1023428
Offset: 1

Views

Author

N. J. A. Sloane, Feb 08 2020

Keywords

Comments

a(n) = 8*A332612(n)+4*n*(n-1)+4*(n-1)^2. Also adding 2 to the terms of the present sequence gives (essentially) A114146. - N. J. A. Sloane, Mar 14 2020

References

  • Koplowitz, Jack, Michael Lindenbaum, and A. Bruckstein. "The number of digital straight lines on an N* N grid." IEEE Transactions on Information Theory 36.1 (1990): 192-197. (See I(n).)

Crossrefs

When divided by 4 this becomes A115005, so this is a ninth sequence to add to the following list.
The following eight sequences are all essentially the same. The simplest is A115004(n), which we denote by z(n). Then A088658(n) = 4*z(n-1); A114043(n) = 2*z(n-1)+2*n^2-2*n+1; A114146(n) = 2*A114043(n); A115005(n) = z(n-1)+n*(n-1); A141255(n) = 2*z(n-1)+2*n*(n-1); A290131(n) = z(n-1)+(n-1)^2; A306302(n) = z(n)+n^2+2*n.
Cf. A332612.

Programs

  • Maple
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    [seq(VR(n,n,1),n=1..50)];
  • Mathematica
    a[n_] := Sum[Boole[GCD[i, j] == 1] (n - Abs[i]) (n - Abs[j]), {i, -n + 1, n - 1}, {j, -n + 1, n - 1}];
    Array[a, 36] (* Jean-François Alcover, Apr 19 2020 *)
  • Python
    from sympy import totient
    def A331771(n): return 4*((n-1)*(2*n-1)+sum(totient(i)*(n-i)*(2*n-i) for i in range(2,n))) # Chai Wah Wu, Aug 17 2021

Formula

a(n) = 4 * A115005(n).
a(n) = 4*((n-1)*(2n-1)+Sum_{i=2..n-1} (n-i)*(2*n-i)*phi(i)). - Chai Wah Wu, Aug 17 2021

A369175 Number of regions in a graph of n adjacent rectangles in a row with all possible diagonals drawn, as in A306302, but without the rectangles' edges which are perpendicular to the row.

Original entry on oeis.org

2, 12, 36, 86, 180, 330, 570, 918, 1408, 2058, 2946, 4054, 5502, 7278, 9430, 12006, 15174, 18846, 23268, 28338, 34172, 40806, 48546, 57174, 67022, 78006, 90324, 103910, 119276, 135978, 154722, 175226, 197686, 222098, 248790, 277462, 309050, 343086, 379858, 419182, 462106, 507678
Offset: 1

Views

Author

Scott R. Shannon, Jan 15 2024

Keywords

Crossrefs

Cf. A369176 (vertices), A369177 (edges), A369178 (k-gons), A306302, A306302, A368755, A290131.

Formula

a(n) = A369177(n) - A369176(n) + 1 by Euler's formula.

A332612 a(n) = Sum_{ i=2..n-1, j=1..i-1, gcd(i,j)=1 } (n-i)*(n-j).

Original entry on oeis.org

0, 0, 2, 11, 32, 77, 148, 268, 442, 691, 1018, 1472, 2036, 2780, 3686, 4786, 6100, 7724, 9598, 11863, 14454, 17437, 20818, 24772, 29172, 34200, 39794, 46071, 52986, 60817, 69314, 78860, 89292, 100720, 113122, 126686, 141244, 157294, 174566, 193228, 213172, 234954, 258058, 283189, 309946, 338473, 368782, 401516, 436040
Offset: 1

Views

Author

Keywords

Comments

Related to the number of linear dichotomies on a square grid.
A331771(n) = 8*a(n) + 4*n*(n-1) + 4*(n-1)^2.

Crossrefs

The following eight sequences are all essentially the same. The simplest is A115004(n), which we denote by z(n). Then A088658(n) = 4*z(n-1); A114043(n) = 2*z(n-1)+2*n^2-2*n+1; A114146(n) = 2*A114043(n); A115005(n) = z(n-1)+n*(n-1); A141255(n) = 2*z(n-1)+2*n*(n-1); A290131(n) = z(n-1)+(n-1)^2; A306302(n) = z(n)+n^2+2*n. The present sequence and A331771 could be added to this list.

Programs

  • Maple
    I1 := proc(n) local a, i, j; a:=0;
    for i from 2 to n-1 do for j from 1 to i-1 do
    if igcd(i,j)=1 then a := a+(n-i)*(n-j); fi; od; od; a; end;
    [seq(I1(n),n=1..40)];
  • PARI
    a(n) = sum(i=2, n-1, sum(j=1, i-1, if (gcd(i,j)==1, (n-i)*(n-j)))); \\ Michel Marcus, Mar 14 2020
    
  • Python
    from sympy import totient
    def A332612(n): return sum(totient(i)*(n-i)*(2*n-i) for i in range(2,n))//2 # Chai Wah Wu, Aug 17 2021

Formula

a(n) = (Sum_{i=2..n-1} (n-i)*(2n-i)*phi(i))/2. - Chai Wah Wu, Aug 17 2021

A356790 Table read by antidiagonals: T(n,k) (n >= 1, k >= 1) is the number of regions formed by straight line segments when connecting the k-1 points along the top side of a rectangle to each of the k-1 points along the bottom side that divide these sides into k equal parts, along with straight lines that directly connect the n-1 points along the left side to the diametrically opposite point on the right side that divide these sides into n equal parts.

Original entry on oeis.org

1, 2, 2, 6, 4, 3, 18, 10, 6, 4, 48, 24, 16, 8, 5, 106, 56, 34, 20, 10, 6, 216, 116, 70, 44, 26, 12, 7, 382, 228, 134, 84, 58, 30, 14, 8, 650, 396, 250, 152, 112, 60, 36, 16, 9, 1030, 666, 422, 272, 190, 112, 78, 40, 18, 10, 1564, 1048, 696, 448, 320, 196, 150, 84, 46, 20, 11
Offset: 1

Views

Author

Keywords

Examples

			The table begins:
1,  2,  6,  18,  48,  106, 216, 382, 650,  1030, 1564, 2258, 3210, 4386, 5926, ...
2,  4,  10, 24,  56,  116, 228, 396, 666,  1048, 1584, 2280, 3234, 4412, 5954, ...
3,  6,  16, 34,  70,  134, 250, 422, 696,  1082, 1622, 2322, 3280, 4462, 6008, ...
4,  8,  20, 44,  84,  152, 272, 448, 726,  1116, 1660, 2364, 3326, 4512, 6062, ...
5,  10, 26, 58,  112, 190, 320, 506, 794,  1194, 1748, 2462, 3434, 4630, 6190, ...
6,  12, 30, 60,  112, 196, 326, 512, 800,  1200, 1754, 2468, 3440, 4636, 6196, ...
7,  14, 36, 78,  150, 258, 418, 626, 936,  1358, 1934, 2670, 3664, 4882, 6464, ...
8,  16, 40, 84,  152, 256, 414, 632, 942,  1364, 1940, 2676, 3670, 4888, 6470, ...
9,  18, 46, 94,  172, 290, 468, 710, 1050, 1490, 2084, 2838, 3850, 5086, 6686, ...
10, 20, 50, 104, 188, 304, 480, 720, 1060, 1516, 2112, 2868, 3882, 5120, 6722, ...
11, 22, 56, 118, 218, 366, 586, 878, 1280, 1794, 2454, 3258, 4320, 5606, 7256, ...
12, 24, 60, 120, 208, 336, 518, 764, 1114, 1580, 2204, 2992, 4020, 5272, 6888, ...
.
.
See the attached table for further terms.
		

Crossrefs

Formula

T(1,k) = A306302(k-2) + 2, k >= 2.
T(2,k) = 2*A355902(k-2) + 4 = A306302(k-2) + 2*k, k >= 2.
T(n,1) = n.
T(n,2) = 2n.
T(n,3) = A146951(n).

A355902 Start with a 2 X n array of squares, join every vertex on top edge to every vertex on bottom edge; a(n) = one-half the number of cells.

Original entry on oeis.org

0, 3, 10, 26, 56, 112, 196, 331, 522, 790, 1138, 1615, 2204, 2975, 3910, 5041, 6388, 8047, 9958, 12262, 14894, 17920, 21346, 25347, 29796, 34875, 40522, 46854, 53826, 61716, 70274, 79883, 90380, 101875, 114346, 127981, 142612, 158737, 176086, 194827, 214852, 236717, 259906, 285124, 311970, 340588, 370990, 403819, 438440, 475556
Offset: 0

Views

Author

Keywords

Comments

Note that this figure can be obtained by drawing an "equatorial" line through the middle of the strip of n adjacent rectangles in A306302. This cuts each of the 2n "equatorial" cells in A306302 in two. It follows that 2*a(n) = A306302(n) + 2*n, i.e. that a(n) = A306302(n)/2 + n. Note that there is an explicit formula for A306302(n) in terms of n. - Scott R. Shannon, Sep 06 2022.
This means the present sequence is one more member of the large class of sequences which are essentially the same as A115004 (see Cross-References). - N. J. A. Sloane, Sep 06 2022

Crossrefs

The following nine sequences are all essentially the same. The simplest is A115004(n), which we denote by z(n). Then A088658(n) = 4*z(n-1); A114043(n) = 2*z(n-1)+2*n^2-2*n+1; A114146(n) = 2*A114043(n); A115005(n) = z(n-1)+n*(n-1); A141255(n) = 2*z(n-1)+2*n*(n-1); A290131(n) = z(n-1)+(n-1)^2; A306302(n) = z(n)+n^2+2*n; A355902(n) = n + A306302(n)/2. - N. J. A. Sloane, Sep 06 2022

Formula

a(n) = A356790(2,n+2)/2 - 2.

A334224 Consider a graph as defined in A306302 formed from a row of n adjacent congruent squares with the diagonals of all possible rectangles; a(n) is the minimum edge length of the squares such that the vertices formed by all intersections have integer x and y coordinates.

Original entry on oeis.org

2, 6, 60, 420, 2520, 27720, 360360, 360360, 12252240, 232792560, 232792560, 5354228880, 26771144400, 80313433200, 2329089562800, 72201776446800, 144403552893600, 144403552893600, 5342931457063200
Offset: 1

Views

Author

Keywords

Examples

			a(1) = 2 as for a single square, with its bottom left corner at the origin, with both diagonals drawn the intersection point of those lines is at (L/2,L/2) where L is the edge length. Thus L=2 for this to have integer coordinates.
a(2) = 6 as for two vertically adjacent squares the seven intersection points of the diagonals and shared internal edge have coordinates (L/3,4L/3),(L/2,3L/2),(2L/3,4L/3),(L/2,L),(L/3,2L/3),(L/2,L/2),(2L/3,2L/3). Thus L=6, the lowest common multiple of the denominators, for all these points to have integer coordinates.
		

Crossrefs

Formula

a(n) = A003418(2n-1) = A076100(n) for n>1.
Previous Showing 21-28 of 28 results.