Unsuccessful at an analytic solution, I made a program to get close to the right answer:
56.961248432
The algorithm I used is to manually select upper and lower bounds, divide the span into parts and test the number of digits of x^x. Since our goal is an exact power of 10, the smallest one that gives the correct answer is a slight overestimation of the correct answer, and the one before it is a slight underestimation. I just had the program print out the first few solutions with the correct number of digits then manually reset the parameters accordingly, gaining about one more decimal place of precision with each run.
10^100 has 101 digits.
start = 1
end = 100
mesh = 100
printed = 0
for j in range(int(start*mesh),int(end*mesh)):
i = j/mesh
ndigits = len(str(int(i**i)))
if ndigits == goal:
if printed < 3:
print(i)
printed += 1
Output:
56.97
56.98
56.99
-----
start = 56
end = 57
mesh = 1000000
printed = 0
for j in range(int(start*mesh),int(end*mesh)):
i = j/mesh
ndigits = len(str(int(i**i)))
if ndigits == goal:
if printed < 3:
print(i)
printed += 1
Output:
56.961249
56.96125
56.961251
-----
start = 56.96124840
end = 56.96124844
mesh = 10000000000000
printed = 0
for j in range(int(start*mesh),int(end*mesh)):
i = j/mesh
ndigits = len(str(int(i**i)))
if ndigits == goal:
if printed < 3:
print(i)
printed += 1
Output:
56.9612484322609
56.961248432261
56.9612484322611
|
Posted by Larry
on 2023-03-27 14:11:33 |