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

A337640 a(n) = one-half of the number of cells in the central rectangle of the graph described in row 2n+1 of A333288.

Original entry on oeis.org

2, 11, 35, 80, 155, 266, 422, 626, 890, 1223, 1625, 2108, 2678, 3341, 4109, 4988, 5990, 7106, 8348, 9734, 11264, 12953, 14801, 16820, 19019, 21389, 23957, 26717, 29663, 32834, 36230, 39860, 43712, 47795, 52139, 56726, 61598, 66746, 72152, 77837
Offset: 0

Views

Author

N. J. A. Sloane, Sep 17 2020

Keywords

Comments

This is based on Lars Blomberg's data in A333288.
A333288 is a triangular array read by rows. a(n) is the central term in row 2n+1 of that triangle, divided by 2.
See A331452 for further illustrations.
It would be nice to have a formula for this sequence. It is possible that focusing on the points (n, a(n)) where 2n+1 is a prime might lead to a simpler formula.

Crossrefs

A331452 Triangle read by rows: T(n,m) (n >= m >= 1) = number of regions (or cells) formed by drawing the line segments connecting any two of the 2*(m+n) perimeter points of an m X n grid of squares.

Original entry on oeis.org

4, 16, 56, 46, 142, 340, 104, 296, 608, 1120, 214, 544, 1124, 1916, 3264, 380, 892, 1714, 2820, 4510, 6264, 648, 1436, 2678, 4304, 6888, 9360, 13968, 1028, 2136, 3764, 6024, 9132, 12308, 17758, 22904, 1562, 3066, 5412, 8126, 12396, 16592, 23604, 29374, 38748, 2256, 4272, 7118, 10792, 16226, 20896, 29488, 36812, 47050, 58256
Offset: 1

Views

Author

Keywords

Comments

Take a grid of m+1 X n+1 points. There are 2*(m+n) points on the perimeter. Join every pair of the perimeter points by a line segment. The lines do not extend outside the grid. T(m,n) is the number of regions formed by these lines, and A331453(m,n) and A331454(m,n) give the number of vertices and the number of line segments respectively.
A288187 is a similar sequence, except there every pair of the (m+1)*(n+1) points of the grid (including the interior points) are joined by line segments. The (m,1) (m>=1) and (2,2) entries here and in A288187 are the same, while all other entries are different.

Examples

			Triangle begins:
     4;
    16,   56;
    46,  142,  340;
   104,  296,  608,  1120;
   214,  544, 1124,  1916,  3264;
   380,  892, 1714,  2820,  4510,  6264;
   648, 1436, 2678,  4304,  6888,  9360, 13968;
  1028, 2136, 3764,  6024,  9132, 12308, 17758, 22904;
  1562, 3066, 5412,  8126, 12396, 16592, 23604, 29374, 38748;
  2256, 4272, 7118, 10792, 16226, 20896, 29488, 36812, 47050, 58256;
  ...
		

References

  • Lars Blomberg, Scott R. Shannon, and N. J. A. Sloane, Graphical Enumeration and Stained Glass Windows, 1: Rectangular Grids, Integers, Ron Graham Memorial Volume 21A (2021), #A5. Also in book, "Number Theory and Combinatorics: A Collection in Honor of the Mathematics of Ronald Graham", ed. B. M. Landman et al., De Gruyter, 2022, pp. 65-97.
  • Lars Blomberg, Scott R. Shannon, and N. J. A. Sloane, Graphical Enumeration and Stained Glass Windows, 1: Rectangular Grids, Integers, Ron Graham Memorial Volume 21A (2021), #A5. Also in book, "Number Theory and Combinatorics: A Collection in Honor of the Mathematics of Ronald Graham", ed. B. M. Landman et al., De Gruyter, 2022, pp. 65-97.

Crossrefs

The first column is A306302, the main diagonal is A255011.
The second column is A331766.
See A333274 for the classification of vertices by valency.

A306302 Number of regions into which a figure made up of a row of n adjacent congruent rectangles is divided upon drawing diagonals of all possible rectangles (a(0)=0 by convention).

Original entry on oeis.org

0, 4, 16, 46, 104, 214, 380, 648, 1028, 1562, 2256, 3208, 4384, 5924, 7792, 10052, 12744, 16060, 19880, 24486, 29748, 35798, 42648, 50648, 59544, 69700, 80992, 93654, 107596, 123374, 140488, 159704, 180696, 203684, 228624, 255892, 285152, 317400, 352096, 389576
Offset: 0

Views

Author

Paarth Jain, Feb 05 2019

Keywords

Comments

Assuming that the rectangles have vertices at (k,0) and (k,1), k=0..n, the projective map (x,y) -> ((1-y)/(x+1),y/(x+1)) maps their partition to the partition of the right isosceles triangle described by Alekseyev et al. (2015), for which Theorem 13 gives the number of regions, line segments, and intersection points. - Max Alekseyev, Apr 10 2019
The figure is made up of A324042 triangles and A324043 quadrilaterals. - N. J. A. Sloane, Mar 03 2020

Crossrefs

See A331755 for the number of vertices, A331757 for the number of edges.
A column of A288187. See A288177 for additional references.
Also a column of A331452 and A356790.
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. - N. J. A. Sloane, Feb 04 2020

Programs

  • Maple
    # Maple from N. J. A. Sloane, Mar 04 2020, starting at n=1:  First define z(n) = A115004
    z := proc(n)
        local a, b, r ;
        r := 0 ;
        for a from 1 to n do
        for b from 1 to n do
            if igcd(a, b) = 1 then
                r := r+(n+1-a)*(n+1-b);
            end if;
        end do:
        end do:
        r ;
    end proc:
    a := n-> z(n)+n^2+2*n;
    [seq(a(n), n=1..50)];
  • Mathematica
    z[n_] := Sum[(n - i + 1)(n - j + 1) Boole[GCD[i, j] == 1], {i, n}, {j, n}];
    a[0] = 0;
    a[n_] := z[n] + n^2 + 2n;
    a /@ Range[0, 40] (* Jean-François Alcover, Mar 24 2020 *)
  • Python
    from sympy import totient
    def A306302(n): return 2*n*(n+1) + sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(2,n+1)) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = n + (A114043(n+1) - 1)/2, conjectured by N. J. A. Sloane, Feb 07 2019; proved by Max Alekseyev, Apr 10 2019
a(n) = n + A115005(n+1) = n + A141255(n+1)/2. - Max Alekseyev, Apr 10 2019
a(n) = A324042(n) + A324043(n). - Jinyuan Wang, Mar 19 2020
a(n) = Sum_{i=1..n, j=1..n, gcd(i,j)=1} (n+1-i)*(n+1-j) + n^2 + 2*n. - N. J. A. Sloane, Apr 11 2020
a(n) = 2n(n+1) + Sum_{i=2..n} (n+1-i)*(2n+2-i)*phi(i). - Chai Wah Wu, Aug 16 2021

Extensions

a(6)-a(20) from Robert Israel, Feb 07 2019
Edited and more terms added by Max Alekseyev, Apr 10 2019
a(0) added by N. J. A. Sloane, Feb 04 2020

A324043 Number of quadrilateral regions into which a figure made up of a row of n adjacent congruent rectangles is divided upon drawing diagonals of all possible rectangles.

Original entry on oeis.org

0, 2, 14, 34, 90, 154, 288, 462, 742, 1038, 1512, 2074, 2904, 3774, 4892, 6154, 7864, 9662, 12022, 14638, 17786, 20998, 25024, 29402, 34672, 40038, 46310, 53038, 61090, 69454, 79344, 89890, 101792, 113854, 127476, 141866, 158428, 175182, 193760, 213274, 235444, 258182, 283858, 310750, 339986
Offset: 1

Views

Author

Jinyuan Wang, May 01 2019

Keywords

Comments

A row of n adjacent congruent rectangles can only be divided into triangles (cf. A324042) or quadrilaterals when drawing diagonals. Proof is given in Alekseyev et al. (2015) under the transformation described in A306302.

Examples

			For k adjacent congruent rectangles, the number of quadrilateral regions in the j-th rectangle is:
k\j|  1   2   3   4   5   6   7  ...
---+--------------------------------
1  |  0,  0,  0,  0,  0,  0,  0, ...
2  |  1,  1,  0,  0,  0,  0,  0, ...
3  |  3,  8,  3,  0,  0,  0,  0, ...
4  |  5, 12, 12,  5,  0,  0,  0, ...
5  |  7, 22, 32, 22,  7,  0,  0, ...
6  |  9, 28, 40, 40, 28,  9,  0, ...
7  | 11, 38, 58, 74, 58, 38, 11, ...
...
a(4) = 5 + 12 + 12 + 5 = 34.
		

Crossrefs

Programs

  • Maple
    See Robert Israel link.
    There are also Maple programs for both A306302 and A324042. Then a := n -> A306302(n) - A324042(n); # N. J. A. Sloane, Mar 04 2020
  • Mathematica
    Table[Sum[Sum[(Boole[GCD[i, j] == 1] - 2 * Boole[GCD[i, j] == 2]) * (n + 1 - i) * (n + 1 - j), {j, 1, n}], {i, 1, n}] - n^2, {n, 1, 45}] (* Joshua Oliver, Feb 05 2020 *)
  • PARI
    { A324043(n) = sum(i=1, n, sum(j=1, n, ( (gcd(i, j)==1) - 2*(gcd(i,j)==2) ) * (n+1-i) * (n+1-j) )) - n^2; } \\ Max Alekseyev, Jul 08 2019
    
  • Python
    from sympy import totient
    def A324043(n): return 0 if n==1 else -2*(n-1)**2 + sum(totient(i)*(n+1-i)*(7*i-2*n-2) for i in range(2,n//2+1)) + sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(n//2+1,n+1)) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = A115005(n+1) - A177719(n+1) - n - 1 = Sum_{i,j=1..n; gcd(i,j)=1} (n+1-i)*(n+1-j) - 2*Sum_{i,j=1..n; gcd(i,j)=2} (n+1-i)*(n+1-j) - n^2. - Max Alekseyev, Jul 08 2019
a(n) = A306302(n) - A324042(n).
For n>1, a(n) = -2(n-1)^2 + Sum_{i=2..floor(n/2)} (n+1-i)*(7i-2n-2)*phi(i) + Sum_{i=floor(n/2)+1..n} (n+1-i)*(2n+2-i)*phi(i). - Chai Wah Wu, Aug 16 2021

Extensions

a(8)-a(23) from Robert Israel, Jul 07 2019
Terms a(24) onward from Max Alekseyev, Jul 08 2019

A324042 Number of triangular regions into which a figure made up of a row of n adjacent congruent rectangles is divided upon drawing diagonals of all possible rectangles.

Original entry on oeis.org

4, 14, 32, 70, 124, 226, 360, 566, 820, 1218, 1696, 2310, 3020, 4018, 5160, 6590, 8196, 10218, 12464, 15110, 18012, 21650, 25624, 30142, 35028, 40954, 47344, 54558, 62284, 71034, 80360, 90806, 101892, 114770, 128416, 143286, 158972, 176914, 195816, 216350, 237908, 261546, 286304, 313102, 341100
Offset: 1

Views

Author

Jinyuan Wang, May 01 2019

Keywords

Comments

A row of n adjacent congruent rectangles can only be divided into triangles or quadrilaterals when drawing diagonals. A proof is given in Alekseyev et al. (2015) using the mapping to a dissection of a a right isosceles triangle described in A306302.

Examples

			For k adjacent congruent rectangles, the number of triangular regions in the j-th rectangle is:
k\j|  1   2   3   4   5   6   7  ...
---+--------------------------------
1  |  4,  0,  0,  0,  0,  0,  0, ...
2  |  7,  7,  0,  0,  0,  0,  0, ...
3  |  9, 14,  9,  0,  0,  0,  0, ...
4  | 11, 24, 24, 11,  0,  0,  0, ...
5  | 13, 30, 38, 30, 13,  0,  0, ...
6  | 15, 38, 60, 60, 38, 15,  0, ...
7  | 17, 44, 76, 86, 76, 44, 17, ...
...
a(4) = 11 + 24 + 24 + 11 = 70.
		

Crossrefs

Programs

  • Maple
    V := proc(m,n,q) local a,i,j; a:=0;
    for i from 1 to m do for j from 1 to n do
    if gcd(i,j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end;
    a := n -> 2*( n*(n+1) + V(n,n,2) );
    [seq(a(n), n=1..30)]; # N. J. A. Sloane, Mar 04 2020
    See also Robert Israel link.
  • Mathematica
    Table[2 * (n^2 + n + Sum[Sum[Boole[GCD[i, j] == 2] * (n + 1 - i) * (n + 1 - j), {j, 1, n}], {i, 1, n}]), {n, 1, 45}]  (* Joshua Oliver, Feb 05 2020 *)
  • PARI
    { A324042(n) = 2*((n+1)*n + sum(i=1, n, sum(j=1, n, (gcd(i, j)==2)*(n+1-i)*(n+1-j))) ); } \\ Max Alekseyev, Jul 08 2019
    
  • Python
    from sympy import totient
    def A324042(n): return 2*(2*n**2-n+1 + 2*sum(totient(i)*(n+1-2*i)*(n+1-i) for i in range(2,n//2+1))) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = A177719(n+1) + 2*(n+1) = 2 * ( (n+1)*n + Sum_{i,j=1..n; gcd(i,j)=2} (n+1-i)*(n+1-j) ). - Max Alekseyev, Jul 08 2019
a(n) = A306302(n) - A324043(n).
a(n) = 2*(2*n^2-n+1+2*Sum_{i=2..floor(n/2)} (n+1-2*i)*(n+1-i)*phi(i)). - Chai Wah Wu, Aug 16 2021

Extensions

a(8)-a(23) from Robert Israel, Jul 07 2019
Terms a(24) onward from Max Alekseyev, Jul 08 2019

A333286 Triangle read by rows: consider a figure made up of a row of n congruent rectangles and the diagonals of all visible rectangles; T(n,k) (1 <= k <= n) is the number of triangular regions in the k-th rectangle.

Original entry on oeis.org

4, 7, 7, 9, 14, 9, 11, 24, 24, 11, 13, 30, 38, 30, 13, 15, 38, 60, 60, 38, 15, 17, 44, 76, 86, 76, 44, 17, 19, 52, 92, 120, 120, 92, 52, 19, 21, 58, 106, 146, 158, 146, 106, 58, 21, 23, 66, 126, 178, 216, 216, 178, 126, 66, 23, 25, 72, 142, 206, 264, 278
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2020

Keywords

Comments

This was originally based on the data in Jinyuan Wang's A324042, and then extended by Lars Blomberg.
It would be nice to have a formula for these entries. It is easy to see that the first column is 2n+3 for n>1.

Examples

			Triangle begins:
4,
7,  7,
9, 14,  9,
11, 24, 24, 11,
13, 30, 38, 30, 13,
15, 38, 60, 60, 38, 15,
17, 44, 76, 86, 76, 44, 17,
...
		

Crossrefs

Extensions

a(29) and beyond from Lars Blomberg, Apr 23 2020

A333287 Triangle read by rows: consider a figure made up of a row of n congruent rectangles and the diagonals of all visible rectangles; T(n,k) (1 <= k <= n) is the number of quadrilateral regions in the k-th rectangle.

Original entry on oeis.org

0, 1, 1, 3, 8, 3, 5, 12, 12, 5, 7, 22, 32, 22, 7, 9, 28, 40, 40, 28, 9, 11, 38, 58, 74, 58, 38, 11, 13, 46, 74, 98, 98, 74, 46, 13, 15, 58, 92, 130, 152, 130, 92, 58, 15, 17, 68, 104, 150, 180, 180, 150, 104, 68, 17, 19, 82, 124, 180, 224, 254, 224, 180, 124, 82, 19
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2020

Keywords

Comments

This was originally based on the data in Jinyuan Wang's A324042, and then extended by Lars Blomberg.
It would be nice to have a formula for these entries. It is easy to see that the first column is 2n-3 for n>1.

Examples

			Triangle begins:
0,
1,  1,
3,  8,  3,
5, 12, 12,  5,
7, 22, 32, 22,  7,
9, 28, 40, 40, 28,  9,
11, 38, 58, 74, 58, 38, 11,
...
		

Crossrefs

Extensions

a(29) and beyond from Lars Blomberg, Apr 23 2020

A335056 Triangle read by rows: consider a figure made up of a row of n congruent rectangles and the diagonals of all possible rectangles; T(n,k) (1 <= k <= n) is the number of vertices inside the k-th rectangle.

Original entry on oeis.org

1, 3, 3, 5, 11, 5, 7, 19, 19, 7, 9, 29, 43, 29, 9, 11, 37, 61, 61, 37, 11, 13, 47, 83, 105, 83, 47, 13, 15, 57, 103, 143, 143, 103, 57, 15, 17, 69, 125, 183, 211, 183, 125, 69, 17, 19, 81, 143, 215, 267, 267, 215, 143, 81, 19, 21, 95, 167, 253, 329, 369, 329, 253, 167, 95, 21, 23, 109, 189, 289, 385, 455, 455, 385, 289, 189, 109, 23
Offset: 1

Views

Author

Keywords

Comments

The terms are from numeric computation - no formula for a(n) is currently known.

Examples

			Triangle begins:
1;
3, 3;
5, 11, 5;
7, 19, 19, 7;
9, 29, 43, 29, 9;
11, 37, 61, 61, 37, 11;
13, 47, 83, 105, 83, 47, 13;
15, 57, 103, 143, 143, 103, 57, 15;
17, 69, 125, 183, 211, 183, 125, 69, 17;
19, 81, 143, 215, 267, 267, 215, 143, 81, 19;
21, 95, 167, 253, 329, 369, 329, 253, 167, 95, 21;
23, 109, 189, 289, 385, 455, 455, 385, 289, 189, 109, 23;
25, 125, 215, 331, 451, 551, 597, 551, 451, 331, 215, 125, 25;
		

Crossrefs

Formula

Row sum n + Row sum A335074(n) = A159065(n).

A335074 Triangle read by rows: consider a figure made up of a row of n congruent rectangles and the diagonals of all possible rectangles; T(n,k) (1 <= k <= n-1) is the number of vertices on the edge separating rectangles k and k+1.

Original entry on oeis.org

1, 3, 3, 5, 3, 5, 7, 7, 7, 7, 9, 9, 7, 9, 9, 11, 13, 11, 11, 13, 11, 13, 15, 17, 11, 17, 15, 13, 15, 19, 19, 19, 19, 19, 19, 15, 17, 21, 25, 21, 19, 21, 25, 21, 17, 19, 25, 29, 29, 23, 23, 29, 29, 25, 19, 21, 27, 33, 33, 33, 23, 33, 33, 33, 27, 21, 23, 31, 37, 39, 39, 35, 35, 39, 39, 37, 31, 23
Offset: 2

Views

Author

Keywords

Comments

The terms are from numeric computation - no formula for a(n) is currently known.

Examples

			Triangle begins:
1;
3, 3;
5, 3, 5;
7, 7, 7, 7;
9, 9, 7, 9, 9;
11, 13, 11, 11, 13, 11;
13, 15, 17, 11, 17, 15, 13;
15, 19, 19, 19, 19, 19, 19, 15;
17, 21, 25, 21, 19, 21, 25, 21, 17;
19, 25, 29, 29, 23, 23, 29, 29, 25, 19;
21, 27, 33, 33, 33, 23, 33, 33, 33, 27, 21;
23, 31, 37, 39, 39, 35, 35, 39, 39, 37, 31, 23;
		

Crossrefs

Formula

Row sum n + Row sum A335056(n) = A159065(n).

A336731 Three-column table read by rows: row n gives [number of triangle-triangle, triangle-quadrilateral, quadrilateral-quadrilateral] contacts for a row of n adjacent congruent rectangles divided by drawing diagonals of all possible rectangles (cf. A331452).

Original entry on oeis.org

4, 0, 0, 14, 8, 0, 20, 48, 4, 60, 80, 28, 68, 224, 68, 148, 368, 124, 224, 616, 268, 336, 1008, 420, 384, 1672, 648, 712, 2208, 972, 972, 3120, 1464, 1300, 4304, 1996, 1496, 6040, 2788, 2044, 7936, 3580, 2612, 10224, 4672, 3540, 12656, 5980, 4224, 16104, 7676, 5484, 19648, 9500
Offset: 1

Views

Author

Scott R. Shannon, Aug 02 2020

Keywords

Comments

For a row of n adjacent rectangles the only polygons formed when dividing all possible rectangles along their diagonals are 3-gons (triangles) and 4-gons (quadrilaterals). Hence the only possible edge-sharing contacts are 3-gons with 3-gons, 3-gons with 4-gons, and 4-gons with 4-gons. This sequence lists the number of these three possible combinations for a row of n adjacent rectangles. Note that the edges along the outside of the n adjacent rectangles are not counted as they are only in one n-gon.
These are graphs T(1,n) described in A331452. - N. J. A. Sloane, Aug 03 2020

Examples

			a(1) = 4, a(2) = 0, a(3) = 0. A single rectangle divided along its diagonals consists of four 3-gons, four edges, and no 4-gons. Therefore there are only four 3-gon-to-3-gon contacts. See the link image for n = 1.
a(4) = 14, a(5) = 8, a(6) = 0. Two adjacent rectangles divided along all diagonals consists of fourteen 3-gons and two 4-gons. The two 4-gons are separated and thus share all their edges, eight in total, with 3-gons. There are fourteen pairs of 3-gon-to-3-gon contacts. See the link image for n = 2.
a(7) = 20, a(8) = 48, a(9) = 4. Three adjacent rectangles divided along all diagonals consists of thirty-two 3-gons and fourteen 4-gons. There are two groups of three adjacent 4-gons, so there are four 4-gons-to-4-gon contacts. These, along with the other 4-gons, share 48 edges with 3-gons. There are also twenty 3-gon-to-3-gon contacts. See the link image for n = 3.
.
The table begins:
4,0,0;
14,8,0;
20,48,4;
60,80,28;
68,224,68;
148,368,124;
224,616,268;
336,1008,420;
384,1672,648;
712,2208,972;
972,3120,1464;
1300,4304,1996;
1496,6040,2788;
2044,7936,3580;
2612,10224,4672;
3540,12656,5980;
4224,16104,7676;
5484,19648,9500;
6568,24216,11936;
7836,29616,14468;
See A306302 for a count of the regions and images for other values of n.
		

Crossrefs

Formula

Sum of row t = A331757(t) - 2(t + 1).
Showing 1-10 of 10 results.