Determine all possible triplet(s) (P, Q, N) of duodecimal positive integers, with P<Q and N≥3, such that the base 12 representations of P
N and Q
N will together contain each of the digits 0 to B exactly once. Neither P
N nor Q
N can contain any leading zero.
for p=1:9999
for q=p+1:9999
for n=3:12
pn=p^n;
qn=q^n;
if pn>flintmax ||qn>flintmax
break
end
tst=[dec2base(pn,12) dec2base(qn,12)] ;
if length(tst)>12
break
end
if length(tst)== 12
if length(unique(tst))==12
disp([dec2base(p,12) ' ' dec2base(q,12) ' ' dec2base(n,12)])
disp([dec2base(pn,12) ' ' dec2base(qn,12)])
disp(' ')
end
end
end
end
end
This should cover it as even in duodecimal, the maximum integer in floating point, flintmax, is 15 duodecimal digits, even in the first power--too long not to duplicate a digit.
finds
>> pandigitalAndPrettyPowerfulVI
6 763 3
160 2B5497A83
12 305 3
1708 23B469A5
16 40B 3
3460 578A192B
showing:
P Q N
P^N Q^N
in each grouping, all in base 12.
|
Posted by Charlie
on 2023-11-13 09:24:27 |