OFFSET
1,5
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.
EXAMPLE
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;
...
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 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Feb 04 2020
STATUS
approved