Algorithmus for the period length of 1/p, p prime

With the present article we give an algorithmus for the calculus of the period of the fraction \cfrac{1}{p}, p> 5 prime.

We have the following facts:

  1. Every prime p> 5 divides at least one number of the form 11111111 : in fact the fraction \cfrac{1}{p} gives a rational periodic number that in turns, with the well known formula, assumes the form n/999…000…. Then easily p must divide 111…because 2, 3 and 5 are excluded.
  2. p divides exactly one least such number and all the others are an “exact concatenation” of this one: if for example p has 111 as least of such numbers and would divide 11111111 of the type (11)(111)(111) then p would divide their difference (11)(111)oo and hence (11)(111). Repeating the argument p would divide 11 shorter then 111, a contradiction.
  3. We call such numbers v-numbers (v stays for Vitali, my surname), v(p) is the shortest v divisible by p, it’s length is indicated l(p).
  4. examples: 37 divides 111 minimal number of such form and then divides (111)(111), (111)(111)(111)… and so on and no other not concatenations of 111;
    11=11\cdot 1\Rightarrow l(11)=2;
    111=3\cdot 37\Rightarrow l(37)=3;
    1111=(11)(11)=11\cdot 100+11=101\cdot 11 \Rightarrow l(101)=4   (101 is prime);
    11111=41\cdot 271\Rightarrow l(41)=5, l(271)=5 ;
    111111=(11)(11)(11)=110000+1100+11=10101\cdot 11    =(111)(111)=111000+111=1001\cdot 111= 1001\cdot 3\cdot 37
    from the preceding decomposition we have that 11 divides 1001 and then
    =3\cdot 7\cdot 11\cdot 13\cdot 37\Rightarrow l(7)=l(13)=6;
    1111111=239\cdot 4649 (with computer ausilium)                    11111111=(1111)(1111)=11110000+1111=1111\cdot 10001=11\cdot 101\cdot 73\cdot 137\Rightarrow l(73)=l(137)=8;
    111111111=(111)(111)(111)=111\cdot 1001001=3\cdot 37\cdot 3\cdot 333667;
    1111111111=11\cdot 41\cdot 271\cdot 9081;
    11111111111=21649\cdot 513239;
    111111111111=(1111)(1111)(1111)=100010001\cdot 1111=100010001\cdot 101\cdot 11 =(111)(111)(111)(111)=1001001001\cdot 111=1001001001\cdot 3\cdot 37=(111111)(111111)=1000001\cdot 111111= 1000001\cdot 3\cdot 7\cdot 11\cdot 13\cdot 37  and so easily looking at all the primes in these decomposition we have =3\cdot 7\cdot 11\cdot 13\cdot 37\cdot 101\cdot 9901
  5. It is remarkable that arise spontaneously numbers of the form 101, 10101, 1001,1001001,1001001001,…we call them v0-numbers
  6. It’s readily recognizable that l(p) is the length of the period of \cfrac{1}{p}: for example \cfrac{1}{37}=\cfrac{3}{37}\cdot 3=\cfrac{3}{111}=\cfrac{27}{999}=0.\overline { 027 }
  7. then we have the following computer-implementable algorithmus to evaluate the length of the period of 1/p: given a prime p, we multiply it by 1, 2,3 until it reaches for the first time the form of a number whose digits are all one’s, the length of such number is the sought period of 1/p.
  8. examples of decompositions of v0-numbers:   1001=1(001)= 1001\cdot 111/111=(111)(111)/3\cdot 37=(11)(11)(11)/3\cdot 37=10101\cdot 11/3\cdot 37\Rightarrow\quad 3\quad and\quad 37\quad divide\quad 10101,\quad and\quad In\quad fact\quad 10101=3\cdot 37\cdot 91
  9. References: https://riviste.mondadorieducation.it/archimede/
    Oddifreddi:  
    https://www.youtube.com/watch?v=FCSaXPYJ1zk