α, β, γ, δ, ε, ζ represents 6 consecutive digits (in any order) of base-N, where N is a positive integer.
It is known that:
(αβ)2 + (γδ)2 = (εζ)2
Determine the minimum value of N.
Note: αβ represents the concatenation of the digits and not their multiplication.
I checked bases from 6 to 1000 and found 3 solutions, all being congruent to 3-4-5 triangles.
Base 10: 27^2 + 36^2 = 45^2
Base 14: 58^2 + 76^2 = 94^2 --> decimal 78^2 + 104^2 = 130^2
Base 16: 5A^2 + 78^2 = 96^2 --> decimal 90^2 + 120^2 = 150^2
The minimum base, N, is 10.
10 (2, 7, 3, 6, 4, 5)
14 (5, 8, 7, 6, 9, 4)
16 (5, 10, 7, 8, 9, 6)
-------------
from itertools import permutations
def rotated(aTuple):
return aTuple[2:4]+aTuple[0:2]+aTuple[4:]
big = 1000
answers = []
for base in range(6,big):
for first in range(0,base - 5):
nums = [first + k for k in range(6)]
for perm in permutations(nums):
lhs = (perm[0]*base + perm[1])**2 + (perm[2]*base + perm[3])**2
rhs = (perm[4]*base + perm[5])**2
if rhs == lhs and [base,rotated(perm)] not in answers:
print(base, perm)
answers.append([base,perm])
|
Posted by Larry
on 2023-05-24 13:56:23 |