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

A332352 Triangle read by rows: T(m,n) = Sum_{-m= n >= 1.

Original entry on oeis.org

0, 0, 0, 2, 4, 16, 4, 8, 28, 48, 6, 12, 44, 76, 120, 8, 16, 60, 104, 164, 224, 10, 20, 80, 140, 224, 308, 424, 12, 24, 100, 176, 284, 392, 540, 688, 14, 28, 124, 220, 356, 492, 680, 868, 1096, 16, 32, 148, 264, 428, 592, 820, 1048, 1324, 1600, 18, 36, 176, 316, 516, 716, 996, 1276, 1616, 1956, 2392
Offset: 1

Views

Author

N. J. A. Sloane, Feb 10 2020

Keywords

Examples

			Triangle begins:
0,
0, 0,
2, 4, 16,
4, 8, 28, 48,
6, 12, 44, 76, 120,
8, 16, 60, 104, 164, 224,
10, 20, 80, 140, 224, 308, 424,
12, 24, 100, 176, 284, 392, 540, 688,
14, 28, 124, 220, 356, 492, 680, 868, 1096,
16, 32, 148, 264, 428, 592, 820, 1048, 1324, 1600,
...
		

Crossrefs

The main diagonal is A331772.

Programs

  • Maple
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    for m from 1 to 12 do lprint(seq(VR(m,n,2),n=1..m),); od:
  • Mathematica
    A332352[m_,n_]:=Sum[If[GCD[i,j]==2,4(m-i)(n-j),0],{i,2,m-1,2},{j,2,n-1,2}]+If[n>2,2(m*n-2m),0]+If[m>2,2(m*n-2n),0];Table[A332352[m, n],{m,15},{n, m}] (* Paolo Xausa, Oct 18 2023 *)

A332357 Consider a partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a_1*x_1 + a_2*x_2 = 1, where (x_1, x_2) is in {1, 2,...,m} X {1, 2,...,n}, m >= 1, n >= 1. Triangle read by rows: T(m,n) = number of cells (both 3-sided and 4-sided) in the partition, for m >= n >= 1.

Original entry on oeis.org

1, 2, 5, 3, 9, 17, 4, 14, 28, 47, 5, 20, 41, 70, 105, 6, 27, 57, 99, 150, 215, 7, 35, 75, 131, 199, 286, 381, 8, 44, 96, 169, 258, 372, 497, 649, 9, 54, 119, 211, 323, 467, 625, 817, 1029, 10, 65, 145, 258, 396, 574, 769, 1006, 1268, 1563, 11, 77, 173, 309, 475, 689, 923, 1208, 1523, 1878, 2257
Offset: 1

Views

Author

N. J. A. Sloane, Feb 11 2020

Keywords

Examples

			Triangle begins:
1,
2, 5,
3, 9, 17,
4, 14, 28, 47,
5, 20, 41, 70, 105,
6, 27, 57, 99, 150, 215,
7, 35, 75, 131, 199, 286, 381,
8, 44, 96, 169, 258, 372, 497, 649,
9, 54, 119, 211, 323, 467, 625, 817, 1029,
10, 65, 145, 258, 396, 574, 769, 1006, 1268, 1563,
...
		

Crossrefs

Cf. A332350, A332352, A332354, A332359 (edges).
Main diagonal is A332358.

Programs

Formula

T(m,n) = A332354(m,n)+A332356(m,n).

A332367 Consider a partition of the plane (a_1,a_2) in R X R by the lines a_1*x_1 + a_2*x_2 = 1 for 0 <= x_1 <= m-1, 1 <= x_2 <= 1-1. The cells are (generalized) triangles and quadrilaterals. Triangle read by rows: T(m,n) = number of triangular cells in the partition for m >= n >= 2.

Original entry on oeis.org

4, 8, 20, 12, 32, 52, 16, 48, 80, 124, 20, 64, 108, 168, 228, 24, 84, 144, 228, 312, 428, 28, 104, 180, 288, 396, 544, 692, 32, 128, 224, 360, 496, 684, 872, 1100, 36, 152, 268, 432, 596, 824, 1052, 1328, 1604, 40, 180, 320, 520, 720, 1000, 1280, 1620, 1960, 2396
Offset: 2

Views

Author

N. J. A. Sloane, Feb 12 2020

Keywords

Examples

			Triangle begins:
4,
8, 20,
12, 32, 52,
16, 48, 80, 124,
20, 64, 108, 168, 228,
24, 84, 144, 228, 312, 428,
28, 104, 180, 288, 396, 544, 692,
32, 128, 224, 360, 496, 684, 872, 1100,
36, 152, 268, 432, 596, 824, 1052, 1328, 1604,
...
		

Crossrefs

For main diagonal see A332368.

Programs

  • Maple
    # Maple code for sequences mentioned in Theorem 12 of Alekseyev et al. (2015).
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    VS := proc(m,n) local a,i,j; a:=0; # A331781
    for i from 1 to m-1 do for j from 1 to n-1 do
    if gcd(i,j)=1 then a:=a+1; fi; od: od: a; end;
    c3 := (m,n) -> VR(m,n,2)+4; # A332367
    for m from 2 to 12 do lprint([seq(c3(m,n),n=2..m)]); od:
    [seq(c3(n,n)/4,n=2..40)]; # A332368
    c4 := (m,n) -> VR(m,n,1)/2 - VR(m,n,2) - 3; # A332369
    for m from 2 to 12 do lprint([seq(c4(m,n),n=2..m)]); od:
    [seq(c4(n,n),n=2..40)]; # A332370
    ct := (m,n) -> c3(m,n)+c4(m,n); # A332371
    for m from 2 to 12 do lprint([seq(ct(m,n),n=2..m)]); od:
    [seq(ct(n,n),n=2..40)]; # A114043
    et := (m,n) -> VR(m,n,1) - VR(m,n,2)/2 - VS(m,n) - 2; # A332372
    for m from 2 to 12 do lprint([seq(et(m,n),n=2..m)]); od:
    [seq(et(n,n),n=2..40)]; # A332373
    vt := (m,n) ->  et(m,n) - ct(m,n) +1; # A332374
    for m from 2 to 12 do lprint([seq(vt(m,n),n=2..m)]); od:
    [seq(vt(n,n),n=2..40)]; # A332375

A332371 Consider a partition of the plane (a_1,a_2) in R X R by the lines a_1*x_1 + a_2*x_2 = 1 for 0 <= x_1 <= m-1, 1 <= x_2 <= 1-1. The cells are (generalized) triangles and quadrilaterals. Triangle read by rows: T(m,n) = total number of cells in the partition for m >= n >= 2.

Original entry on oeis.org

7, 14, 29, 23, 50, 87, 34, 75, 132, 201, 47, 106, 189, 290, 419, 62, 141, 252, 387, 560, 749, 79, 182, 327, 504, 731, 980, 1283, 98, 227, 410, 633, 920, 1235, 1618, 2041, 119, 278, 503, 778, 1133, 1522, 1995, 2518, 3107, 142, 333, 604, 935, 1362, 1829, 2398, 3027, 3736, 4493
Offset: 2

Views

Author

N. J. A. Sloane, Feb 12 2020

Keywords

Comments

Equals sum of triangles A332367 and A332369.

Examples

			Triangle begins:
7,
14, 29,
23, 50, 87,
34, 75, 132, 201,
47, 106, 189, 290, 419,
62, 141, 252, 387, 560, 749,
79, 182, 327, 504, 731, 980, 1283,
98, 227, 410, 633, 920, 1235, 1618, 2041,
119, 278, 503, 778, 1133, 1522, 1995, 2518, 3107,
...
		

Crossrefs

For main diagonal see A114043.

Programs

A332354 Consider a partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a_1*x_1 + a_2*x_2 = 1, where (x_1, x_2) is in {1, 2,...,m} X {1, 2,...,n}, m >= 1, n >= 1. Triangle read by rows: T(m,n) = number of triangular cells in the partition, for m >= n >= 1.

Original entry on oeis.org

1, 2, 5, 3, 8, 15, 4, 11, 22, 33, 5, 14, 31, 48, 71, 6, 17, 40, 63, 94, 125, 7, 20, 51, 82, 125, 168, 227, 8, 23, 62, 101, 156, 211, 286, 361, 9, 26, 75, 124, 193, 262, 357, 452, 567, 10, 29, 88, 147, 230, 313, 428, 543, 682, 821, 11, 32, 103, 174, 275, 376, 517, 658, 829, 1000, 1219
Offset: 1

Views

Author

N. J. A. Sloane, Feb 11 2020

Keywords

Examples

			Triangle begins:
1,
2, 5,
3, 8, 15,
4, 11, 22, 33,
5, 14, 31, 48, 71,
6, 17, 40, 63, 94, 125,
7, 20, 51, 82, 125, 168, 227,
8, 23, 62, 101, 156, 211, 286, 361,
9, 26, 75, 124, 193, 262, 357, 452, 567,
10, 29, 88, 147, 230, 313, 428, 543, 682, 821,
...
		

Crossrefs

Main diagonal is A332355.

Programs

  • Maple
    # VR(m,n,q) is f_q(m,n) from the Alekseyev et al. reference.
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    ct3 := proc(m,n) local i; global VR;
    if m=1 or n=1 then max(m,n) else VR(m,n,2)/2+m+n+1; fi; end;
    for m from 1 to 12 do lprint([seq(ct3(m,n),n=1..m)]); od:

A332372 Consider a partition of the plane (a_1,a_2) in R X R by the lines a_1*x_1 + a_2*x_2 = 1 for 0 <= x_1 <= m-1, 1 <= x_2 <= 1-1. The cells are (generalized) triangles and quadrilaterals. Triangle read by rows: T(m,n) = total number of edges in the partition for m >= n >= 2.

Original entry on oeis.org

9, 20, 43, 35, 77, 139, 54, 118, 213, 327, 77, 170, 310, 479, 703, 104, 229, 417, 642, 941, 1259, 135, 299, 546, 842, 1236, 1657, 2183, 170, 376, 688, 1062, 1561, 2094, 2759, 3487, 209, 464, 850, 1313, 1933, 2594, 3418, 4321, 5355, 252, 559, 1024, 1581, 2327, 3118, 4107, 5190, 6431, 7723
Offset: 2

Views

Author

N. J. A. Sloane, Feb 12 2020

Keywords

Examples

			Triangle begins:
9,
20, 43,
35, 77, 139,
54, 118, 213, 327,
77, 170, 310, 479, 703,
104, 229, 417, 642, 941, 1259,
135, 299, 546, 842, 1236, 1657, 2183,
170, 376, 688, 1062, 1561, 2094, 2759, 3487,
209, 464, 850, 1313, 1933, 2594, 3418, 4321, 5355,
...
		

Crossrefs

For main diagonal see A332373.

Programs

A332374 Consider a partition of the plane (a_1,a_2) in R X R by the lines a_1*x_1 + a_2*x_2 = 1 for 0 <= x_1 <= m-1, 1 <= x_2 <= 1-1. The cells are (generalized) triangles and quadrilaterals. Triangle read by rows: T(m,n) = total number of vertices in the partition for m >= n >= 2.

Original entry on oeis.org

3, 7, 15, 13, 28, 53, 21, 44, 82, 127, 31, 65, 122, 190, 285, 43, 89, 166, 256, 382, 511, 57, 118, 220, 339, 506, 678, 901, 73, 150, 279, 430, 642, 860, 1142, 1447, 91, 187, 348, 536, 801, 1073, 1424, 1804, 2249, 111, 227, 421, 647, 966, 1290, 1710, 2164, 2696, 3231
Offset: 2

Views

Author

N. J. A. Sloane, Feb 12 2020

Keywords

Comments

T(m,n) = A332372(m,n) - A332371(m,n) + 1 (this is Euler's formula).

Examples

			Triangle begins:
3,
7, 15,
13, 28, 53,
21, 44, 82, 127,
31, 65, 122, 190, 285,
43, 89, 166, 256, 382, 511,
57, 118, 220, 339, 506, 678, 901,
73, 150, 279, 430, 642, 860, 1142, 1447,
91, 187, 348, 536, 801, 1073, 1424, 1804, 2249,
...
		

Crossrefs

For main diagonal see A332375.

Programs

A332351 Triangle read by rows: T(m,n) = Sum_{-m= n >= 1.

Original entry on oeis.org

0, 1, 6, 2, 13, 28, 3, 22, 49, 86, 4, 33, 74, 131, 200, 5, 46, 105, 188, 289, 418, 6, 61, 140, 251, 386, 559, 748, 7, 78, 181, 326, 503, 730, 979, 1282, 8, 97, 226, 409, 632, 919, 1234, 1617, 2040, 9, 118, 277, 502, 777, 1132, 1521, 1994, 2517, 3106, 10, 141, 332, 603, 934, 1361, 1828, 2397, 3026, 3735, 4492
Offset: 1

Views

Author

N. J. A. Sloane, Feb 10 2020

Keywords

Comments

This is the triangle in A332350, halved.
This triangle is the lower half of the array defined in A115009.

Examples

			Triangle begins:
0,
1, 6,
2, 13, 28,
3, 22, 49, 86,
4, 33, 74, 131, 200,
5, 46, 105, 188, 289, 418,
6, 61, 140, 251, 386, 559, 748,
7, 78, 181, 326, 503, 730, 979, 1282,
8, 97, 226, 409, 632, 919, 1234, 1617, 2040,
9, 118, 277, 502, 777, 1132, 1521, 1994, 2517, 3106,
...
		

References

  • Jovisa Zunic, Note on the number of two-dimensional threshold functions, SIAM J. Discrete Math. Vol. 25 (2011), No. 3, pp. 1266-1268. See Equation (1.2).

Crossrefs

The main diagonal is A141255, or A114043 - 1.
This is the lower triangle of the array in A115009.

Programs

  • Maple
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    for m from 1 to 12 do lprint(seq(VR(m,n,1)/2,n=1..m),); od:
  • Mathematica
    A332351[m_,n_]:=Sum[If[CoprimeQ[i,j],2(m-i)(n-j),0],{i,m-1},{j,n-1}]+2m*n-m-n;Table[A332351[m,n],{m,15},{n,m}] (* Paolo Xausa, Oct 18 2023 *)

A332356 Consider a partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a_1*x_1 + a_2*x_2 = 1, where (x_1, x_2) is in {1, 2,...,m} X {1, 2,...,n}, m >= 1, n >= 1. Triangle read by rows: T(m,n) = number of quadrilateral cells in the partition, for m >= n >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 0, 3, 6, 14, 0, 6, 10, 22, 34, 0, 10, 17, 36, 56, 90, 0, 15, 24, 49, 74, 118, 154, 0, 21, 34, 68, 102, 161, 211, 288, 0, 28, 44, 87, 130, 205, 268, 365, 462, 0, 36, 57, 111, 166, 261, 341, 463, 586, 742, 0, 45, 70, 135, 200, 313, 406, 550, 694, 878, 1038
Offset: 1

Views

Author

N. J. A. Sloane, Feb 11 2020

Keywords

Examples

			Triangle begins:
0,
0, 0,
0, 1, 2,
0, 3, 6, 14,
0, 6, 10, 22, 34,
0, 10, 17, 36, 56, 90,
0, 15, 24, 49, 74, 118, 154,
0, 21, 34, 68, 102, 161, 211, 288,
0, 28, 44, 87, 130, 205, 268, 365, 462,
0, 36, 57, 111, 166, 261, 341, 463, 586, 742,
...
		

Crossrefs

Main diagonal is A324043.

Programs

  • Maple
    # VR(m,n,q) is f_q(m,n) from the Alekseyev et al. reference.
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    ct4 := proc(m,n) local i; global VR;
    if m=1 or n=1 then 0 else VR(m,n,1)/4-VR(m,n,2)/2-m/2-n/2-1; fi; end;
    for m from 1 to 12 do lprint([seq(ct4(m,n),n=1..m)]); od:
  • Mathematica
    VR[m_, n_, q_] := Module[{a = 0, i, j}, For[i = -m + 1, i <= m - 1, i++, For[j = -n + 1, j <= n - 1, j++, If[GCD[i, j] == q, a = a + (m - Abs[i])*(n - Abs[j])]]];a];
    ct4 [m_, n_] := If[m == 1 || n == 1, 0, VR[m, n, 1]/4 - VR[m, n, 2]/2 - m/2 - n/2 - 1];
    Table[ct4[m, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Mar 09 2023, after Maple code *)

A332359 Consider a partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a_1*x_1 + a_2*x_2 = 1, where (x_1, x_2) is in {1, 2,...,m} X {1, 2,...,n}, m >= 1, n >= 1. Triangle read by rows: T(m,n) = number of edges in the partition, for m >= n >= 1.

Original entry on oeis.org

3, 5, 10, 7, 17, 30, 9, 26, 49, 82, 11, 37, 71, 121, 180, 13, 50, 99, 172, 259, 374, 15, 65, 130, 227, 342, 495, 656, 17, 82, 167, 294, 445, 646, 859, 1126, 19, 101, 207, 367, 557, 811, 1080, 1417, 1784, 21, 122, 253, 450, 685, 1000, 1333, 1750, 2205, 2726, 23, 145, 302, 539, 821, 1199, 1597, 2097, 2642, 3267, 3916
Offset: 1

Views

Author

N. J. A. Sloane, Feb 11 2020

Keywords

Examples

			Triangle begins:
3,
5, 10,
7, 17, 30,
9, 26, 49, 82,
11, 37, 71, 121, 180,
13, 50, 99, 172, 259, 374,
15, 65, 130, 227, 342, 495, 656,
17, 82, 167, 294, 445, 646, 859, 1126,
19, 101, 207, 367, 557, 811, 1080, 1417, 1784,
21, 122, 253, 450, 685, 1000, 1333, 1750, 2205, 2726,
...
		

Crossrefs

Cf. A332350, A332352, A332354, A332357 (edges).
Main diagonal is A332360.

Programs

  • Maple
    VR := proc(m,n,q) local a,i,j; a:=0;
    for i from -m+1 to m-1 do for j from -n+1 to n-1 do
    if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
    cte := proc(m,n) local i; global VR;
    if m=1 or n=1 then 2*max(m,n)+1 else VR(m,n,1)/2-VR(m,n,2)/4+m+n; fi; end;
    for m from 1 to 12 do lprint([seq(cte(m,n),n=1..m)]); od:

Formula

T(m,n) = (3*A332354(m,n) + 4*A332356(m,n) + m + n + 1)/2.
Showing 1-10 of 15 results. Next