|
|
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.
|
|
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
|
Cf. A000302, A001019, A001025, A004171, A007814, A007916, A009969, A009980, A013708-A013715, A052409, A052410, A087752, A089357, A089683, A098608, A346460, A346461.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|