Smallest power of 6 whose decimal expansion contains n: Difference between revisions
Content added Content deleted
m (→{{header|Pascal}}: typo) |
|||
Line 405: | Line 405: | ||
ind = substr(strpow,strn) |
ind = substr(strpow,strn) |
||
if ind > 0 |
if ind > 0 |
||
see "" + n + ". " + |
see "" + n + ". " + "6^" + m + " = " + strpow + nl |
||
exit |
exit |
||
ok |
ok |
||
Line 417: | Line 417: | ||
working... |
working... |
||
Smallest power of 6 whose decimal expansion contains n: |
Smallest power of 6 whose decimal expansion contains n: |
||
1. |
1. 6^0 = 1 |
||
2. |
2. 6^3 = 216 |
||
3. |
3. 6^2 = 36 |
||
4. |
4. 6^6 = 46656 |
||
5. |
5. 6^6 = 46656 |
||
6. 6 |
6. 6^1 = 6 |
||
7. |
7. 6^5 = 7776 |
||
8. 6^12 = 2176782336 |
|||
8. 2176782336 - 12 |
|||
9. |
9. 6^4 = 1296 |
||
10. |
10. 6^9 = 10077696 |
||
11. 6^16 = 2821109907456 |
|||
11. 2821109907456 - 16 |
|||
12. |
12. 6^4 = 1296 |
||
13. |
13. 6^13 = 13060694016 |
||
14. 6^28 = 6140942214464815497216 |
|||
14. 6140942214464815497216 - 28 |
|||
15. 6^18 = 101559956668416 |
|||
15. 101559956668416 - 18 |
|||
16. |
16. 6^3 = 216 |
||
17. |
17. 6^10 = 60466176 |
||
18. 6^15 = 470184984576 |
|||
18. 470184984576 - 15 |
|||
19. 6^21 = 21936950640377856 |
|||
19. 21936950640377856 - 21 |
|||
20. 6^26 = 170581728179578208256 |
|||
20. 170581728179578208256 - 26 |
|||
21. |
21. 6^3 = 216 |
||
done... |
done... |
||
</pre> |
</pre> |
||