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 50 results. Next

A333274 Irregular triangle read by rows: consider the graph defined in A306302 formed from a row of n adjacent congruent rectangles by drawing the diagonals of all visible rectangles; T(n,k) (n >= 1, 2 <= k <= 2n+2) is the number of vertices in the graph at which k polygons meet.

Original entry on oeis.org

4, 0, 1, 0, 4, 8, 0, 1, 0, 0, 28, 4, 2, 0, 1, 0, 0, 54, 4, 14, 0, 2, 0, 1, 0, 0, 124, 0, 22, 8, 2, 0, 2, 0, 1, 0, 0, 214, 0, 32, 4, 20, 0, 2, 0, 2, 0, 1, 0, 0, 382, 0, 50, 0, 26, 12, 2, 0, 2, 0, 2, 0, 1, 0, 0, 598, 0, 102, 0, 18, 4, 26, 0, 2, 0, 2, 0, 2, 0, 1
Offset: 1

Views

Author

Keywords

Comments

For vertices not on the boundary, the number of polygons meeting at a vertex is simply the degree (or valency) of that vertex.
Row sums are A331755.
Sum_k k*T(n,k) gives A333276.
See A333275 for the degrees of the non-boundary vertices.
Row n is the sum of [0, 0, ..., 0 (n-1 0's), 4, 2*n-2, 0, 0, ..., 0 (n 0's)] and row n of A333275.

Examples

			Led d denote the number of polygons meeting at a vertex (except for boundary points, d is the degree of the vertex).
For n=2, the 4 corners have d=3, and on the center line there are 2 vertices with d=4 and 1 with d=6. In the interiors of each of the two squares there are 3 points with d=4.
So in total there are 4 points with d=3, 8 with d=4, and 1 with d=6. So row 2 of the triangle is [0, 4, 8, 0, 1].
The triangle begins:
4,0,1,
0,4,8,0,1,
0,0,28,4,2,0,1,
0,0,54,4,14,0,2,0,1,
0,0,124,0,22,8,2,0,2,0,1,
0,0,214,0,32,4,20,0,2,0,2,0,1;
0,0,382,0,50,0,26,12,2,0,2,0,2,0,1;
0,0,598,0,102,0,18,4,26,0,2,0,2,0,2,0,1;
0,0,950,0,126,0,32,0,30,16,2,0,2,0,2,0,2,0,1;
0,0,1334,0,198,0,62,0,20,4,32,0,2,0,2,0,2,0,2,0,1;
0,0,1912,0,286,0,100,0,10,0,34,20,2,0,2,0,2,0,2,0,2,0,1;
0,0,2622,0,390,0,118,0,38,0,22,4,38,0,2,0,2,0,2,0,2,0,2,0,1;
0,0,3624,0,510,0,136,0,74,0,10,0,38,24,2,0,2,0,2,0,2,0,2,0,2,0,1;
0,0,4690,0,742,0,154,0,118,0,10,0,24,4,44,0,2,0,2,0,2,0,2,0,2,0,2,0,1;
		

Crossrefs

A333275 Irregular triangle read by rows: consider the graph defined in A306302 formed from a row of n adjacent congruent rectangles by drawing the diagonals of all visible rectangles; T(n,k) (n >= 1, 2 <= k <= 2n+2) is the number of non-boundary vertices in the graph at which k polygons meet.

Original entry on oeis.org

0, 0, 1, 0, 0, 6, 0, 1, 0, 0, 24, 0, 2, 0, 1, 0, 0, 54, 0, 8, 0, 2, 0, 1, 0, 0, 124, 0, 18, 0, 2, 0, 2, 0, 1, 0, 0, 214, 0, 32, 0, 10, 0, 2, 0, 2, 0, 1, 0, 0, 382, 0, 50, 0, 22, 0, 2, 0, 2, 0, 2, 0, 1, 0, 0, 598, 0, 102, 0, 18, 0, 12, 0, 2, 0, 2, 0, 2, 0, 1
Offset: 1

Views

Author

Keywords

Comments

The number of polygons meeting at a non-boundary vertex is simply the degree (or valency) of that vertex.
Row sums are A159065.
Sum_k k*T(n,k) gives A333277.
See A333274 for the degrees if the boundary vertices are included.
T(n,k) = 0 if k is odd. But the triangle includes those zero entries because this is used to construct A333274.

Examples

			Led d denote the number of polygons meeting at a vertex.
For n=2, in the interiors of each of the two squares there are 3 points with d=4, and the center point has d=6.
So in total there are 6 points with d=4 and 1 with d=6. So row 2 of the triangle is [0, 0, 6, 0, 1].
The triangle begins:
0,0,1,
0,0,6,0,1,
0,0,24,0,2,0,1,
0,0,54,0,8,0,2,0,1,
0,0,124,0,18,0,2,0,2,0,1,
0,0,214,0,32,0,10,0,2,0,2,0,1,
0,0,382,0,50,0,22,0,2,0,2,0,2,0,1,
0,0,598,0,102,0,18,0,12,0,2,0,2,0,2,0,1
...
If we leave out the uninteresting zeros, the triangle begins:
[1]
[6, 1]
[24, 2, 1]
[54, 8, 2, 1]
[124, 18, 2, 2, 1]
[214, 32, 10, 2, 2, 1]
[382, 50, 22, 2, 2, 2, 1]
[598, 102, 18, 12, 2, 2, 2, 1]
[950, 126, 32, 26, 2, 2, 2, 2, 1]
[1334, 198, 62, 20, 14, 2, 2, 2, 2, 1]
[1912, 286, 100, 10, 30, 2, 2, 2, 2, 2, 1]
[2622, 390, 118, 38, 22, 16, 2, 2, 2, 2, 2, 1]
... - _N. J. A. Sloane_, Jul 27 2020
		

Crossrefs

Extensions

a(36) and beyond from Lars Blomberg, Jun 17 2020

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.

A369176 Number of vertices 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

5, 13, 31, 67, 139, 247, 429, 691, 1067, 1543, 2217, 3047, 4169, 5495, 7117, 9031, 11449, 14179, 17547, 21379, 25835, 30755, 36613, 43091, 50605, 58775, 68035, 78171, 89831, 102335, 116593, 132079, 149181, 167391, 187497, 208983, 232977, 258351, 285957, 315323, 347777, 381867, 419371
Offset: 1

Views

Author

Scott R. Shannon, Jan 15 2024

Keywords

Crossrefs

Cf. A369175 (regions), A369177 (edges), A369178 (k-gons), A306302, A331755, A368756.

Formula

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

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).

A369177 Number of edges 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

6, 24, 66, 152, 318, 576, 998, 1608, 2474, 3600, 5162, 7100, 9670, 12772, 16546, 21036, 26622, 33024, 40814, 49716, 60006, 71560, 85158, 100264, 117626, 136780, 158358, 182080, 209106, 238312, 271314, 307304, 346866, 389488, 436286, 486444, 542026, 601436, 665814, 734504, 809882, 889544
Offset: 1

Views

Author

Scott R. Shannon, Jan 15 2024

Keywords

Comments

See A369175 and A369176 for images of the graph.

Crossrefs

Cf. A369175 (regions), A369176 (vertices), A369178 (k-gons), A306302, A331757, A290132, A368757.

Formula

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

A331756 a(n) = A306302(n)/2.

Original entry on oeis.org

0, 2, 8, 23, 52, 107, 190, 324, 514, 781, 1128, 1604, 2192, 2962, 3896, 5026, 6372, 8030, 9940, 12243, 14874, 17899, 21324, 25324, 29772, 34850, 40496, 46827, 53798, 61687, 70244, 79852, 90348, 101842, 114312, 127946, 142576, 158700, 176048, 194788, 214812
Offset: 0

Views

Author

N. J. A. Sloane, Feb 04 2020

Keywords

Crossrefs

Cf. A306302.

Programs

  • Mathematica
    z[n_] := Sum[If[GCD[i, j] == 1, (n-i+1)(n-j+1), 0], {i, n}, {j, n}];
    a[n_] := If[n == 0, 0, (z[n] + n^2 + 2n)/2];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Sep 14 2022 *)

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.

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.

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

Original entry on oeis.org

1, 8, 31, 80, 179, 332, 585, 948, 1463, 2136, 3065, 4216, 5729, 7568, 9797, 12456, 15737, 19520, 24087, 29308, 35315, 42120, 50073, 58920, 69025, 80264, 92871, 106756, 122475, 139528, 158681, 179608, 202529, 227400, 254597, 283784, 315957, 350576, 387977
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2006

Keywords

Comments

Also (1/4) * number of ways to select 3 distinct points forming a triangle of unsigned area = 1/2 from a square of grid points with side length n. Diagonal of triangle A320541. - Hugo Pfoertner, Oct 22 2018
From Chai Wah Wu, Aug 18 2021: (Start)
Theorem: a(n) = n^2 + Sum_{i=2..n} (n+1-i)*(2*n+2-i)*phi(i).
Proof: Since gcd(n,n) = 1 if and only if n = 1, Sum_{i=1..n, j=1..n, gcd(i,j)=1} (n+1-i)*(n+1-j) = n^2 + Sum_{i=1..n, j=1..n, gcd(i,j)=1, (i,j) <> (1,1)} (n+1-i)*(n+1-j)
= n^2 + Sum_{i=2..n, j=1..i, gcd(i,j)=1} (n+1-i)*(n+1-j) + Sum_{j=2..n, i=1..j, gcd(i,j)=1} (n+1-i)*(n+1-j) = n^2 + 2*Sum_{i=2..n, j=1..i, gcd(i,j)=1} (n+1-i)*(n+1-j), i.e., the diagonal is not double-counted.
This is equal to n^2 + 2*Sum_{i=2..n, j is a totative of i} (n+1-i)*(n+1-j). Since Sum_{j is a totative of i} 1 = phi(i) and for i > 1, Sum_{j is a totative of i} j = i*phi(i)/2, the conclusion follows.
Similar argument holds for corresponding formulas for A088658, A114043, A114146, A115005, etc.
(End)

Crossrefs

The following eight sequences are all essentially the same. The simplest is the present sequence, 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
Main diagonal of array in A114999.

Programs

  • Maple
    A115004 := 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:
    seq(A115004(n),n=1..30); # R. J. Mathar, Jul 20 2017
  • Mathematica
    a[n_] := Sum[(n-i+1) (n-j+1) Boole[GCD[i, j] == 1], {i, n}, {j, n}];
    Array[a, 40] (* Jean-François Alcover, Mar 23 2020 *)
  • PARI
    a(n) = n^2 + sum(i=2, n, (n+1-i)*(2*n+2-i)*eulerphi(i)); \\ Michel Marcus, May 08 2024
  • Python
    from math import gcd
    def a115004(n):
        r=0
        for a in range(1, n + 1):
            for b in range(1, n + 1):
                if gcd(a, b)==1:
                    r+=(n + 1 - a)*(n + 1 - b)
        return r
    print([a115004(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 21 2017
    
  • Python
    from sympy import totient
    def A115004(n): return n**2 + sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(2,n+1)) # Chai Wah Wu, Aug 15 2021
    

Formula

a(n) = Sum_{i=1..n, j=1..n, gcd(i,j)=1} (n+1-i)*(n+1-j).
As n -> oo, a(n) ~ (3/2)*n^4/Pi^2. This follows from Max Alekseyev's formula in A114043. - N. J. A. Sloane, Jul 03 2020
a(n) = n^2 + Sum_{i=2..n} (n+1-i)*(2n+2-i)*phi(i). - Chai Wah Wu, Aug 15 2021
Showing 1-10 of 50 results. Next