![]() |
|
|
#1 |
|
Mar 2018
2×5×53 Posts |
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? |
|
|
|
|
|
#2 |
|
"Dylan"
Mar 2017
3×193 Posts |
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
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 ... 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. Last fiddled with by Dylan14 on 2020-02-13 at 22:21 Reason: fix comments |
|
|
|
|
|
#3 |
|
Jan 2017
3×11 Posts |
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. |
|
|
|
|
|
#4 |
|
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36
5×7×83 Posts |
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
|
|
|
|
![]() |
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 |