Smallest power of 6 whose decimal expansion contains n: Difference between revisions

Line 405:
ind = substr(strpow,strn)
if ind > 0
see "" + n + ". " + strpow"6^" + m + " -= " + mstrpow + nl
exit
ok
Line 417:
working...
Smallest power of 6 whose decimal expansion contains n:
1. 16^0 -= 01
2. 2166^3 -= 3216
3. 366^2 -= 236
4. 466566^6 -= 646656
5. 466566^6 -= 646656
6. 6^1 -= 16
7. 77766^5 -= 57776
8. 6^12 = 2176782336
8. 2176782336 - 12
9. 12966^4 -= 41296
10. 100776966^9 -= 910077696
11. 6^16 = 2821109907456
11. 2821109907456 - 16
12. 12966^4 -= 41296
13. 130606940166^13 -= 1313060694016
14. 6^28 = 6140942214464815497216
14. 6140942214464815497216 - 28
15. 6^18 = 101559956668416
15. 101559956668416 - 18
16. 2166^3 -= 3216
17. 604661766^10 -= 1060466176
18. 6^15 = 470184984576
18. 470184984576 - 15
19. 6^21 = 21936950640377856
19. 21936950640377856 - 21
20. 6^26 = 170581728179578208256
20. 170581728179578208256 - 26
21. 2166^3 -= 3216
done...
 
</pre>
 
2,468

edits