0

I'm trying to find a cleaner formula for various powers-of-10 residuals for any power of 2

e.g.

   2^x    last 14-digits                              delta
-----------------------------------------------------------
    24 =        16777216 = #srand1653951976.896725# =    24
 62524 = 807129 76777216 = #srand1653951979.478611# = 62500
125024 = 614259 36777216 = #srand1653951986.942676# = 62500

187524 = 421388 96777216 = #srand1653951999.242219# = 62500 250024 = 228518 56777216 = #srand1653952016.367700# = 62500 312524 = 35648 16777216 = #srand1653952038.319777# = 62500 <—— finally repeated last-8

Or more generally, is the following extrapolation accurate ?

                      4 -> 5^(  1-1 ) * 4 -> 2ⁿ mod 10^ 1  cyclic period 
                     20 -> 5^(  2-1 ) * 4 -> 2ⁿ mod 10^ 2  cyclic period 
                    100 -> 5^(  3-1 ) * 4 -> 2ⁿ mod 10^ 3  cyclic period 
                    500 -> 5^(  4-1 ) * 4 -> 2ⁿ mod 10^ 4  cyclic period
              2,500 -&gt; 5^(  5-1 ) * 4 -&gt; 2ⁿ mod 10^ 5  cyclic period 
             12,500 -&gt; 5^(  6-1 ) * 4 -&gt; 2ⁿ mod 10^ 6  cyclic period 
             62,500 -&gt; 5^(  7-1 ) * 4 -&gt; 2ⁿ mod 10^ 7  cyclic period 
            312,500 -&gt; 5^(  8-1 ) * 4 -&gt; 2ⁿ mod 10^ 8  cyclic period

          1,562,500 -&gt; 5^(  9-1 ) * 4 -&gt; 2ⁿ mod 10^ 9  cyclic period 
          7,812,500 -&gt; 5^( 10-1 ) * 4 -&gt; 2ⁿ mod 10^ 10 cyclic period 
         39,062,500 -&gt; 5^( 11-1 ) * 4 -&gt; 2ⁿ mod 10^ 11 cyclic period 
        195,312,500 -&gt; 5^( 12-1 ) * 4 -&gt; 2ⁿ mod 10^ 12 cyclic period 

        976,562,500 -&gt; 5^( 13-1 ) * 4 -&gt; 2ⁿ mod 10^ 13 cyclic period 
      4,882,812,500 -&gt; 5^( 14-1 ) * 4 -&gt; 2ⁿ mod 10^ 14 cyclic period 
     24,414,062,500 -&gt; 5^( 15-1 ) * 4 -&gt; 2ⁿ mod 10^ 15 cyclic period 
    122,070,312,500 -&gt; 5^( 16-1 ) * 4 -&gt; 2ⁿ mod 10^ 16 cyclic period

    610,351,562,500 -&gt; 5^( 17-1 ) * 4 -&gt; 2ⁿ mod 10^ 17 cyclic period 
  3,051,757,812,500 -&gt; 5^( 18-1 ) * 4 -&gt; 2ⁿ mod 10^ 18 cyclic period 
 15,258,789,062,500 -&gt; 5^( 19-1 ) * 4 -&gt; 2ⁿ mod 10^ 19 cyclic period 
 76,293,945,312,500 -&gt; 5^( 20-1 ) * 4 -&gt; 2ⁿ mod 10^ 20 cyclic period 

381,469,726,562,500 -&gt; 5^( 21-1 ) * 4 -&gt; 2ⁿ mod 10^ 21 cyclic period 

1,907,348,632,812,500 -> 5^( 22-1 ) * 4 -> 2ⁿ mod 10^ 22 cyclic period 9,536,743,164,062,500 -> 5^( 23-1 ) * 4 -> 2ⁿ mod 10^ 23 cyclic period 47,683,715,820,312,500 -> 5^( 24-1 ) * 4 -> 2ⁿ mod 10^ 24 cyclic period

238,418,579,101,562,500 -> 5^( 25-1 ) * 4 -> 2ⁿ mod 10^ 25 cyclic period

ewokx
  • 444
  • By Euler's Theorem $~\displaystyle 2^{\varphi\left(5^d\right)} \equiv 1 \pmod{5^d}.~$ Here, $\varphi(n)$ refers to the number of elements in ${1,2,\cdots,n}$ that are relatively prime to $n$.

    $\varphi(5) = 4~$ and $~\varphi\left(5^d\right) = 4\times 5^{d-1}.~~$ Also, $~\displaystyle 2^{4\times 5^{(d-1)}} \equiv 0\pmod{2^d}.$

    – user2661923 May 31 '22 at 01:36
  • 1
    As an example of applying the last comment $~2^{20} \equiv 76 \pmod{100}~$ where $~\displaystyle 76 \equiv 0 \pmod{4}$ and $76 \equiv 1 \pmod{25}.$ – user2661923 May 31 '22 at 01:41

0 Answers0