# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a346459 Showing 1-1 of 1 %I A346459 #29 Jan 26 2022 08:22:01 %S A346459 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0, %T A346459 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A346459 0,0,0,0,0,0,0,0,0,0 %N A346459 Triangle read by rows: T(n,k) = 0 if all positive integers can be colored with two colors without any positive integer x being the same color as n*x or k*x; otherwise, T(n,k) = 1 (for 2 <= k <= n). %C A346459 T(n,k) = 1 if and only if there exists at least one pair of positive integers (x, y) such that n^x = k^y and x+y is odd. Otherwise, T(n,k) = 0. %C A346459 If n is an element of A007916, then T(n,k) = 1 if and only if k is a perfect power of n^2. %C A346459 T(n,k) = 1 if and only if there exists a positive integer x for which A052410(n)^x = k and A007814(A052409(n)) != A007814(x). %F A346459 T(d^(2x), d^(2y-1)) = 1 for all positive integers d > 1, x, y. %F A346459 T(A000302(n), A004171(k)) = T(A001019(n), A013708(k)) = T(A001025(n), A013709(k)) = T(A009969(n), A013710(k)) = T(A009980(n), A013711(k)) = T(A087752(n), A013712(k)) = T(A089357(n), A013713(k)) = T(A089683(n), A013714(k)) = T(A098608(n), A013715(k)) = 1 for all n >= 1, k >= 0. %e A346459 Triangle T(n,k) begins: %e A346459 n\k 2 3 4 5 6 7 8 9 10 11 ... %e A346459 2 0 %e A346459 3 0 0 %e A346459 4 1 0 0 %e A346459 5 0 0 0 0 %e A346459 6 0 0 0 0 0 %e A346459 7 0 0 0 0 0 0 %e A346459 8 0 0 1 0 0 0 0 %e A346459 9 0 1 0 0 0 0 0 0 %e A346459 10 0 0 0 0 0 0 0 0 0 %e A346459 11 0 0 0 0 0 0 0 0 0 0 %e A346459 ... %e A346459 If we color all positive integers whose 2-adic order and 3-adic order add up to an even number in color A and the rest in color B, every positive integer will be a different color from its double and triple. Therefore, T(3, 2) = 0. %o A346459 (Python) %o A346459 def T(n, k): %o A346459 parity_check = [False] %o A346459 i = 0 %o A346459 while True: %o A346459 while not n % k: %o A346459 n /= k %o A346459 parity_check[i] = not parity_check[i] %o A346459 if k % n: %o A346459 return 0 %o A346459 elif n == 1: %o A346459 x, y = True, not parity_check[0] %o A346459 for j in range(1, i + 1): %o A346459 x, y = y, x ^ (y and parity_check[j]) %o A346459 return y + 0 %o A346459 else: %o A346459 n, k = k, n %o A346459 parity_check.append(False) %o A346459 i += 1 %o A346459 print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)]) %o A346459 (Python) %o A346459 def T(n, k): %o A346459 nk = n*k %o A346459 is_odd = 0 %o A346459 while True: %o A346459 while not n % k: %o A346459 n /= k %o A346459 if k % n: %o A346459 return 0 %o A346459 elif n == 1: %o A346459 while not nk % k: %o A346459 nk /= k %o A346459 is_odd = 0 if is_odd else 1 %o A346459 return is_odd %o A346459 else: %o A346459 n, k = k, n %o A346459 print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)]) %Y A346459 Cf. A000302, A001019, A001025, A004171, A007814, A007916, A009969, A009980, A013708-A013715, A052409, A052410, A087752, A089357, A089683, A098608, A346460, A346461. %K A346459 nonn,tabl %O A346459 2 %A A346459 _M. Eren Kesim_, Jul 19 2021 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE