Each of α, β, γ, and δ corresponds to
a nonzero digit, whether same or different, in
positive integer base n.
Determine all possible values of n ≤ 100 such that this equation has at least one valid solution:
αβγδ = αα + ββ + γγ + δδ
*** αβγδ corresponds to concatenation of the four digits.
We can put an upper limit on what values the digits can take on.
The largest value the concatenation αβγδ can take on in the largest base (base 100) is 99,999,999. Therefore α^α + β^β + γ^γ + δ^δ can not be larger. In particular, the largest digit cannot be larger than 8, since 8^8 = 16,777,216 and 9^9 = 387,420,489.
So though we much check bases up to 100, we need only check digits from 1 to 8.
The only values I find are:
Base 10: 3 4 3 5
Base 20: 6 5 3 4
--------- code -----------
pow_s = [i**i for i in range(101)]
good_bases = []
for base in range(2,101):
if base <= 9:
digits = [i for i in range(1,base)]
else:
digits = [i for i in range(1,9)]
for a in digits:
for b in digits:
for c in digits:
for d in digits:
abcd = a*(base**3) + b*(base**2) + c*(base**1) + d
x = pow_s[a] + pow_s[b] + pow_s[c] + pow_s[d]
if abcd == x:
good_bases.append(base)
print(base,a,b,c,d)
continue
|
Posted by Larry
on 2022-08-26 08:32:17 |