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

A335687 (A331763(n) - A331755(n+1))/2.

Original entry on oeis.org

4, 12, 32, 69, 121, 191, 304, 432, 582, 799, 1042, 1320, 1661, 2043, 2457, 3023, 3575, 4195, 4920, 5693, 6465, 7487, 8502, 9617, 10833, 12173, 13526, 15146, 16693, 18397, 20286, 22327, 24201, 26603, 28841, 31372, 34025, 36873, 39583, 42913, 46029
Offset: 1

Views

Author

N. J. A. Sloane, Jul 14 2020

Keywords

Comments

One-half of ((number of vertices in graph SC(n,2)) - (number of vertices in graph SC(n,1))).
It would be nice to have a formula for this sequence. The graphs SC(n,1) are fairly well understood, while SC(n,m) is basically a mystery for m >= 2.
Note that the offsets in A331755 and A331763 have different meanings, which is why there is an extra "+1" in the definition of the current sequence.

Examples

			For n=2, SC(2,2) has 37 vertices and SC(2,1) has 13 vertices (see illustrations), so a(2) = (37-13)/2 = 12.
		

Crossrefs

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

A332599 Triangle read by rows: T(n,k) = number of vertices in a "frame" of size n X k (see Comments in A331457 for definition).

Original entry on oeis.org

5, 13, 37, 35, 99, 152, 75, 213, 256, 364, 159, 401, 448, 568, 776, 275, 657, 704, 836, 1056, 1340, 477, 1085, 1132, 1276, 1508, 1804, 2272, 755, 1619, 1712, 1868, 2112, 2420, 2900, 3532, 1163, 2327, 2552, 2720, 2976, 3296, 3788, 4432, 5336, 1659, 3257, 3568, 3748, 4016, 4348, 4852, 5508, 6424, 7516
Offset: 1

Views

Author

Keywords

Comments

See A331457 and A331776 for further illustrations.
There is a crucial difference between frames of size nX2 and size nXk with k = 1 or k >= 3. If k != 2, all regions are either triangles or quadrilaterals, but for k=2 regions with larger numbers of sides can appear. Remember also that for k <= 2, the "frame" has no hole, and the graph has genus 0, whereas for k >= 3 there is a nontrivial hole and the graph has genus 1.

Examples

			Triangle begins:
[5],
[13, 37],
[35, 99, 152],
[75, 213, 256, 364],
[159, 401, 448, 568, 776],
[275, 657, 704, 836, 1056, 1340],
[477, 1085, 1132, 1276, 1508, 1804, 2272],
[755, 1619, 1712, 1868, 2112, 2420, 2900, 3532],
[1163, 2327, 2552, 2720, 2976, 3296, 3788, 4432, 5336],
[1659, 3257, 3568, 3748, 4016, 4348, 4852, 5508, 6424, 7516],
...
		

Crossrefs

The main diagonal is A332598.

Formula

Column 1 is A331755, for which there is an explicit formula.
Column 2 is A331763, for which no formula is known.
For m >= n >= 3, T(m,n) = A332600(m,n) - A331457(m,n) (Euler for genus 1 graph), and both A332600 and A331457 have explicit formulas.

Extensions

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

A331453 Triangle read by rows: T(n,m) (n >= m >= 1) = number of vertices formed by drawing the lines connecting any two of the 2*(m+n) perimeter points of an m X n grid of squares.

Original entry on oeis.org

5, 13, 37, 35, 99, 257, 75, 213, 421, 817, 159, 401, 881, 1489, 2757, 275, 657, 1305, 2143, 3555, 4825, 477, 1085, 2131, 3431, 5821, 7663, 12293, 755, 1619, 2941, 4817, 7477, 9913, 15037, 19241, 1163, 2327, 4369, 6495, 10393, 13647, 20425, 24651, 33549, 1659, 3257, 5603, 8637, 13689, 16953, 25125, 30779, 39857, 49577
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 (of finite length). The lines do not extend outside the grid. T(m,n) is the number of vertices in the resulting diagram, and A331452(m,n) and A331454(m,n) give the number of regions and the number of line segments respectively.
For illustrations see the links in A331452.

Examples

			Triangle begins:
5,
13, 37,
35, 99, 257,
75, 213, 421, 817,
159, 401, 881, 1489, 2757,
275, 657, 1305, 2143, 3555, 4825,
477, 1085, 2131, 3431, 5821, 7663, 12293,
755, 1619, 2941, 4817, 7477, 9913, 15037, 19241,
1163, 2327, 4369, 6495, 10393, 13647, 20425, 24651, 33549,
...
		

Crossrefs

The main diagonal is A331449.
The first two columns are A331755 and A331763.

A159065 Number of crossings in a regular drawing of the complete bipartite graph K(n,n).

Original entry on oeis.org

0, 1, 7, 27, 65, 147, 261, 461, 737, 1143, 1637, 2349, 3217, 4401, 5769, 7457, 9433, 11945, 14753, 18235, 22173, 26771, 31801, 37813, 44449, 52161, 60489, 69955, 80289, 92203, 104941, 119493, 135261, 152705, 171205, 191649, 213473, 237877
Offset: 1

Views

Author

Stéphane Legendre, Apr 04 2009, Jul 11 2009

Keywords

Examples

			For n = 3 draw vertically 3 points regularly spaced on the right, and 3 points regularly spaced on the left. Join the left and right points by straight lines. These lines cross at c(3) = 7 points.
		

References

  • Umberto Eco, Foucault's Pendulum. San Diego: Harcourt Brace Jovanovich, p. 473, 1989.
  • Athanasius Kircher (1601-1680). Ars Magna Sciendi, In XII Libros Digesta, qua nova et universali Methodo Per Artificiosum Combinationum contextum de omni re proposita plurimis et prope infinitis rationibus disputari, omniumque summaria quaedam cognitio comparari potest, Amstelodami, Apud Joannem Janssonium a Waesberge, et Viduam Elizei Weyerstraet, 1669, fol., pp. 482 (altra ed.: Amstelodami.(ut supra), 1671).

Crossrefs

Programs

  • Maple
    A159065 := proc(n)
        local a,b,c ;
        c := 0 ;
        for a from 1 to n-1 do
        for b from 1 to n-1 do
            if igcd(a,b) = 1 then
                c := c+(n-a)*(n-b) ;
                if 2*a< n and 2*b < n then
                    c := c-(n-2*a)*(n-2*b) ;
                end if;
            end if;
        end do:
        end do:
        c ;
    end proc:
    seq(A159065(n),n=1..30); # R. J. Mathar, Jul 20 2017
  • Mathematica
    a[n_] := Module[{x, y, s1 = 0, s2 = 0}, For[x = 1, x <= n-1, x++, For[y = 1, y <= n-1, y++, If[GCD[x, y] == 1, s1 += (n-x)*(n-y); If[2*x <= n-1 && 2*y <= n-1, s2 += (n-2*x)*(n-2*y)]]]]; s1-s2]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jan 10 2014, translated from Joerg Arndt's PARI code *)
  • PARI
    a(n) = {
        my(s1=0, s2=0);
        for (x=1, n-1,
            for (y=1, n-1,
                if ( gcd(x, y)==1,
                    s1 += (n-x) * (n-y);
                    if ( ( 2*x<=n-1) && (2*y<=n-1),
                        s2 += (n-2*x) * (n-2*y); );
                 );
            );
        );
        return( s1 - s2 );
    }
    \\ Joerg Arndt, Oct 13 2013
    
  • Pascal
    s1:=0; s2:=0;
    for a:=1 to n-1 do
       for b:=1 to n-1 do
          if gcd(a, b)=1 then
          begin
             s1:=s1+(n-a)*(n-b);
             if (2*a<=n-1) and (2*b<=n-1) then
                s2:=s2+(n-2*a)*(n-2*b);
          end;
    a:=s1-s2;
    
  • Python
    from math import gcd
    def a159065(n):
        c=0
        for a in range(1, n):
            for b in range(1, n):
                if gcd(a, b)==1:
                    c+=(n - a)*(n - b)
                    if 2*aIndranil Ghosh, Jul 20 2017
    
  • Python
    from sympy import totient
    def A159065(n): return n-1 if n <= 2 else 2*n-3+3*sum(totient(i)*(n-i)*i for i in range(2,(n+1)//2)) + sum(totient(i)*(n-i)*(2*n-i) for i in range((n+1)//2,n)) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = Sum((n-a)*(n-b); 1<=a
a(n) = (9/(8*Pi^2))*n^4 + O(n^3 log(n)). Asymptotic to (9/(2*Pi^2))*A000537(n-1).
For n > 2: a(n) = A115004(n-1)-(n-2)^2-2*Sum{n=2..floor((n-1)/2)} (n-2i)*(n-i)*phi(i) = 2n-3+3*Sum{n=2..floor((n-1)/2)}(n-i)*i*phi(i) + Sum_{n=floor((n+1)/2)..n-1} (n-i)*(2n-i)*phi(i). - Chai Wah Wu, Aug 16 2021

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

5, 13, 69, 289, 1971, 3997, 20371, 45751, 120957, 205299, 629847, 897801, 2334409, 3461459, 5517131, 8468061
Offset: 1

Author

Keywords

Comments

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

Crossrefs

Cf. A359691 (crossings), A359692 (regions), A359693 (edges), A359694 (k-gons), A005728, A331755, A359654, A358887, A358883, A006842, A006843.

Formula

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

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

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;
		

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

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
		

Extensions

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

A334701 Consider the figure made up of a row of n adjacent congruent rectangles, with diagonals of all possible rectangles drawn; a(n) = number of interior vertices where exactly two lines cross.

Original entry on oeis.org

1, 6, 24, 54, 124, 214, 382, 598, 950, 1334, 1912, 2622, 3624, 4690, 6096, 7686, 9764, 12010, 14866, 18026, 21904, 25918, 30818, 36246, 42654, 49246, 57006, 65334, 75098, 85414, 97384, 110138, 124726, 139642, 156286, 174018, 194106, 214570, 237534, 261666, 288686, 316770, 348048, 380798, 416524, 452794, 492830
Offset: 1

Author

Keywords

Comments

It would be nice to have a formula or recurrence. - N. J. A. Sloane, Jun 22 2020

Crossrefs

Column 4 of array in A333275.
See also A115004, A331761.

Formula

Conjecture: As n -> oo, a(n) ~ C*n^4/Pi^2, where C is about 0.95 (compare A115004, A331761). - N. J. A. Sloane, Jul 03 2020

Extensions

More terms from Lars Blomberg, Jun 17 2020

A333279 Column 2 of triangle in A288187.

Original entry on oeis.org

16, 56, 176, 388, 822, 1452, 2516, 3952, 6060, 8736, 12492, 17040, 23102, 30280, 39234, 49688, 62730, 77556, 95642, 115992, 139874, 166560, 197992, 232600, 272574, 316460, 366390, 420792, 482748, 549516, 624962, 706436, 796766, 893844, 1001074, 1115428
Offset: 1

Author

Keywords

Comments

For the graphs defined in A331452 and A288187 only the counts for graphs that are one square wide have formulas for regions, edges, and vertices (see A306302, A331757, A331755). For width 2 there are six such sequences (A331766, A331765, A331763; A333279, A333280, A333281). It would be nice to have a formula for any one of them.
The maximum number of edges over all chambers is 4 for 1 <= n <= 4 and 5 for 5 <= n <= 160. - Lars Blomberg, May 23 2021

Extensions

a(10) and beyond from Lars Blomberg, May 23 2021
Showing 1-10 of 27 results. Next