mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > enzocreti

Reply
 
Thread Tools
Old 2020-02-13, 14:14   #1
enzocreti
 
Mar 2018

2×5×53 Posts
Default repunit mod 43

111 mod 43 is 25, a power
1111 mod 43 is 36, a power


111111111111111 mod 43 is 16, a power
1111111111111111 mod 43 is 32 a power.




when repunits mod 43 are powers?
Is there a rule, is there any regularity?
enzocreti is offline   Reply With Quote
Old 2020-02-13, 22:19   #2
Dylan14
 
Dylan14's Avatar
 
"Dylan"
Mar 2017

3×193 Posts
Default

Code used to test this:

Code:
#define the repunit
def R(n):
    return (10**n-1)/9
#powers from 0 to 42 are 4, 8, 9, 16, 25, 32 and 36
n = 1
while n<=10000:
    residue = R(n)%43
    if residue == 4: #2^2
        print "R("+str(n)+")"+"is 4 mod 43"
        n += 1
    elif residue == 8: #2^3
        print "R("+str(n)+")"+"is 8 mod 43"
        n += 1    
    elif residue == 9: #3^2
        print "R("+str(n)+")"+"is 9 mod 43"
        n += 1    
    elif residue == 16: #2^4
        print "R("+str(n)+")"+"is 16 mod 43"
        n += 1    
    elif residue == 25: #5^2
        print "R("+str(n)+")"+"is 25 mod 43"
        n += 1    
    elif residue == 32: #2^5
        print "R("+str(n)+")"+"is 32 mod 43"
        n += 1    
    elif residue == 36: #6^2
        print "R("+str(n)+")"+"is 36 mod 43"
        n += 1
    else: #R(n) is something else mod 43
        n += 1
Using this code I get the following output:
Code:
R(3) is 25 mod 43 
R(4) is 36 mod 43 
R(15) is 16 mod 43 
R(16) is 32 mod 43 
R(24) is 25 mod 43 
R(25) is 36 mod 43 
R(36) is 16 mod 43 
R(37) is 32 mod 43 
R(45) is 25 mod 43 
R(46) is 36 mod 43 
R(57) is 16 mod 43 
R(58) is 32 mod 43 
R(66) is 25 mod 43
 ...
So there appears to be a pattern:
R(3+21k) is 25 mod 43, R(4+21k) is 36 mod 43, R(15+21k) is 16 mod 43 and R(16+21k) is 32 mod 43, where k is a non-negative integer.
The full output is shown in the zip file attached to this post.
Attached Files
File Type: zip repunitsmod43.zip (5.6 KB, 79 views)

Last fiddled with by Dylan14 on 2020-02-13 at 22:21 Reason: fix comments
Dylan14 is offline   Reply With Quote
Old 2020-02-13, 22:30   #3
NHoodMath
 
Jan 2017

3×11 Posts
Default

There is a mathematically rigorous way to analyze this.
Repunit numbers can also be written as numbers of the form (10^n-1)/9, with n a positive integer.
(10^21-1)/9 is the smallest repunit divisible by 43, and 21 is therefore the order of 43 (mod 10), thus the sequence (10^n)%43 will repeat every 21st n value, and by association, so will 10^n-1 and (10^n-1)/9.
Case closed.
NHoodMath is offline   Reply With Quote
Old 2020-02-14, 12:18   #4
sweety439
 
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36

5×7×83 Posts
Default

There is a formula of repunits mod p for prime p, the period must be a factor of p-1, thus, you can only calculate R1%p, R2%p, R3%p, ..., R(p-1)%p
sweety439 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for generalized repunit PRP sweety439 sweety439 231 2020-11-06 12:30
Generalized Repunit primes Bob Underwood Math 12 2020-10-11 20:01
Near- and quasi-repunit PRPs Batalov And now for something completely different 10 2019-09-12 13:31
GENERALIZED REPUNIT PROVEN PRIME rudy235 Math 20 2018-09-18 04:16

All times are UTC. The time now is 17:05.


Fri Jul 16 17:05:05 UTC 2021 up 49 days, 14:52, 1 user, load averages: 1.73, 1.52, 1.50

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.