OFFSET
0,7
COMMENTS
LINKS
Antti Karttunen, The first 121 antidiagonals of the table, flattened
EXAMPLE
The top left corner of this square array begins as:
0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, ...
1, 0, 2, 1, 2, 1, 2, 1, 3, 2, 3, ...
1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 2, ...
2, 1, 1, 0, 2, 1, 3, 2, 2, 1, 3, ...
1, 2, 1, 2, 0, 1, 2, 3, 2, 3, 1, ...
2, 1, 2, 1, 1, 0, 3, 2, 3, 2, 2, ...
1, 2, 2, 3, 2, 3, 0, 1, 1, 2, 1, ...
2, 1, 3, 2, 3, 2, 1, 0, 2, 1, 2, ...
2, 3, 1, 2, 2, 3, 1, 2, 0, 1, 1, ...
3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 2, ...
2, 3, 2, 3, 1, 2, 1, 2, 1, 2, 0, ...
...
For example, T(1,2) = T(2,1) = 2 as 1 has factorial base representation '...0001' and 2 has factorial base representation '...0010', and they differ by their two least significant digits.
On the other hand, T(3,5) = T(5,3) = 1, as 3 has factorial base representation '...0011' and 5 has factorial base representation '...0021', and they differ only by their second rightmost digit.
MATHEMATICA
nn = 14; m = 1; While[m! < nn, m++]; m; Table[Function[w, Count[Subtract @@ Map[PadLeft[#, Max@ Map[Length, w]] &, w], k_ /; k != 0]]@ Map[IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, {i - j, j}], {i, 0, nn}, {j, 0, i}] // Flatten (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
PROG
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Nov 10 2013
STATUS
approved