Thursday, September 21, 2017

exponentiation - What comes before the cycles in sequences of repeated modular multiplication?




I was working on this problem and found a solution that involved sequences generated by modular exponentiation with an incrementing exponent:



xm,b,i=bimodm



For example, in modular base 10:




  • 010, 020, 030, …

  • 111, 121, 131, …


  • 212, 224, 238, 246, 252, 264, 278, 266, …

  • 313, 329, 337, 341, 353, 369, 377, 361, …

  • 414, 426, 434, 446, …

  • 515, 525, 535, …

  • 616, 626, 536, …

  • 717, 729, 733, 741, 757, 769, 373, 761, …

  • 818, 824, 832, 846, 858, 864, 872, 886, …

  • 919, 921, 939, 941, …




This property of forming cycles is quite nice, and can be proven trivially to happen in all sequences for every exponential base and every modular base (every element depends only on the previous one, and using the pigeon hole principle we can exhaust the congruence classes until an element is produced that appeared before).



But these cycles do not always start at the beginning of the sequences. Exceptional examples I found:




  • xb,m,0=b0modm1 for all sequences

  • x2,4=1,2,0,0,0

  • x3,9=1,3,0,0,0

  • x2,8=1,2,4,0,0




Now my question: What's special about these bases? How long are those irregular beginnings? Do they ever prepend a cycle of more than one element?



I did some research and modular multiplicative inverses seem to be related, as all my examples did not have one. I also found modular multiplicative groups (Wolfram article) which seem to describe the cycles, but I didn't completely understand them and didn't notice anything about to the sequence beginnings.


Answer



Your examples of x2,4,x3,9,x2,8 sequences are cases where b is a power of m, and will therefore eventually produce zeros when you take a sufficiently large power of m, but will not initially when 1m<b



You can go further than this: if m and b have the same distinct prime factors then the same sort of thing will happen, for example 12=22×31 and 54=21×33 so they both have the distinct prime factors 2 and 3, while 12112(mod54), 12236(mod54), and 12i0(mod54) for i3



On the neater patterns you spotted, some are related to Fermat's little theorem apa(modp) for prime p and 1a<p and to its generalisation, Euler's theorem aφ(n)1(modn) for a coprime to n where φ(n) is Euler's totient function



No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...