flanakin Wrote:I'm calculating a pretty big number, but I'm not getting very far due to limitations in the platform -- I get "infinity" when I try to calculate 3^^4 and the number is much, much, much bigger than that (in the thousands). Is there an easier way to calculate tetration?
Wow, thats interesting. I just tried it with maple and it also gives an overflow. Hm 3^^3=7625597484987, so we want to compute
3^7625597484987.
Quote:If it would make it any easier, I only care about the last 8 digits.Yes, that helps.
You know that (b^n) % m = (b%m)^n, where %m is the remainder when dividing by m. So if you want to know the last 8 digits then you just need to compute %100000000.
Perhaps in the following way:
3^(3^(3^3))=3^(3^27)=((...(3^3)...)^3
you just compute the cube 27 times. But each intermediate result %100000000. I get (hopefully without errors):
00739387
Here the detailed computation:
Code:
3^3^1 % 100000000 = 27
3^3^2 % 100000000 = 19683
3^3^3 % 100000000 = 97484987
3^3^4 % 100000000 = 49892803
3^3^5 % 100000000 = 25665627
3^3^6 % 100000000 = 38846883
3^3^7 % 100000000 = 69147387
3^3^8 % 100000000 = 38089603
3^3^9 % 100000000 = 17859227
3^3^10 % 100000000 = 41930083
3^3^11 % 100000000 = 67881787
3^3^12 % 100000000 = 69710403
3^3^13 % 100000000 = 59620827
3^3^14 % 100000000 = 6549283
3^3^15 % 100000000 = 80248187
3^3^16 % 100000000 = 27475203
3^3^17 % 100000000 = 85190427
3^3^18 % 100000000 = 384483
3^3^19 % 100000000 = 5606587
3^3^20 % 100000000 = 59704003
3^3^21 % 100000000 = 56008027
3^3^22 % 100000000 = 73515683
3^3^23 % 100000000 = 60116987
3^3^24 % 100000000 = 8316803
3^3^25 % 100000000 = 16713627
3^3^26 % 100000000 = 30422883
3^3^27 % 100000000 = 739387Quote:There has to be an easier way!

See also the thread Recurring Digits.
