OFFSET
1,25
COMMENTS
Every nonnegative integer occurs infinitely many times in the matrix.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10011 (antidiagonals 1 to 141, flattened)
FORMULA
Diagonal entries S(n,n) = A160384(n) since all nonzero digits match. - Robert Israel, Mar 18 2018
EXAMPLE
Northwest corner:
1 0 0 1 0 0 1 0 0 1 0 0 1
0 1 0 0 1 0 0 1 0 0 1 0 0
0 0 1 1 1 0 0 0 0 0 0 1 1
1 0 1 2 1 0 1 0 0 1 0 1 2
0 1 1 1 2 0 0 1 0 0 1 1 1
0 0 0 0 0 1 1 1 0 0 0 0 0
1 0 0 1 0 1 2 1 0 1 0 0 1
0 1 0 0 1 1 1 2 0 0 1 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1
1 0 0 1 0 0 1 0 1 2 1 1 2
0 1 0 0 1 0 0 1 1 1 2 1 1
0 0 1 1 1 0 0 0 1 1 1 2 2
1 0 1 2 1 0 1 0 1 2 1 2 3
4 = 3 + 1 and 13 = 3^2 + 3 + 1, so S(13,4)=2.
MAPLE
S:= proc(m, n) local M, N;
M:= convert(m, base, 3);
N:= convert(n, base, 3);
convert(zip((s, t) -> `if`(s=t and s <> 0, 1, 0), M, N), `+`);
end proc:
seq(seq(S(k, n-k+1), k=1..n), n=1..30); # Robert Israel, Mar 19 2018
MATHEMATICA
d[n_] := IntegerDigits[n, 3];
t[n_] := Reverse[Array[d, 100][[n]]]
s[n_, k_] := Position[t[n], k]
t[m_, n_] := Sum[Length[Intersection[s[m, k], s[n, k]]], {k, 1, 2}]
TableForm[Table[t[m, n], {m, 1, 24},
{n, 1, 24}]] (* A206567 as a matrix *)
Flatten[Table[t[i, n + 1 - i], {n, 1, 24},
{i, 1, n}]] (* A206567 as a sequence *)
PROG
(PARI) d(n) = Vecrev(digits(n, 3));
T(n, k) = {my(dn = d(n), dk = d(k), nb = min(#dn, #dk)); sum(i=1, nb, dn[i] && (dn[i] == dk[i])); } \\ Michel Marcus, Mar 19 2018
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Feb 09 2012
EXTENSIONS
Edited by Robert Israel, Mar 19 2018
STATUS
approved