%I #58 Sep 15 2022 01:06:43
%S 1,2,2,3,2,3,4,4,4,4,5,4,7,4,5,6,6,8,8,6,6,7,6,11,8,11,6,7,8,8,12,12,
%T 12,12,8,8,9,8,15,12,17,12,15,8,9,10,10,16,16,18,18,16,16,10,10,11,10,
%U 19,16,23,18,23,16,19,10,11
%N Arithmetic table similar to multiplication with different rules for odd and even products, read by antidiagonals. T(n,k) = (n*k + A319929(n,k))/2.
%C This table is akin to multiplication in that it is associative, 1 is the identity and 0 takes any number to 0. Associativity is proved by checking eight cases of three ordered odd and even numbers. Distributivity works except if an even number is partitioned into a sum of two odd numbers.
%C Excluding the first row and the first column, every number in the table is of the form 2i*j or 2i*j - 1 where i and j > 0. Every positive even number appears in the table. Odd numbers that do not appear are of the form 2p - 1 where p is a prime number.
%H Michael De Vlieger, <a href="/A322630/b322630.txt">Table of n, a(n) for n = 1..11325</a> (rows 1..150, flattened).
%F T(n,k) = (n*k + n + k - 1)/2 if n is odd and k is odd;
%F T(n,k) = (n*k + n)/2 if n is even and k is odd;
%F T(n,k) = (n*k + k)/2 if n is odd and k is even;
%F T(n,k) = n*k/2 if n is even and k is even.
%e Array T(n,k) begins:
%e 1 2 3 4 5 6 7 8 9 10
%e 2 2 4 4 6 6 8 8 10 10
%e 3 4 7 8 11 12 15 16 19 20
%e 4 4 8 8 12 12 16 16 20 20
%e 5 6 11 12 17 18 23 24 29 30
%e 6 6 12 12 18 18 24 24 30 30
%e 7 8 15 16 23 24 31 32 39 40
%e 8 8 16 16 24 24 32 32 40 40
%e 9 10 19 20 29 30 39 40 49 50
%e 10 10 20 20 30 30 40 40 50 50
%t Table[Function[n, Switch[FromDigits[Mod[{n, k}, 2], 2], 0, n k/2, 1, (n k + n)/2, 2, (n k + k)/2, _, (n k + n + k - 1)/2]][m - k + 1], {m, 11}, {k, m}] // Flatten (* _Michael De Vlieger_, Jan 14 2022 *)
%o (PARI) T319929(n,k) = if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
%o T(n,k) = (T319929(n,k) + n*k)/2;
%o matrix(6, 6, n, k, T(n,k)) \\ _Michel Marcus_, Dec 22 2018
%Y Cf. A076274, A327263.
%Y 0 and diagonal is A213037.
%K nonn,tabl,easy
%O 1,2
%A _David Lovler_, Dec 20 2018
%E Name clarified by _David Lovler_, Jan 24 2022