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

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

A331757 Number of edges in a figure made up of a row of n adjacent congruent rectangles upon drawing diagonals of all possible rectangles.

Original entry on oeis.org

8, 28, 80, 178, 372, 654, 1124, 1782, 2724, 3914, 5580, 7626, 10352, 13590, 17540, 22210, 28040, 34670, 42760, 51962, 62612, 74494, 88508, 104042, 121912, 141534, 163664, 187942, 215636, 245490, 279260, 316022, 356456, 399898, 447612, 498698, 555352
Offset: 1

Views

Author

N. J. A. Sloane, Feb 04 2020

Keywords

Crossrefs

A306302 gives number of regions in the figure.
This is column 1 of A331454.

Programs

  • Mathematica
    Table[n^2 + 4n + 1 + Sum[Sum[(2 * Boole[GCD[i, j] == 1] - Boole[GCD[i, j] == 2]) * (n + 1 - i) * (n + 1 - j), {j, 1, n}], {i, 1, n}], {n, 1, 37}] (* Joshua Oliver, Feb 05 2020 *)
  • Python
    from sympy import totient
    def A331757(n): return 8 if n == 1 else 2*(n*(n+3) + sum(totient(i)*(n+1-i)*(n+1+i) 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) = (2*n + 2 + 3*A324042(n) + 4*A324043(n))/2 [Corrected by Chai Wah Wu, Aug 16 2021]
For n > 1, a(n) = 2*(n*(n+3) + Sum_{i=2..floor(n/2)} (n+1-i)*(n+1+i)*phi(i) + Sum_{i=floor(n/2)+1..n} (n+1-i)*(2*n+2-i)*phi(i)). - Chai Wah Wu, Aug 16 2021

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

A333288 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 regions in the k-th rectangle.

Original entry on oeis.org

4, 8, 8, 12, 22, 12, 16, 36, 36, 16, 20, 52, 70, 52, 20, 24, 66, 100, 100, 66, 24, 28, 82, 134, 160, 134, 82, 28, 32, 98, 166, 218, 218, 166, 98, 32, 36, 116, 198, 276, 310, 276, 198, 116, 36, 40, 134, 230, 328, 396, 396, 328, 230, 134, 40, 44, 154, 266, 386
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.
Since the cells are either triangles or quadrilaterals, this is the sum of the two arrays A333286 and A333287.
It would be nice to have a formula for these entries. It is easy to see that the first column is 4n for n>=1.

Examples

			Triangle begins:
   4;
   8,   8;
  12,  22,  12;
  16,  36,  36,  16;
  20,  52,  70,  52,  20;
  24,  66, 100, 100,  66,  24;
  28,  82, 134, 160, 134,  82,  28;
  ...
		

Crossrefs

Extensions

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

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

A369178 Irregular table read by rows: T(n,k) is the number of k-sided regions, k>=3, 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, 8, 4, 22, 14, 52, 34, 98, 82, 184, 146, 302, 268, 484, 426, 8, 710, 694, 4, 1064, 986, 8, 1498, 1436, 12, 2056, 1986, 12, 2710, 2780, 12, 3624, 3630, 24, 4682, 4728, 20, 6012, 5970, 24, 7518, 7628, 28, 9408, 9406, 32, 11526, 11702, 40, 14028, 14246, 64, 16782, 17330, 60
Offset: 1

Views

Author

Scott R. Shannon, Jan 15 2024

Keywords

Comments

Unlike the graph in A306302, or the complete bipartite graph of order n, for n>=8 the graph contains regions with 5 edges. It is likely 5 is the maximum number of edges in any region for all n.

Examples

			The table begins:
2;
8, 4;
22, 14;
52, 34;
98, 82;
184, 146;
302, 268;
484, 426, 8;
710, 694, 4;
1064, 986, 8;
1498, 1436, 12;
2056, 1986, 12;
2710, 2780, 12;
3624, 3630, 24;
4682, 4728, 20;
6012, 5970, 24;
7518, 7628, 28;
9408, 9406, 32;
11526, 11702, 40;
14028, 14246, 64;
16782, 17330, 60;
20220, 20518, 68;
23998, 24468, 80;
28304, 28786, 84;
.
.
		

Crossrefs

Cf. A369175 (regions), A369176 (vertices), A369177 (edges), A306302, A324042, A324043, A368758.

Formula

Sum of row(n) = A369175(n).

A332610 Triangle read by rows: T(m,n) = number of triangular regions in a "frame" of size m X n with m >= n >= 1 (see Comments in A331457 for definition of frame).

Original entry on oeis.org

4, 14, 48, 32, 102, 128, 70, 192, 204, 288, 124, 326, 312, 396, 512, 226, 524, 516, 600, 716, 928, 360, 802, 784, 868, 984, 1196, 1472, 566, 1192, 1196, 1280, 1396, 1608, 1884, 2304, 820, 1634, 1704, 1788, 1904, 2116, 2392, 2812, 3328, 1218, 2296, 2500, 2584, 2700, 2912, 3188, 3608, 4124, 4928
Offset: 1

Views

Author

Keywords

Comments

See A331457 for illustrations.

Examples

			Triangle begins:
[4],
[14, 48],
[32, 102, 128],
[70, 192, 204, 288],
[124, 326, 312, 396, 512],
[226, 524, 516, 600, 716, 928],
[360, 802, 784, 868, 984, 1196, 1472],
[566, 1192, 1196, 1280, 1396, 1608, 1884, 2304],
[820, 1634, 1704, 1788, 1904, 2116, 2392, 2812, 3328],
[1218, 2296, 2500, 2584, 2700, 2912, 3188, 3608, 4124, 4928],
[1696, 3074, 3456, 3540, 3656, 3868, 4144, 4564, 5080, 5884, 6848],
[2310, 4052, 4684, 4768, 4884, 5096, 5372, 5792, 6308, 7112, 8076, 9312],
...
		

Crossrefs

Formula

The first column is A324042, for which there is an explicit formula.
No formula is known for column 2, which is A332606.
For m>=n>=3 we have the (new) theorem that T(m,n) = 4*(m^2+n^2)+12*n+4*m-24 + 4*V(m,m,2)+4*V(n,n,2), where V(m,n,q) = Sum_{i = 1..m, j = 1..n, gcd(i,j)=q} (m+1-i)*(n+1-j).

A332611 Triangle read by rows: T(m,n) = number of quadrilateral regions in a "frame" of size m X n with m >= n >= 1 (see Comments in A331457 for definition of frame).

Original entry on oeis.org

0, 2, 8, 14, 36, 80, 34, 92, 144, 208, 90, 194, 280, 356, 504, 154, 336, 432, 520, 680, 856, 288, 554, 724, 824, 996, 1184, 1512, 462, 812, 1096, 1208, 1392, 1592, 1932, 2352, 742, 1314, 1680, 1804, 2000, 2212, 2564, 2996, 3640, 1038, 1756, 2296, 2432, 2640, 2864, 3228, 3672, 4328, 5016
Offset: 1

Views

Author

Keywords

Comments

See A331457 for illustrations.

Examples

			Triangle begins:
[0],
[2, 8],
[14, 36, 80],
[34, 92, 144, 208],
[90, 194, 280, 356, 504],
[154, 336, 432, 520, 680, 856],
[288, 554, 724, 824, 996, 1184, 1512],
[462, 812, 1096, 1208, 1392, 1592, 1932, 2352],
[742, 1314, 1680, 1804, 2000, 2212, 2564, 2996, 3640],
[1038, 1756, 2296, 2432, 2640, 2864, 3228, 3672, 4328, 5016],
[1512, 2508, 3268, 3416, 3636, 3872, 4248, 4704, 5372, 6072, 7128],
[2074, 3252, 4416, 4576, 4808, 5056, 5444, 5912, 6592, 7304, 8372, 9616],
....
		

Crossrefs

Formula

The first column is A324043, for which there is an explicit formula.
No formula is known for column 2, which is A332607.
For m>=n>=3 we have the (new) theorem that T(m,n) = 4*(3*m*n-m-4*n) + 2*(V(m,m,1)-2*V(m,m,2)-m^2-4*m+6) + 2*(V(n,n,1)-2*V(n,n,2)-n^2-4*n+6) where V(m,n,q) = Sum_{i = 1..m, j = 1..n, gcd(i,j)=q} (m+1-i)*(n+1-j).
Showing 1-9 of 9 results.