Talk:Mega

I know how compute more last digits of Mega, if you want to compute the last d digits: 1) Compute last d digits of 256^256 2) Take this digits, raise it to power of itself, find last digit. Using exponential laws you can decompose number by factors, for example: 24593590^24593590 = (24593590^16777216)*(24593590^4194304)*(24593590^2097152)*(24593590^1048576)*(24593590^262144)*(24593590^131072)*(24593590^65536)*(24593590^16384)*(24593590^1024)*(24593590^128)*(24593590^32)*(24593590^16)*(24593590^4)*(24593590^2)

That is, we expand exponent of number to powers of two, then compute last d digits of this factors using repeated squaring last digits, for example: 24593590^16777216 = 24593590^(2^24), this means that need to square 24593590 24 times and take last digits, but answer will be very large, so need to take last d digits in intermediate results:

24593590^(2^1) = 24593590^2 = ...69088100 24593590^(2^2) = ...69088100^2 = ...61610000 24593590^(2^3) = ...61610000^2 = ...00000000 ... Repeat this until we get last digit of 24593590^(2^24). Perform this operation with each factor, then multiply it, take last digits and it is the new input. 24593590 was only example, It is possible to apply to Mega and compute myriads or even millions of last digits. Ikosarakt1 (talk) 09:51, November 27, 2012 (UTC)