login
A332352
Triangle read by rows: T(m,n) = Sum_{-m<i<m, -n<j<n, gcd{i,j}=2} (m-|i|)*(n-|j|), m >= n >= 1.
15
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,4
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..11325 (rows 1..150 of the triangle, flattened)
M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh. On the minimal teaching sets of two-dimensional threshold functions. SIAM Journal on Discrete Mathematics 29:1 (2015), 157-165. doi:10.1137/140978090. This sequence is f_2(m,n).
EXAMPLE
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,
...
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 *)
CROSSREFS
The main diagonal is A331772.
Sequence in context: A125594 A097542 A277850 * A217291 A364247 A338839
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Feb 10 2020
STATUS
approved