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 11-20 of 32 results. Next

A331776 Number of regions in a "frame" of size n X n (see Comments for definition).

Original entry on oeis.org

4, 56, 208, 496, 1016, 1784, 2984, 4656, 6968, 9944, 13976, 18928, 25360, 33128, 42488, 53600, 67232, 82904, 101744, 123232, 147896, 175784, 208296, 244416, 285600, 331352, 382608, 439008, 502776, 571912, 649480, 734176, 826880, 927416, 1037288, 1155152, 1284992
Offset: 1

Views

Author

Keywords

Comments

A "frame" of size n X n is formed from a grid of (n+1) X (n+1) points with the central grid of (n-3) X (n-3) points removed. If n is less than 3 then no points are removed, and a(n) = A255011(n). From now on we assume n >= 3.
If we focus on the squares rather than the points, the frame consists of an n X n array of squares with the central block of (n-2) X (n-2) squares removed.
The resulting structure has an outer perimeter with 4*n points and an inner perimeter with 4*n-8 points, for a total of 8*n-8 perimeter points. The frame itself is the strip of width 1 between the inner and outer perimeters.
Now join every pair of perimeter points, both inner and outer, by a line segment, provided the line remains inside the frame. The sequence gives the number of regions in the resulting figure.
Theorem. Let z(n) = Sum_{i, j = 1..n, gcd(i,j)=1} (n+1-i)*(n+1-j) (this is A115004). Then, for n >= 2, a(n) = 4*z(n) + 16*n^2 - 20*n. - Scott R. Shannon and N. J. A. Sloane, Mar 06 2020

Crossrefs

This is the main diagonal of A331457. Equals 4 times A332594.
The analogous sequence for an n X n block of squares (if the center block is not removed) is A331452.

Programs

  • Maple
    # 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:
    A331776 := n -> if n=1 then 4 else 4*z(n)+16*n^2 - 20*n; fi;
    [seq(A331776(n),n=1..40)]; # N. J. A. Sloane, Mar 09 2020
  • PARI
    a(n) = 4*sum(i=1, n, sum(j=1, n, if(gcd(i, j)==1, (n+1-i)*(n+1-j), 0))) + 16*n^2 - 20*n + 4*(n==1); \\ Jinyuan Wang, Aug 07 2021
    
  • Python
    from sympy import totient
    def A331776(n): return 4 if n == 1 else 20*n*(n-1) + 4*sum(totient(i)*(n+1-i)*(2*n+2-i) for i in range(2,n+1)) # Chai Wah Wu, Aug 16 2021

Formula

For n > 1, a(n) = 20*n*(n-1) + 4*Sum_{i=2..n} (n+1-i)*(2n+2-i)*phi(i). - Chai Wah Wu, Aug 16 2021

Extensions

More terms from N. J. A. Sloane, Mar 09 2020

A345459 Number of polygons formed when connecting all 4n points on the perimeter of an n X n square by infinite lines.

Original entry on oeis.org

0, 4, 80, 568, 2024, 6052, 12144, 26976, 45024, 76724, 116840, 191128, 245976, 388452, 501888, 661476, 870168, 1199724, 1402096, 1911384, 2188320, 2739280, 3371264, 4224288, 4617224, 5801372, 6780568
Offset: 0

Views

Author

Keywords

Comments

The width/height of the entire figure grows as ~ 2*n^3 for large n. See the Formula section below.

Examples

			a(2) = 80. Connecting the 8 perimeter points results in the creation of forty-eight 3-gons and eight 4-gons inside the square while creating twenty-four 3-gons outside the square, giving eighty polygons in total. See the linked images.
		

Crossrefs

Cf. A255011 (number inside the square), A345648 (number outside the square), A345649 (number of vertices), A345650 (number of edges), A344993, A344857, A092098, A007678.

Formula

a(n) = A345650(n) - A345649(n) + 1.
Assuming the square is of size n x n centered on the origin the x (or y) offset for the eight outermost vertices is n^3 - 2*n^2 + 3*n/2, which have a corresponding y (or x) offset of n^2 - 3*n/2 + 1. The total distance from the origin of these vertices is sqrt(n^6 - 4*n^5 + 8*n^4 - 9*n^3 + 13*n^2/2 - 3*n + 1).

A355799 Number of vertices formed in a square by straight line segments when connecting the n-1 points between each corner that divide each edge 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, 9, 25, 93, 277, 597, 1405, 2421, 4357, 6661, 11261, 14593, 23625, 30121, 41453, 54477, 75985, 87677, 122433, 139461, 177965, 216017, 275733, 298805, 383497, 439909, 522473, 588597, 729501, 763149, 963573, 1045701, 1204481, 1361789, 1546309, 1657125, 2009113, 2166617, 2418733, 2602789
Offset: 1

Views

Author

Scott R. Shannon, Jul 17 2022

Keywords

Crossrefs

Cf. A355798 (regions), A355800 (edges), A355801 (k-gons), A255011 (all vertices), A290131, A331452, A335678.

Formula

a(n) = A355800(n) - A355798(n) + 1 by Euler's formula.

A355800 Number of edges formed in a square by straight line segments when connecting the n-1 points between each corner that divide each edge 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, 12, 48, 196, 592, 1308, 2992, 5236, 9296, 14332, 23704, 31432, 49592, 64208, 87712, 115524, 158776, 186660, 255464, 295532, 374200, 455064, 574024, 632836, 800568, 923764, 1092672, 1238412, 1515912, 1613148, 2001200, 2191124, 2516016, 2847668, 3223968, 3485484, 4167304, 4523992, 5042336
Offset: 1

Views

Author

Scott R. Shannon, Jul 17 2022

Keywords

Comments

See A355798 for images of the squares.

Crossrefs

Cf. A355798 (regions), A355799 (vertices), A355801 (k-gons), A255011 (all vertices), A290131, A331452, A335678.

Formula

a(n) = A355798(n) + A355799(n) - 1 by Euler's formula.

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

Original entry on oeis.org

0, 1, 0, 4, 12, 12, 56, 32, 16, 156, 124, 24, 8, 0, 4, 384, 228, 72, 28, 716, 648, 144, 68, 8, 4, 1312, 1144, 240, 112, 8, 2244, 1912, 528, 256, 3528, 3072, 696, 360, 16, 5012, 5536, 1296, 524, 48, 28, 7696, 6596, 1960, 572, 16, 10340, 11448, 2968, 1028, 160, 24, 14520, 14428, 3872, 1156, 104, 8
Offset: 1

Views

Author

Scott R. Shannon, Jul 17 2022

Keywords

Comments

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 A355798 for more images of the square.
The keyword "look" is for the n = 10 image. - N. J. A. Sloane, Jul 21 2022

Examples

			The table begins:
0,     1;
0,     4;
12,    12;
56,    32,    16;
156,   124,   24,   8,    0,   4;
384,   228,   72,   28;
716,   648,   144,  68,   8,   4;
1312,  1144,  240,  112,  8;
2244,  1912,  528,  256;
3528,  3072,  696,  360,  16;
5012,  5536,  1296, 524,  48,  28;
7696,  6596,  1960, 572,  16;
10340, 11448, 2968, 1028, 160, 24;
14520, 14428, 3872, 1156, 104, 8;
19588, 19156, 5296, 2052, 160, 8;
25392, 26112, 7160, 2152, 208, 24;
31820, 37244, 9936, 3240, 488, 64;
.
.
		

Crossrefs

Cf. A355798 (regions), A355799 (vertices), A355800 (edges), A355801 (k-gons), A255011 (all vertices), A290131, A331452, A335678.

A358407 Number of regions formed in a square by straight line segments when connecting the n-1 points between each corner that divide each edge into n equal parts to the n-1 points on each of the two adjacent edges of the square.

Original entry on oeis.org

1, 5, 37, 173, 553, 1365, 2909, 5513, 9577, 15485, 24157, 35021, 51201, 71013, 95621, 126277, 167213, 211737, 272025, 335681, 413677, 505445, 618557, 729485, 878017, 1034697, 1215185, 1409273, 1654785, 1875265, 2192281, 2486797, 2836317, 3216833, 3633709, 4034313, 4599789, 5124841
Offset: 1

Views

Author

Scott R. Shannon, Nov 14 2022

Keywords

Crossrefs

Cf. A358408 (vertices), A358409 (edges), A355798, A255011.

Formula

a(n) = A358409(n) - A358408(n) + 1 by Euler's formula.

A333519 Number of regions in a polygon whose boundary consists of n+2 equally spaced points around a semicircle and n+2 equally spaced points along the diameter (a total of 2n+2 points). See Comments for precise definition.

Original entry on oeis.org

0, 2, 13, 48, 141, 312, 652, 1160, 1978, 3106, 4775, 6826, 9803, 13328, 17904, 23536, 30652, 38640, 48945, 60300, 74248, 89892, 108768, 128990, 153826, 180206, 211483, 245000, 284375, 325140, 374450, 425312, 484168, 545938, 616981, 690132, 775077, 862220
Offset: 0

Views

Author

Keywords

Comments

A semicircular polygon with 2n+2 points is created by placing n+2 equally spaced vertices along the semicircle's arc (including the two end vertices). Also place n+2 equally spaced vertices along the diameter (again including the same two end vertices). Now connect every pair of vertices by a straight line segment. The sequence gives the number of regions in the resulting figure.

Crossrefs

Extensions

a(21) and beyond from Lars Blomberg, May 01 2020

A335350 a(n) is the number of regions formed in a square by dividing each of its sides into n equal parts giving a total of 4*n nodes and drawing straight line segments from node k to node (k+n+1) mod 4*n, 0 <= k < 4*n.

Original entry on oeis.org

4, 25, 37, 81, 109, 169, 205, 289, 341, 441, 485, 625, 701, 825, 913, 1089, 1189, 1369, 1461, 1661, 1805, 2025, 2141, 2389, 2549, 2809, 2929, 3249, 3405, 3721, 3901, 4205, 4421, 4753, 4913, 5329, 5549, 5913, 6105, 6561, 6781, 7225, 7453, 7885, 8189, 8649
Offset: 1

Views

Author

Lars Blomberg, Jun 03 2020

Keywords

Comments

For n>1, a(n)-1 is divisible by 4.

Crossrefs

Cf. A335351 (edges), A335352 (vertices), A335353 (n-gons), A335354 (edges in central polygon), A255011, A335057, A335192.

A335351 a(n) is the number of edges formed in a square by dividing each of its sides into n equal parts giving a total of 4*n nodes and drawing straight line segments from node k to node (k+n+1) mod 4*n, 0 <= k < 4*n.

Original entry on oeis.org

8, 48, 64, 160, 208, 336, 392, 576, 664, 880, 936, 1248, 1376, 1632, 1784, 2176, 2344, 2736, 2872, 3304, 3568, 4048, 4224, 4768, 5048, 5616, 5776, 6496, 6744, 7440, 7736, 8392, 8776, 9496, 9712, 10656, 11024, 11808, 12088, 13120, 13464, 14448, 14800, 15736
Offset: 1

Views

Author

Lars Blomberg, Jun 04 2020

Keywords

Comments

For n>1, a(n) is divisible by 8.
See A335350 for illustrations.

Crossrefs

Cf. A335350 (regions), A335352 (vertices), A335353 (n-gons), A335354 (edges in central polygon), A255011, A335057, A335192.

A335352 a(n) is the number of vertices formed in a square by dividing each of its sides into n equal parts giving a total of 4*n nodes and drawing straight line segments from node k to node (k+n+1) mod 4*n, 0 <= k < 4*n.

Original entry on oeis.org

5, 24, 28, 80, 100, 168, 188, 288, 324, 440, 452, 624, 676, 808, 872, 1088, 1156, 1368, 1412, 1644, 1764, 2024, 2084, 2380, 2500, 2808, 2848, 3248, 3340, 3720, 3836, 4188, 4356, 4744, 4800, 5328, 5476, 5896, 5984, 6560, 6684, 7224, 7348, 7852, 8100, 8648
Offset: 1

Views

Author

Lars Blomberg, Jun 04 2020

Keywords

Comments

For n>1, a(n) is divisible by 4.
See A335350 for illustrations.

Crossrefs

Cf. A335350 (regions), A335351 (edges), A335353 (n-gons), A335354 (edges in central polygon), A255011, A335057, A335192.
Previous Showing 11-20 of 32 results. Next