login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 2

%I #29 Jan 26 2022 08:22:01

%S 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 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 0,0,0,0,0,0,0,0,0,0

%N 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 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 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 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 T(d^(2x), d^(2y-1)) = 1 for all positive integers d > 1, x, y.

%F 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 Triangle T(n,k) begins:

%e n\k 2 3 4 5 6 7 8 9 10 11 ...

%e 2 0

%e 3 0 0

%e 4 1 0 0

%e 5 0 0 0 0

%e 6 0 0 0 0 0

%e 7 0 0 0 0 0 0

%e 8 0 0 1 0 0 0 0

%e 9 0 1 0 0 0 0 0 0

%e 10 0 0 0 0 0 0 0 0 0

%e 11 0 0 0 0 0 0 0 0 0 0

%e ...

%e 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 (Python)

%o def T(n, k):

%o parity_check = [False]

%o i = 0

%o while True:

%o while not n % k:

%o n /= k

%o parity_check[i] = not parity_check[i]

%o if k % n:

%o return 0

%o elif n == 1:

%o x, y = True, not parity_check[0]

%o for j in range(1, i + 1):

%o x, y = y, x ^ (y and parity_check[j])

%o return y + 0

%o else:

%o n, k = k, n

%o parity_check.append(False)

%o i += 1

%o print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)])

%o (Python)

%o def T(n, k):

%o nk = n*k

%o is_odd = 0

%o while True:

%o while not n % k:

%o n /= k

%o if k % n:

%o return 0

%o elif n == 1:

%o while not nk % k:

%o nk /= k

%o is_odd = 0 if is_odd else 1

%o return is_odd

%o else:

%o n, k = k, n

%o print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)])

%Y Cf. A000302, A001019, A001025, A004171, A007814, A007916, A009969, A009980, A013708-A013715, A052409, A052410, A087752, A089357, A089683, A098608, A346460, A346461.

%K nonn,tabl

%O 2

%A _M. Eren Kesim_, Jul 19 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 04:19 EDT 2024. Contains 375420 sequences. (Running on oeis4.)