64 is 13 mod 17
So the mod 17 value of 3^x * 5^y must be 4
A list of 3^n and 5^n mod 17
n 3 5
0 1 1
1 3 5
2 9 8
3 10 6
4 13 13
5 5 14
6 15 2
7 11 10
8 16 16
9 14 12
10 8 9
11 7 11
12 4 4
13 12 3
14 2 15
15 6 7
16 1 1
17 3 5
18 9 8
19 10 6
20 13 13
21 5 14
22 15 2
23 11 0
24 16 0
Consider a=3^x and b=5^y
Need to find examples where (a*b) mod 17 equals 4:
[1, 4], [2, 2], [3, 7], [5, 11], [6, 12], [8, 9], [10, 14], [15, 15]
Then check each pair to see if the LHS is a power of 17 rather than merely a multiple of 17.
Answer: when (x,y,z) = (2,2,2), both sides equal 289
------
import math
power17s = [17**n for n in range(200)]
ans = []
for a in range(16):
for b in range(16):
c = a*b
pair = [a,b]
if c%17 == 4 and pair not in ans:
ans.append(pair)
print('Possible exponents for 3 and 5', '\n', ans)
for pair in ans:
lhs = 64 + 3**pair[0] * 5**pair[1]
if lhs in power17s:
z = round(math.log(lhs) / math.log(17))
triplet = pair
triplet.append(z)
print('\n', '(x,y,z): ', triplet)
---- program output:
Possible exponents for 3 and 5
[[1, 4], [2, 2], [3, 7], [4, 1], [5, 11], [6, 12], [7, 3], [8, 9], [9, 8], [10, 14], [11, 5], [12, 6], [14, 10], [15, 15]]
(x,y,z): [2, 2, 2]
|
Posted by Larry
on 2024-12-19 08:13:47 |