A331762 Triangle read by rows: T(n,k) (1 <= k <= n) = Sum_{i=1..n, j=1..k, gcd(i,j)=2} (n+1-i)*(k+1-j).
0, 0, 1, 0, 2, 4, 0, 4, 8, 15, 0, 6, 12, 22, 32, 0, 9, 18, 33, 48, 71, 0, 12, 24, 44, 64, 94, 124, 0, 16, 32, 58, 84, 123, 162, 211, 0, 20, 40, 72, 104, 152, 200, 260, 320, 0, 25, 50, 90, 130, 190, 250, 325, 400, 499
Offset: 1
Examples
Triangle begins: 0; 0, 1; 0, 2, 4; 0, 4, 8, 15; 0, 6, 12, 22, 32; 0, 9, 18, 33, 48, 71; 0, 12, 24, 44, 64, 94, 124; 0, 16, 32, 58, 84, 123, 162, 211; 0, 20, 40, 72, 104, 152, 200, 260, 320; 0, 25, 50, 90, 130, 190, 250, 325, 400, 499; 0, 30, 60, 108, 156, 228, 300, 390, 480, 598, 716; ...
Links
- M. A. Alekseyev. On the number of two-dimensional threshold functions. SIAM J. Disc. Math. 24(4), 2010, pp. 1617-1631. doi:10.1137/090750184
- M. A. Alekseyev, M. Basova, N. Yu. Zolotykh. On the minimal teaching sets of two-dimensional threshold functions. SIAM J. Disc. Math. 29(1), 2015, pp. 157-165.
Crossrefs
Programs
-
Maple
V := proc(m,n,q) local a,i,j; a:=0; for i from 1 to m do for j from 1 to n do if gcd(i,j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end; for m from 1 to 12 do lprint([seq(V(m,n,2),n=1..m)]); od:
-
Mathematica
Table[Sum[Boole[GCD[i, j] == 2] (n + 1 - i) (k + 1 - j), {i, n}, {j, k}], {n, 11}, {k, n}] // Flatten (* Michael De Vlieger, Feb 04 2020 *)