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

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

Original entry on oeis.org

0, 2, 12, 4, 26, 56, 6, 44, 98, 172, 8, 66, 148, 262, 400, 10, 92, 210, 376, 578, 836, 12, 122, 280, 502, 772, 1118, 1496, 14, 156, 362, 652, 1006, 1460, 1958, 2564, 16, 194, 452, 818, 1264, 1838, 2468, 3234, 4080, 18, 236, 554, 1004, 1554, 2264, 3042, 3988, 5034, 6212
Offset: 1

Views

Author

N. J. A. Sloane, Feb 10 2020

Keywords

Examples

			Triangle begins:
0,
2, 12,
4, 26, 56,
6, 44, 98, 172,
8, 66, 148, 262, 400,
10, 92, 210, 376, 578, 836,
12, 122, 280, 502, 772, 1118, 1496,
14, 156, 362, 652, 1006, 1460, 1958, 2564,
16, 194, 452, 818, 1264, 1838, 2468, 3234, 4080,
18, 236, 554, 1004, 1554, 2264, 3042, 3988, 5034, 6212,
...
		

Crossrefs

The main diagonal is A331771.

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),n=1..m),); od:
  • Mathematica
    T[m_, n_] := Sum[Boole[GCD[i, j] == 1] (m - Abs[i]) (n - Abs[j]), {i, -m + 1, m - 1}, {j, -n + 1, n - 1}];
    Table[T[m, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Apr 19 2020 *)

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

A115009 Array read by antidiagonals: let V(m,n) = Sum_{i=1..m, j=1..n, gcd(i,j)=1} (m+1-i)*(n+1-j), then T(m,n) = 2*m*n+m+n+2*V(m,n), for m >= 0, n >= 0.

Original entry on oeis.org

0, 1, 1, 2, 6, 2, 3, 13, 13, 3, 4, 22, 28, 22, 4, 5, 33, 49, 49, 33, 5, 6, 46, 74, 86, 74, 46, 6, 7, 61, 105, 131, 131, 105, 61, 7, 8, 78, 140, 188, 200, 188, 140, 78, 8, 9, 97, 181, 251, 289, 289, 251, 181, 97, 9, 10, 118, 226, 326, 386, 418, 386, 326, 226, 118, 10, 11, 141, 277
Offset: 0

Views

Author

N. J. A. Sloane, Feb 24 2006

Keywords

Comments

This is the number of linear partitions of an m X n grid.

Examples

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

References

  • D. M. Acketa, J. D. Zunic: On the number of linear partitions of the (m,n)-grid. Inform. Process. Lett., 38 (3) (1991), 163-168. See Table A.1.
  • 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 second and third rows are A028872 and A358296.
The main diagonal is A141255 = A114043 - 1.
The lower triangle is A332351.

Programs

  • Maple
    V:=proc(m,n) local t1,i,j; t1:=0; for i from 1 to m do for j from 1 to n do if gcd(i,j)=1 then t1:=t1+(m+1-i)*(n+1-j); fi; od; od; t1; end; T:=(m,n)->(2*m*n+m+n+2*V(m,n));
  • Mathematica
    V[m_, n_] := Sum[If[GCD[i, j] == 1, (m-i+1)*(n-j+1), 0], {i, 1, m}, {j, 1, n}]; T[m_, n_] := 2*m*n+m+n+2*V[m, n]; Table[T[m-n, n], {m, 0, 11}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)
Showing 1-3 of 3 results.