%I #36 Oct 18 2024 18:39:33
%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,
%T 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,
%U 1,1,1,1,1,1,1,1,1,1
%N Square array read by antidiagonals: T(n, k) = 1 if the digits of p = n*k in base 2 are exactly the same as the digits of p when considering the base-2 representations of n, k and p as base-10 numbers, otherwise T(n, k) = 0.
%C As n * k = k * n, the array is symmetric.
%H Antti Karttunen, <a href="/A322674/b322674.txt">Table of n, a(n) for n = 0..10584; the first 145 antidiagonals of array</a>
%H Jan Koornstra, <a href="/A322674/a322674.pdf">Graph of all pairs up to (1024, 1024)</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%e In base 2, 1001 * 10100 = 10110100. In base 10, 1001 * 10100 = 10110100. These digits match and therefore the pairs T(9, 20) and T(20, 9) are a 1 in the sequence (at a(444) and a(455)).
%e In base 2, the product of 11 * 11 = 1001, whereas 11 * 11 in base 10 yields 121. T(3, 3) is the 24th pair in the sequence and the first to fail. a(24) is thus a 0.
%e The array begins:
%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%e 1, 1, 1, 0, 1, 1, 0, 0, 1, ...
%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%e 1, 1, 1, 1, 1, 0, 1, 0, 1, ...
%e 1, 1, 1, 0, 1, 1, 0, 0, 1, ...
%e 1, 1, 1, 0, 1, 0, 0, 0, 1, ...
%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
%o (Python)
%o def a322674(k):
%o seq = []
%o i = 0
%o while len(seq) <= k:
%o j = 0
%o while len(seq) <= k and j < i + 1:
%o n = i - j
%o m = j
%o decn = int(bin(n).replace('0b', ''))
%o decm = int(bin(m).replace('0b', ''))
%o binProd = bin(n * m).replace('0b', '')
%o decProd = str(decn * decm)
%o seq.append(int(binProd == decProd))
%o j += 1
%o i += 1
%o print(seq)
%o a322674(100)
%o (PARI) T(n,k) = fromdigits(binary(n))*fromdigits(binary(k)) == fromdigits(binary(n*k)); \\ _Michel Marcus_, Apr 03 2019
%Y Cf. A071998, A007088, A257831, A080719.
%K nonn,easy,base,tabl
%O 0
%A _Jan Koornstra_, Jan 22 2019