Find two consecutive integers, A and B, with B=A+1, such that the decimal digits of A^8 are a permutation of the decimal digits of B^8.
(One example is A=5474857, B=5474858.)
Find additional examples.
Here are the first two solutions,
the first was given in the statement of the problem.
So this is only one additional example:
A=5474857, B=5474858
A=19224157, B=19224158
ans = []
prior = sorted(str(2**8))
for n in range(3,100000000):
new = sorted(str(n**8))
if new == prior:
ans.append([n-1,n])
print(n-1,n)
prior = new
Edited on November 4, 2023, 10:34 am
|
Posted by Larry
on 2023-11-04 10:31:42 |