View Single Post
Old 2020-08-03, 07:33   #8
JeppeSN
 
JeppeSN's Avatar
 
"Jeppe"
Jan 2016
Denmark

23·3·7 Posts
Thumbs up

Thanks, Batalov, that confirms my suspicion. For example for p=37 (the first one Viliam Furik's method failed for), we start with:

4 -> 14 -> 194 -> 37634 -> 1416317954 -> (period starts here) 111419319480 -> ...

So in this case, the period starts at the first term after we have "wrapped around" because we work modulo 2^37 - 1 = 137438953471.

/JeppeSN
JeppeSN is offline   Reply With Quote