OFFSET
1,2
COMMENTS
Associative multiplication-like table whose values depend on whether n and k are odd or even.
Associativity is proved by checking the formula with eight cases of three odd and even arguments. T(n,k) is distributive as long as partitioning an even number into two odd numbers is not allowed.
LINKS
David Lovler, Table of n, a(n) for n = 1..465 [restored by Georg Fischer, Oct 14 2019]
FORMULA
T(n,k) = 2*n*k - n - k + 1 if n is odd and k is odd;
T(n,k) = 2*n*k - n if n is even and k is odd;
T(n,k) = 2*n*k - k if n is odd and k is even;
T(n,k) = 2*n*k if n is even and k is even.
T(n,k) = 8*floor(n/2)*floor(k/2) + A319929(n,k).
T(n,n) = A354595(n). - David Lovler, Jul 09 2022
Writing T(n,k) as (4*n*k - 2*A319929(n,k))/2 shows that the array is U(4;n,k) of A327263. - David Lovler, Jan 15 2022
EXAMPLE
Array T(n,k) begins:
1 2 3 4 5 6 7 8 9 10
2 8 10 16 18 24 26 32 34 40
3 10 13 20 23 30 33 40 43 50
4 16 20 32 36 48 52 64 68 80
5 18 23 36 41 54 59 72 77 90
6 24 30 48 54 72 78 96 102 120
7 26 33 52 59 78 85 104 111 130
8 32 40 64 72 96 104 128 136 160
9 34 43 68 77 102 111 136 145 170
10 40 50 80 90 120 130 160 170 200
MATHEMATICA
T[n_, k_]:=2n*k-If[Mod[n, 2]==1, If[Mod[k, 2]==1, n+k-1, k], If[Mod[k, 2]==1, n, 0]]; MatrixForm[Table[T[n, k], {n, 1, 10}, {k, 1, 10}]] (* Stefano Spezia, Sep 05 2019 *)
PROG
(PARI) T(n, k) = 2*n*k - if (n%2, if (k%2, n+k-1, k), if (k%2, n, 0));
matrix(8, 8, n, k, T(n, k)) \\ Michel Marcus, Sep 04 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
David Lovler, Aug 27 2019
STATUS
approved