Re: last few digits of a^(a^(a^(a....z times) a and z integers < 1000



On Sep 6, 10:39 pm, "christian.bau" <christian....@xxxxxxxxxxxxxxxxxx>
wrote:
On Sep 6, 3:21 pm, tryi...@xxxxxxxxx wrote:

What i'm thinking was find the cycle length.But the cycle lengths are
huge (because for 1000 i found some as 20) if we have to find it for
10^10 .

The cycle length for (a^k) mod n is phi (n).

"The cycle length for (a^k) mod n is phi (n)".How did you get this ?
What is this theorem and preconditions. Can you send me links
please ?
6^k mod 10 ,phi(10) =4 , 6^k mod 10 is always 6.same for 5 .

For an easy calculation
of phi (n) check the Wikipedia article; for example phi
(10,000,000,000) = 4,000,000,000. If you continue the calculation the
numbers go down very quickly. And there is a very simple algorithm
that lets you find (a^k) mod n for lets say 10 digit k using less than
70 multiplications.

.



Relevant Pages

  • Re: Prime Factorization and Digit Congruence
    ... >> For the phi function, I think you mean the totient function, Euler's ... >> cycle is unique, or not, I don't know, and if the cycle length is less ... > remainder after k digits is simply the remainder when a^k is divided by ... > definite feeling of déjà vu after phidigits. ...
    (sci.math)
  • Re: Prime Factorization and Digit Congruence
    ... > the cycle length of phi=6. ... remainder after k digits is simply the remainder when a^k is divided by ... dividing by 99 will repeat at the 30th digit at the latest. ... a closed form for phi. ...
    (sci.math)
  • Re: Factoring integers on a classical computer
    ... I realized my mistake when I saw Tim's post and addressed a ... and phi is a multiplicative function. ... I don't think I was lucky in finding a cycle out of my calculations. ...
    (comp.theory)
  • Re: Factoring integers on a classical computer
    ... I realized my mistake when I saw Tim's post and addressed a ... and phi is a multiplicative function. ... I don't think I was lucky in finding a cycle out of my calculations. ...
    (sci.math)
  • Re: last few digits of a^(a^(a^(a....z times) a and z integers < 1000
    ... The cycle length for mod n is phi. ... For an easy calculation ... 70 multiplications. ...
    (sci.math)