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.
With 4 digits to work with, the max value is b^4 * (b-1) or approximately b^5. If bases are limited to b=100 the most abcd could be would be 10000000000. If any digit alone could be as high as 10 (decimal) then that digit by itself would result in the RHS having that maximum leaving no room for the addition of the other digits to their own respective power.
So 9 was considered the highest digit useable.
clearvars
p=[];
for i=1:9
p=[p i^i];
end
termsets=nchoosek(p,4);
termsets=[];
for a=1:9
for b=a:9
for c=b:9
for d=c:9
termsets=[termsets; p(a) p(b) p(c) p(d)];
end
end
end
end
for i=1:length(termsets)
for j=1:4
digsets(i,j)=find(p==termsets(i,j));
end
end
for i=1:length(digsets) % same as length(termsets)
s=sum(termsets(i,:));
termset=perms(termsets(i,:));
digset=perms(digsets(i,:));
for j=1:length(digset)
digits=digset(j,:);
if i==45 && j==8
xxx=9;
end
for n=1:100
abcd=digits(1);
for k=2:4
abcd=n*abcd+digits(k);
end
if abcd==s
disp([n digits s ])
end
end
end
end
Note that all permutations were tested, not just unique ones, so some appear more than one time, when repeated digits are present. Also no check was done for the digits used being valid in the given base:
digits
base ---------------------- value
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
1 1 1 1 1 4
2 3 1 2 1 33
2 3 1 2 1 33
4 4 1 3 1 285
4 4 1 3 1 285
2 3 2 1 2 36
2 3 2 1 2 36
4 4 3 1 3 311
4 4 3 1 3 311
10 3 4 3 5 3435
10 3 4 3 5 3435
20 6 5 3 4 50064
Note that invalid digits were used for bases 2 and 4.
We're left with
1111 in base 1 is decimal 4 as is 1^1 + 1^1 + 1^1 + 1^1
3435 in decimal is 3^3 + 4^4 + 3^3 + 5^5
6534 (base 20) is decimal 50064 = 6^6 + 5^5 + 3^3 + 4^4
|
Posted by Charlie
on 2022-08-26 09:09:28 |