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
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2
COMMENTS
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.
If n is an element of A007916, then T(n,k) = 1 if and only if k is a perfect power of n^2.
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).
LINKS
FORMULA
T(d^(2x), d^(2y-1)) = 1 for all positive integers d > 1, x, y.
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.
EXAMPLE
Triangle T(n,k) begins:
n\k 2 3 4 5 6 7 8 9 10 11 ...
2 0
3 0 0
4 1 0 0
5 0 0 0 0
6 0 0 0 0 0
7 0 0 0 0 0 0
8 0 0 1 0 0 0 0
9 0 1 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0
...
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.
PROG
(Python)
def T(n, k):
parity_check = [False]
i = 0
while True:
while not n % k:
n /= k
parity_check[i] = not parity_check[i]
if k % n:
return 0
elif n == 1:
x, y = True, not parity_check[0]
for j in range(1, i + 1):
x, y = y, x ^ (y and parity_check[j])
return y + 0
else:
n, k = k, n
parity_check.append(False)
i += 1
print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)])
(Python)
def T(n, k):
nk = n*k
is_odd = 0
while True:
while not n % k:
n /= k
if k % n:
return 0
elif n == 1:
while not nk % k:
nk /= k
is_odd = 0 if is_odd else 1
return is_odd
else:
n, k = k, n
print([T(n, k) for n in range(2, 14) for k in range(2, n + 1)])
CROSSREFS
Sequence in context: A194670 A130543 A185013 * A193243 A281302 A369426
KEYWORD
nonn,tabl
AUTHOR
M. Eren Kesim, Jul 19 2021
STATUS
approved

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 01:19 EDT 2024. Contains 375418 sequences. (Running on oeis4.)