Bachelor`s Thesis The last two digits of mk Adam Schill Collberg

advertisement
Bachelor’s Thesis
The last two digits of mk
Adam Schill Collberg
LiTH - MAT - EX - - 2012 / 08 - - SE
The last two digits of mk
Applied Mathematics, Linköpings Universitet
Adam Schill Collberg
LiTH - MAT - EX - - 2012 / 08 - - SE
Examensarbete: 16 hp
Level: G2
Supervisor: Gao Peng,
Division of Mathematical Sciences, Nanyang Technological University
Examiner: Anders Björn,
Applied Mathematics, Linköpings Universitet
Linköping: June 2012
Abstract
In this thesis the last two digits of mk , for different cases of the positive integers
m and k, in the base of 10 has been determined. Moreover, using fundamental
theory from elementary number theory and abstract algebra, results most helpful in finding the last two digits in any base b has been regarded and developed,
such as how to reduce large m and k to more manageable numbers.
Keywords: Last digits, Number theory, Modular arithmetic
URL for electronic version:
http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-78532
Schill Collberg, 2012.
v
vi
Acknowledgements
I would like to thank my supervisor Gao Peng for his support and for coming
up with the project proposal. I would also like to thank the examiner on this
thesis, Anders Björn, for his helpfulness and benevolence.
Lastly, I would like to thank my friend Patrik Karlsson for being the student
reviewer on this thesis and for letting me be the student reviewer on his thesis.
Schill Collberg, 2012.
vii
viii
Conventions and
nomenclature
All variables in this text are integers.
When one denotes x ≡ a mod n, it means that x ∈ [a]n (x belongs to the same
residue class as a mod n). In this text we will use the notation x = a mod n to
declare that x = y, where y is the unique integer 0 ≤ y ≤ n−1 such that y ∈ [a]n .
And as usual we shall let gcd(x1 , x2 , ..., xn ) denote the greatest common divisor and lcm(x1 , x2 , ..., xn ) the least common multiple of the positive integers
x1 , x2 , ..., xn .
Schill Collberg, 2012.
ix
x
Contents
1 Introduction
2 Finding the last two digits
2.1 Reducing m . . . . . . . . .
2.2 Reducing k . . . . . . . . .
2.2.1 gcd(b, m) = 1 . . . .
2.2.2 b > gcd(b, m) > 1 . .
2.2.3 gcd(b, m) = b . . . .
2.3 Analysing kak−1
a1 b mod b2
0
2.3.1 gcd(b, k) = 1 . . . .
2.3.2 gcd(b, k) = h > 1 . .
2.4 Analysing ak0 mod b2 . . . .
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
4
4
7
10
10
12
12
15
3 Conclusion and future work
21
3.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Schill Collberg, 2012.
xi
xii
Contents
Chapter 1
Introduction
Even though some calculation may be required, it is a trivial task to find the last
two digits of mk in the base of 10 when m and k are known to us. However there
may be patterns which could help us do this more efficiently and moreover let
us sort different possibilities of m and k into categories by significant properties.
The main objective is to find the numbers that can and will appear as the last
two digits of mk in the base of 10 for different cases of m and k. As m and k
can be any positive integers it will be necessary for us to find ways to reduce
the number of such integers we have to consider. Furthermore, we shall like to
find patterns which allows us, without much effort, to find the element of this
reduced set of numbers corresponding to a certain number that is not in that set.
For example, could 9325143 have the same last two digits as 932i in the base of
10 for some i < 25? And if so, how do we find this i?
We will certainly look for these patterns in the base of 10, however we will
regard it as an example and mainly focus on making general claims, valid in
any base b. Moreover we shall try to determine if the results we acquire in the
pursuit of the last two digits could be useful, or modified to be useful in the
more general task of finding the last s digits, for s ≥ 2.
To solve our problem we are going to break it down into a set of smaller ones.
Then by applying fundamental theory from number theory and abstract algebra
we shall reduce these smaller problems, and consequently our main problem.
Chapter 2 is divided into four parts, each dedicated to one of these smaller
problems. In each section we make base independent claims concerning the
problem at hand and then apply them in examples to the base of 10. We also
make brief comments on the more general task of finding the last s digits.
Schill Collberg, 2012.
1
2
Chapter 1. Introduction
Chapter 2
Finding the last two digits
The integer m in the base of b is normally denoted mb = an an−1 ...a1 a0 b , where
0 ≤ ai ≤ b − 1, which is the same as the sum
m = a0 + a1 · b1 + a2 · b2 + ... + an · bn =
n
X
ai bi .
i=0
Obviously the last two digits of m, in the base of b, are a0 and a1 respectively.
Say that mk = cn cn−1 ...c1 c0 b , how do we find c0 and c1 ? Well, we shall use the
theory of modular arithmetic. For a start we see that
m ≡ a0 + a1 b mod b2 ,
so if we can find mk mod b2 we will find the number we are searching for as this
number can then of course be written uniquely in the form c0 + c1 b, and we are
done.
It can also be said that this method can be applied to find a larger set of last
digits, c0 , c1 , ..., cs−1 (mk mod bs ). Although larger s will most likely imply
more calculation.
2.1
Reducing m
Now, m may be any positive integer, and so it could certainly be a very large
number. In order to make our calculations of the two last numbers of mk more
efficient we should therefore try to reduce m to a smaller number which has the
same two last digits as mk when raised to k.
We know that m ≡ a0 + a1 b mod b2 and using the fact that if x ≡ y mod n,
it certainly implies that xk ≡ y k mod n for any k ≥ 2, we deduce that
k
mk ≡ (a0 + a1 b) = {We apply the Binomial Theorem}
k(k − 1) k−2 2 2
a0 a1 b + ... + ak1 bk
2
≡ ak0 + kak−1
a1 b mod b2 .
0
= ak0 + kak−1
a1 b +
0
Schill Collberg, 2012.
3
4
Chapter 2. Finding the last two digits
So if m is a large number, finding the last two digits of mk can be reduced to a
problem in which we have to consider a possibly much smaller term (0 ≤ a0 ≤
b − 1) raised to k as well as k − 1.
In the same way we can actually reduce m when bs , for s > 2. However, we
would have to apply the Multinomial Theorem in this case as there will be a
larger number of terms mod bs .
We have in some sense reduced m, but k can still be a huge number.
2.2
Reducing k
Which values of k do we have to consider? In other words, are there integer
exponents i < j such that mi = mj mod b2 ? Because this would imply that
calculating mj mod b2 is redundant if we can find a pattern that determines
what value of i corresponds to j. In this section we shall endeavour upon the
task of finding that pattern.
Naturally gcd(b, m) = 1, b > gcd(b, m) > 1 or gcd(b, m) = b, and we are going
to consider these cases separately.
2.2.1
gcd(b, m) = 1
For this case we can apply a well known theorem to reduce the number of k we
have to consider.
Euler’s Theorem. ([4], Theorem A.2.9) If x and y are coprime, then
xϕ(y) ≡ 1
mod y.
Here ϕ is the Euler totient function ([4], page 270) defined as
ϕ(y) = |{x : 1 ≤ x ≤ y and gcd(x, y) = 1}|.
Any positive integer k can be uniquely written in the form k = r + q · ϕ(b2 )
where r and q are integers such that 0 ≤ r ≤ ϕ(b2 ) − 1 and q ≥ 0. In other
words r = k mod ϕ(b2 ). Combining this fact with Euler’s theorem gives us
mk = mr+q·ϕ(b
2
)
2
q
= mr · (mϕ(b ) ) ≡ mr · 1q = mr
mod b2 .
This means that since whenever k ≥ ϕ(b2 ) we can easily find a smaller number
r, 1 ≤ r < ϕ(b2 ), such that mk = mr mod b2 . And so we will only have to
consider 2 ≤ k < ϕ(b2 ) as the cases k = 0 and k = 1 are trivial.
To make notation simpler we recall two familiar definitions from elementary
number theory.
Definition. ([2], page 71) Let y ≥ 2 and α be a positive integer coprime to y.
The order of α mod y, denoted by ordy (α), is defined to be the smallest positive integer x such that αx ≡ 1 mod y. α is called a primitive root mod y if
ordy (α) = ϕ(y).
2.2. Reducing k
5
Example
Let α = 3 and y = 5. We see from
31 ≡ 3
mod 5
2
mod 5
3
mod 5
4
mod 5
3 ≡4
3 ≡2
3 ≡1
that ord5 (3) = 4. And 3 is in fact a primitive root mod 5, as ϕ(5) = 4.
Now, are we certain of the fact that there are primitive elements mod b2 for all
integers b? Because if there are not, we may be able to reduce k even further in
some cases. We consider the following theorem:
Primitive Root Theorem. ([3], Section 3.2) Let y ≥ 2. Then there exists at
least one primitive root mod y if and only if y = 2, y = 4, y = pl or y = 2pl
for some odd prime p and l ≥ 1.
This concludes that whenever b = pi , where p is an odd prime and i ≥ 1, or
b = 2 there are primitive roots mod b2 . So in these cases we cannot reduce k
further than we already have; 2 ≤ k < ϕ(b2 ).
However if b2 is not of same form as in any of the above mentioned cases it means
that for all m coprime to b, ordb2 (m) < ϕ(b2 ). Now, this should mean that we
can reduce the number of k we have to consider even more. For a specific m0 the
primitive root theorem tells us that mi0 = 1 mod b2 for an integer i < ϕ(b2 ),
which means that we only have to consider 2 ≤ k ≤ i for m0 . As we regard the
following theorem we come to know more about these i.
Theorem. ([2], Theorem 88) If x is coprime to y, then ordy (x) divides ϕ(y)
for all such x.
So since ordb2 (m) divides ϕ(b2 ) and ordb2 (m) < ϕ(b2 ) for all m we see that
2
)
ordb2 (m) ≤ d where d is the biggest divisor of ϕ(b2 ) (and d = ϕ(b
d0 where d0 is
the smallest prime factor of ϕ(b2 )).
We consider the prime decomposition of b = pe11 pe22 ...perr where pj are distinct
primes and e ≥ 1 for all j = 1, 2, ..., r. Because b2 cannot be of the same form
as in any of the cases in the primitive root theorem r ≥ 2 or r = 1 and p1 = 2
and e1 ≥ 2.
In order to properly analyse these cases we shall need to calculate ϕ(b2 ), and
for that we are going to use Euler’s product formula ([4], page 271) which
states that
Y
1
ϕ(n) = n
1−
p
p|n
where the product is over the distinct prime numbers dividing n.
1 −1
2 −1
• In the first case ϕ(b2 ) = p2e
(p1 −1)p2e
(p2 −1)...ps2es −1 (ps −1), a product
1
2
of integers, where at least one pj has to be odd which implies that pj − 1 is even
6
Chapter 2. Finding the last two digits
and so 2 is a (the smallest) prime factor of ϕ(b2 ).
• In the second case ϕ(b2 ) = 22e1 −1 (2 − 1) and naturally 2 is a divisor here as
well.
We can therefore conclude that if b2 does not have primitive roots, then
2
ordb2 (m) ≤ ϕ(b2 ) for all m coprime to b.
This is in fact true even for bs , where s > 2, although then b = 2 is also feasible.
But can we find a number u < ϕ(b2 ) such that mu ≡ 1 mod b2 for all m coprime to b? And if so, can we find the smallest such u?
We consider the set of all residue classes mod x coprime to x, {[g1 ]x , ..., [gϕ(x) ]x }.
Since gju ≡ 1 mod x if and only if ordb2 (x) divides u, the smallest such u will
be ux = lcm(ordx (g1 ), ..., ordx (gϕ(x) )).
This means that if there is a prime q such that q t divides ϕ(x) but not ordx (gj )
for all j = 1, 2, ..., ϕ(x), then ux ≤ ϕ(x)
q < ϕ(x).
To calculate the order of ordb2 (gi ), for all i = 1, 2, ..., ϕ(b2 ), could prove to be a
very tedious task however and we shall like to have some result to make it easier
to find ub2 . Fortunately there is some theory available to us that will help us
do this.
The Carmichael function ([4], pages 275-276), λ, is defined for a positive
integer x as

e

ϕ(p )


if x = 2, 4, pe or 2pe where p is an
odd prime and e ≥ 1,
λ(x) = 1
e

ϕ(p )
if x = 2e and e ≥ 3,


Qn
2
e1
e2
lcm(λ(p1 ), λ(p2 ), ..., λ(penn )) if x = i=1 pei i .
Which with the aid of Euler’s product formula is very straightforward to evaluate.
This is an interesting function for us to consider due to Carmichael’s theorem
([4], Theorem A2.11), which states that if a and x are coprime, then
aλ(x) ≡ 1
mod x.
And according to the primitive root theorem as well as the fact that ord2e (3) =
2e−2 , for e ≥ 3, we have λ(pei i ) = lcm(ordpei (g1 ), ..., ordpei (gϕ(pei ) ))
i
i
i
= lcm(ordpei (g1 ), ..., ordpei (gϕ(x) )). Then because
i
i
gu ≡ 1

u

g ≡ 1

.
mod x if and only if ..


g u ≡ 1
mod pe11
mod penn
2.2. Reducing k
7
we see that ordx (g) = lcm(ordpe11 (g), ordpe22 (g), ..., ordpenn (g)). So in conclusion
lcm(ordx (g1 ), ordx (g2 ), ..., ordx (gϕ(x) ))
= lcm(lcm(ordpe11 (g1 ), ..., ordpenn (g1 )), ..., lcm(ordpe11 (gϕ(x) ), ..., ordpenn (gϕ(x) )))
= lcm(ordpe11 (g1 ), ..., ordpenn (g1 ), ..., ordpe11 (gϕ(x) ), , ..., ordpenn (gϕ(x) ))
= lcm(lcm(ordpe11 (g1 ), ..., ordpe11 (gϕ(x) )), ..., lcm(ordpenn (g1 ), ..., ordpenn (gϕ(x) )))
= lcm(λ(pe11 ), ..., λ(penn )) = λ(x).
Therefore λ(x) is the smallest positive integer u such that au ≡ 1 mod x for all
a such that gcd(a, x) = 1. So λ(b2 ) is the ub2 we are looking for. We proceed
with an example.
Example
We consider the case of our most common base, b = 10. Since 102 = 22 · 52 does
not have any primitive roots we know that
ϕ(102 )
2
1 2
1
1 2
= (5 (1 − )2 (1 − )) = 20
2
5
2
ord102 (m) ≤
for all m coprime to 10.
Furthermore, according to the definition of the Carmichael function and Euler’s
product formula
λ(102 ) = λ(22 52 ) = lcm(λ(22 ), λ(52 ))
= lcm(ϕ(22 ), ϕ(52 )) = lcm(2, 20) = 20. We end this subsection by, for the sake of generality, pointing out that the properties of b2 we have noted here is quite obviously also true for bs , where s > 2.
And so they can be applied in the search of a larger set of last digits as well.
2.2.2
b > gcd(b, m) > 1
We shall begin by continuing to study the case of b = 10. We want to reduce k
for all m such that gcd(10, m) = 5. The latter implies that a0 = 5, which will
make our task rather easy. We see that
mk ≡ ak0 + kak−1
a1 10 = 5k + k5k−1 a1 10
0
= 5k + k5k−2 a1 52 2
mod 22 52 .
And by induction 5k ≡ 25 mod 100 for all k ≥ 2 since it is easily seen to be
true for k = 2, and if we suppose that it is for k = i, then 5i+1 ≡ 5i · 5 ≡ 25 · 5 =
125 ≡ 25 mod 100.
We also note that if k is even k5k−2 a1 52 2 ≡ 0 mod 22 52 , and if k is odd
k5k−2 a1 52 2 ≡ 0 or 50 mod 22 52 depending on whether a1 is even or odd. We
conclude that if gcd(10, m) = 5 and k ≥ 2, then mk ≡ m2+j mod 100 where
8
Chapter 2. Finding the last two digits
j = k mod 2. So for this case we only have to consider 2 ≤ k ≤ 3. The case when gcd(10, m) = 2 on the other hand will be a lot more complex
since it implies that a0 ∈ {2, 4, 6, 8}, and so four different cases instead of just
one have to be studied and more calculation has to be done. This can be both
tedious and time consuming, so in order to reduce k in cases like this we shall
develop some general theory.
Let gcd(b, m) = t > 1. Then we can write m = t · α and b = t · s where t and s
b
are the integers α = m
t and s = t , and certainly gcd(α, s) = 1.
We note that if k ≥ 2, then
mk = tk αk = t2 (tk−2 αk ) ≡ t2 r
mod b2 .
And here r ∈ {0, 1, 2, ..., s2 − 2, s2 − 1}, because if r ≥ s2 then t2 r = t2 h mod b2
where h = r mod s2 whenever k ≥ 2. This is in fact true, however not very
interesting, even if t = b.
We see that mk belongs to one of s2 residue classes mod b2 , and can therefore argue that there must be integers i and j such that 2 ≤ i < j ≤ s2 + 2
and mj ≡ mi mod b2 according to the Pigeonhole Principle since we have
more such elements than we have residue classes to which they can belong
(s2 + 2 − 2 + 1 = s2 + 1 > s2 ). We choose i to be greater than or equal to 2
here so we can be certain that mi , like mj , is in one of the s2 residue classes in
which t2 is a factor.
As we know there must be such i and j, so if we suppose k ≥ i, and write k
uniquely in the form k = i + q(j − i) + x, where q ≥ 0 and x = k − i mod (j − i),
we can observe that
mk = mi+q(j−i)+x = mj+(q−1)(j−i)+x
= mj · m(q−1)(j−i)+x ≡ mi · m(q−1)(j−i)+x
= mi+(q−1)(j−i)+x ≡ ... ≡ mi+x
mod b2
An interesting result indeed and we summarize it in a theorem.
Theorem 1. If m and b are positive integers such that gcd(b, m) = t > 1 then,
for each m there are integers i and j, 2 ≤ i < j ≤ ( bt )2 + 2, such that whenever
k ≥ i, mk = mi+x mod b2 where x = k − i mod (j − i).
We also note that x ≤ j − i − 1 which implies that whenever k ≥ i + (j − i) = j
there is a corresponding h, 2 ≤ h ≤ i + (j − i − 1) = j − 1, such that mk = mh
mod b2 which is easily determined if we know i and j. So for this m case we
would only have to consider 2 ≤ k ≤ j − 1 ≤ ( bt )2 + 1.
Example
2
Let b = 10 and gcd(b, m) = 2. Then we only have to consider 2 ≤ k ≤ ( 10
2 ) +1 =
26 even though we do not know m. Should we have a particular m we could
find our i and j and possibly reduce k further. 2.2. Reducing k
9
Now we have a nice upper bound to the set of different k we have to consider
but we would still like to find those i and j, which seems like a tedious task
should we have to do it for every single m. To find general i and j whenever
k
gcd(b, m) = t we are going to consider tk and αk = ( m
t ) separately. Next we
state a theorem and then go on proving it.
Theorem 2. If m and b are integers such that gcd(b, m) = t > 1, then there
are integers i0 and j0 , 2 ≤ i0 < j0 ≤ ( bt )2 + 2, such that whenever k ≥ i0 ,
mk = mi0 +u mod b2 for all such m where u = k−i0 mod lcm(j0 −i0 , λ(( bt )2 )).
Proof
We begin by considering tk , and we can apply Theorem 1 as t is an integer with
the property gcd(b, t) = t. So we can find i0 and j0 , 2 ≤ i0 < j0 ≤ ( bt )2 + 2,
such that tj0 ≡ ti0 mod b2 . Also notable here is that the i0 and j0 we choose
are independent of α = m
t .
b
Since gcd(b, m) = t it is quite clear that gcd( m
t , t ) = gcd(α, s) = 1. So if
k
2
we want to consider α mod s it will bring us back to a situation we have
handled before. According to Carmichael’s theorem αk ≡ αy mod s2 where
y = k mod λ(s2 ).
We can write αk and αy in the base of s, αk = e0 +e1 s+e2 s2 +...+el−1 sl−1 +el sl
and αy = d0 + d1 s + d2 s2 + ... + dn−1 sn−1 + dn sn . And we see that e0 + e1 s ≡
αk ≡ αy ≡ d0 + d1 s mod s2 which actually implies that e0 + e1 s = d0 + d1 s
since 0 ≤ e0 + e1 s, d0 + d1 s ≤ s2 − 1. Now, if k ≥ 2, then
tk αk = tk (e0 + e1 s + e2 s2 + ... + el sl )
= tk−2 (e0 t2 + e1 st2 + e2 s2 t2 + ... + el sl t2 )
≡ tk−2 (e0 t2 + e1 st2 )
= tk (e0 + e1 s)
= tk (d0 + d1 s)
≡ tk−2 (d0 t2 + d1 st2 + d2 s2 t2 + ... + dn sn t2 )
= tk (d0 + d1 s + d2 s2 + ... + dn sn )
= tk α y
mod s2 t2 = b2 .
This is true for all α since it is defined so that gcd(α, s2 ) = 1. And if k ≥ i0 ,
then mk = tk αk ≡ ti0 +x αy mod b2 where x = k − i0 mod (j0 − i0 ).
Now we proceed, still assuming k ≥ i0 , by writing k in the form k = i0 + u + vβ
where v ≥ 0, β = lcm(j0 − i0 , λ(s2 )) and u = k − i0 mod β. This would indeed
mean that
mk = mi0 +u+vβ
= ti0 +u+vβ αi0 +u+vβ
≡ ti0 +u αi0 +u = mi0 +u
since both (j0 − i0 ) and λ(s2 ) are divisors of β. The theorem is proven. Example
Back to our example where b = 10 and gcd(b, m) = 2. We are going to do a
10
Chapter 2. Finding the last two digits
2
little bit of calculation in order to find some i0 and j0 and evaluate λ(( 10
2 ) ),
then apply the theorem.
22 ≡ 4
3
mod 100
2 ≡8
mod 100
..
.
221 ≡ 52
mod 100
22
2
≡4
mod 100
so we can let i0 = 2 and j0 = 22. Then, according to our example in the last
subsection λ(52 ) = 20, and so lcm(j0 − i0 , λ(52 )) = lcm(20, 20) = 20. So if
k ≥ 2, then
mk ≡ m2+u mod 100
(2.1)
where u = k − 2 mod 20 which implies that when b = 10 and gcd(b, m) = 2 we
only have to consider k such that 2 ≤ k ≤ 21. Worth noting is that both Theorem 1 and 2 can very easily be generalized to
cover the case of bs , for s ≥ 2. However, larger s implies a weaker reduction of k.
2.2.3
gcd(b, m) = b
We note by looking at the sum m = a0 + a1 b + a2 b2 + ... + an bn = a0 + b(a1 +
a2 b + ... + an bn−1 ) that if gcd(b, m) = b it implies that a0 = 0. Therefore
mk ≡ ak0 + kak−1
a1 b = 0 mod b2 so c0 = c1 = 0 for all k ≥ 2 in this case.
0
If we go back to the case of b = 10, we can see that we have now considered
all possibilities for gcd(10, m). The set of different k we have to consider is at
its largest when gcd(10, m) = 2 (2 ≤ k ≤ 21) and we can therefore conclude
that it is sufficient to consider only these k when b = 10 for all values gcd(10, m).
Now that we have reduced both m and k to smaller sets of numbers we shall
proceed to consider the problem of finding the numbers that can, and actually
will appear as the last two numbers for different m whilst raised to a certain k.
This problem is very base dependent. However we shall try to first make some
general conclusions and then restrict ourselves to our familiar case of b = 10 to
acquire some more concrete results.
2.3
Analysing kak−1
a1 b mod b2
0
We have successfully reduced both m and k and we shall proceed to study the
set of numbers that can and will appear as the last two for different cases of m
and k, i.e. {mk mod b2 : m ∈ S} as k ∈ T for some sets S and T . And the
elements in each of S and T share certain properties.
2.3. Analysing kak−1
a1 b mod b2
0
11
As we know from our work on reducing m, mk ≡ ak0 + kak−1
a1 b mod b2 and
0
in this section we are going to consider what numbers can be generated by the
term kak−1
a1 b mod b2 for different cases of a0 and k as a1 varies.
0
From basic group theory we are familiar with the cyclic group Zb2 with 1 as
a generator. We will consider the term kak−1
b mod b2 as an element of this
0
group and we would like to know what subgroup it generates. The following
theorem will be of aid:
Theorem. ([1], Theorem 6.14) Let G be a cyclic group with n elements and
generated by g. Let h∈G and let h = g s . Then h generates a cyclic subgroup H
of G containing nd elements, where d is the greatest common divisor of n and s.
Also, hg s i = hg t i if and only if gcd(s, n) = gcd(t, n).
So the generated subgroup of Zb2 will have
b2
b2
=
≤b
mod b2 , b2 )
gcd(kak−1
b, b2 )
0
gcd(kak−1
b
0
elements since 1 is a generator. The elements generated will be of the form n · g
2
mod b2 where g = gcd(kak−1
b, b2 ) and n ∈ {0, 1, ..., bg − 1}. And therefore
0
mk ≡ ak0 + ng
mod b2 .
for some n. We can see that when our generator g is incremented by the various
possible values of a1 ∈ {0, 1, 2, ..., b − 1}, the entire subgroup will be generated
as its cardinality is less than or equal to the number of choices of a1 . Therefore
{mk
mod b2 : m ∈ S} = {ak0 + kak−1
a1 b mod b2 : m ∈ S} =
0
= {ak0 + ng
mod b2 : n = 0, 1, ...,
b2
− 1 and m ∈ S}
g
if gcd(b, m) = gcd(b, a0 ) = t for some t, for all m ∈ S, as that will make g
constant in S as k is fixed.
Next we shall want to find out what subgroups will be generated in different
cases of a0 and k, which means that we have to calculate g. As we do this we
will see that it will be of interest to find the greatest common divisor of some
relatively complicated expressions. We are going to need a tool for this, so we
proceed by stating a rather specific theorem and then go on proving it.
Theorem 3. If x and y are coprime and n ≥ l, then gcd(xy l−1 z n , y l z l ) > y l−1 z l
if and only if gcd(y, z) > 1 and n > l.
Proof
gcd(xy l−1 z n , y l z l ) = y l−1 z l gcd(xz n−l , y) = y l−1 z l gcd(z n−l , y)
as gcd(x, y) = 1, and y l−1 z l gcd(z n−l , y) > y l−1 z l if and only if gcd(z n−l , y) > 1
which holds if and only if n > l and gcd(y, z) > 1. As we are only looking for the last two digits we shall see that l = 2 is the
only case we have to concern ourselves with. However, should one be interested
12
Chapter 2. Finding the last two digits
in finding a larger set of last digits using our method, larger l will have to be
considered.
We are ready to continue our analysis of the subgroups. We will not concern
ourselves with the trivial case of a0 = 0 as it has already been successfully studied in this text.
2.3.1
gcd(b, k) = 1
Case 1: gcd(b, m) = 1.
This implies that gcd(b, a0 ) = 1, so gcd(kak−1
b, b2 ) = b and therefore
0
mk ≡ ak0 + bn1
mod b2
where n1 ∈ {0, 1, ..., b − 1} in this case.
Case 2: gcd(b, m) = gcd(b, a0 ) = t > 1.
We let s = bt and α = at0 . Then because k ≥ 2 we conclude that
gcd(kak−1
b, b2 ) = gcd(αk−1 tk s, s2 t2 ) ≥ t2 s
0
and strictly larger than t2 s if and only if k ≥ 3 and gcd(s, t) > 1 according to
Theorem 3. And so
mk ≡ ak0 + g2 n2
mod b2
2
where g2 = gcd(αk−1 tk s, s2 t2 ) ≥ t2 s and n2 ∈ {0, 1, ..., gb2 − 1}.
2.3.2
gcd(b, k) = h > 1
In this section we denote β =
k
h
and r = hb .
Case 3: gcd(b, m) = gcd(b, a0 ) = 1.
Then
gcd(kak−1
b, b2 ) = gcd(βrh2 , r2 h2 ) = h2 r
0
as a consequence of Theorem 3 and then
mk ≡ ak0 + h2 rn3
mod b2
where n3 ∈ {0, 1, ..., r − 1}.
Case 4: gcd(b, m) = gcd(b, a0 ) = t > 1.
Once again we let s = bt and α = at0 . And since k ≥ 2
gcd(kak−1
b, b2 ) = gcd(βak−1
rh2 , r2 h2 )
0
0
= gcd(kαk−1 tk s, s2 t2 ) ≥ max{h2 r, t2 s}
2.3. Analysing kak−1
a1 b mod b2
0
13
and equal to h2 r if gcd(a0 , r) = 1, or equal to t2 s if gcd(k, s) = 1 and either
gcd(s, t) = 1 or k = 2. So we have
mk ≡ ak0 + g4 n4
mod b2
where g4 = gcd(βak−1
rh2 , r2 h2 ) = gcd(kαk−1 t2 s, s2 t2 ) ≥ max{h2 r, t2 s} and
0
b2
n4 ∈ {0, 1, ..., g4 − 1}.
It is apparent, especially from the last case, that the task of finding the particular subgroups we are interested in is very base dependent and hard to generalize.
Nevertheless we have noted some useful properties and we are ready to continue
our analysis in the base of 10.
Example
We let b = 10 and start by letting k be coprime to 10.
Case 1: It follows directly from our work that if gcd(10, k) = 1, then
{mk
=
=
mod 100 : gcd(10, m) = 1}
{ak0
{ak0
+ 10n mod 100 : gcd(10, a0 ) = 1 and n = 0, 1, ..., 9}
+ 10n mod 100 : a0 = 1, 3, 7, 9 and n = 0, 1, ..., 9}.
Case 2: • gcd(10, m) = gcd(10, a0 ) = 2. So α = a20 and g = gcd(αk−1 2k 5, 22 52 ) =
22 5 since gcd(α, 5) = gcd(2, 5) = 1. So we conclude that for gcd(10, k) = 1
{mk
=
=
mod 100 : gcd(10, m) = 2}
{ak0
{ak0
+ 20n mod 100 : gcd(10, a0 ) = 2 and n = 0, 1, ..., 4}
+ 20n mod 100 : a0 = 2, 4, 6, 8 and n = 0, 1, ..., 4}.
• gcd(10, m) = gcd(10, a0 ) = 5. Now α = a50 = 1 since a0 = 5 in this case.
Then g = gcd(5k 2, 22 52 ) = 52 2. So when gcd(10, k) = 1
{mk
mod 100 : gcd(10, m) = 5}
= {ak0 + 50n mod 100 : gcd(10, a0 ) = 5 and n = 0, 1}
= {ak0 + 50n mod 100 : a0 = 5 and n = 0, 1}.
And therefore, if gcd(10, k) = 1, we have
{mk
mod 100 : m ∈ Z+ }
= {ak0 + 10n mod 100 : a0 = 1, 3, 7, 9 and n = 0, 1, ..., 9}
∪ {ak0 + 20n mod 100 : a0 = 2, 4, 6, 8 and n = 0, 1, ..., 4}
∪ {ak0 + 50n
mod 100 : a0 = 5 and n = 0, 1} ∪ {0}.
Next we suppose that gcd(10, k) = 2, and so β = k2 .
14
Chapter 2. Finding the last two digits
Case 3: gcd(10, m) = gcd(10, a0 ) = 1. g = gcd(β22 5, 22 52 ) = 22 5 since
gcd(β, 5) = 1. This means that if gcd(10, k) = 2, then
{mk
mod 100 : gcd(10, m) = 1}
{ak0
=
+ 20n mod 100 : a0 = 1, 3, 7, 9 and n = 0, 1, ..., 4}.
Case 4: • gcd(10, m) = gcd(10, a0 ) = 2. Then α = a20 , s = 5 and g =
gcd(βαk−1 2k+1 5, 22 52 ) = 22 5 since gcd(β, 5) = gcd(α, 5) = gcd(2, 5) = 1. Then
for gcd(10, k) = 2
{mk
=
mod 100 : gcd(10, m) = 2}
{ak0
+ 20n mod 100 : a0 = 2, 4, 6, 8 and n = 0, 1, ..., 4}.
• gcd(10, m) = gcd(10, a0 ) = 5. Now, α = a50 = 1 since a0 = 5, so g =
gcd(β22 5k , 22 52 ) = 22 52 . Therefore, if gcd(10, k) = 2, we have that
{mk
mod 100 : gcd(10, m) = 5} = {ak0
mod 100 : a0 = 5}.
So in summary, whenever gcd(10, k) = 2
{mk
mod 100 : m ∈ Z+ } =
{ak0 + 20n
∪
{ak0
mod 100 : a0 = 1, 2, 3, 4, 6, 7, 8, 9 and n = 0, 1, ..., 4}
mod 100 : a0 = 0, 5}.
In the same way we can conclude that if gcd(10, k) = 5, then
{mk
mod 100 : m ∈ Z+ } =
{ak0 + 50n mod 100 : a0 = 1, 3, 5, 7, 9 and n = 0, 1}
∪ {ak0
mod 100 : a0 = 0, 2, 4, 6, 8}.
And of course when gcd(10, k) = 10
{mk
mod 100 : m ∈ Z+ } = {ak0
mod 100 : a0 = 0, 1, ..., 9}. Before we proceed with our task of finding the last two digits we note that if we
were trying to find the last s digits instead, even if s > 2, we could still apply
the same method, as
k
m ≡
s−1
X
!k
ai b
i
≡ ak0 + ... + kak−1
as−1 bs−1
0
mod bs .
(2.2)
i=0
We just let as−1 be the incrementing factor, and using Theorem 3 the analysis
will be very similar to when s = 2. In this case of course we will then have to
2.4. Analysing ak0 mod b2
15
consider several more terms mod bs instead of just ak0 mod b2 , however it is still
useful.
That concludes this section. Our work is almost done, the last piece of the
puzzle is the analysis of ak0 mod b2 . After that we shall be ready to make our
final conclusions.
2.4
Analysing ak0 mod b2
There could be a lot of different possible values for ak0 mod b2 for different k,
particularly if b is a large number. So to find them all much calculation could
be required. However, our work in the last section will let us reduce b2 in some
cases.
For certain m and k, we want to evaluate the part of ak0 in our main problem
2
mk ≡ ak0 +ng mod b2 for the corresponding g and n ∈ {0, 1, ..., bg −1}. If we let
x = ak0 mod g, then ak0 +ng ≡ x+(r+n)g mod b2 for some r ≥ 0, and certainly
2
2
{(r + n)g mod b2 : n = 0, 1, ..., bg − 1} = {ng mod b2 : n = 0, 1, ..., bg − 1}.
Therefore we conclude that for k ∈ T , for some sets S and T , we have
{mk
mod b2 : m ∈ S}
= {ak0 + ng
= {x + ng
mod b2 : n = 0, 1, ...,
mod b2 : n = 0, 1, ...,
= {x + ng : n = 0, 1, ...,
b2
− 1 and m ∈ S}
g
b2
− 1 and x ∈ X}
g
b2
− 1 and x ∈ X}
g
where X = {ak0 mod g : m ∈ S} and g is the generator corresponding to S and
T according to our work in the previous section.
This means that we only have to study ak0 mod g instead of ak0 mod b2 , when
m ∈ S and k ∈ T , and if g < b2 it is likely to be a problem more easily handled.
So what remains for us to unravel now is the set
X = {ak0
mod g : m ∈ S}
where m ∈ S and k ∈ T for different cases of S and T .
We ended the last section by considering the case of bs , s ≥ 2. And if we go back
to regard equation (2.2) we can now see that what remains to be considered in
that case, if m ∈ S and k ∈ T , is
!k
s−1
X
i
ai b
− kak−1
as−1 bs−1 mod g
0
i=0
where
s−1
X
ai bi = m mod bs for m ∈ S, and g = gcd(kak−1
bs−1 , bs ) once again
0
i=0
is corresponding to S and T . This could of course be a much more severe problem than that of evaluating ak0 mod g, and some additional analysis should be
16
Chapter 2. Finding the last two digits
done in this case.
We have reached the point where it does no longer make sense to try and make
base independent claims. Therefore we shall continue our study of the example
when b = 10 which has been so conveniently prepared for us in previous sections.
Example
We start with the case of gcd(10, k) = 1. 5 does not divide k and k ≡ 1 or 3
mod 4 since k is odd.
• {ak0 + 10n mod 100 : a0 = 1, 3, 7, 9 and n = 0, 1, ..., 9}. g = 10 so the set we
want to consider is {ak0 mod 10 : a0 = 1, 3, 7, 9} when gcd(10, k) = 1.
ϕ(10) = 4, so ak0 ≡ ar0 mod 10 where r = k mod 4. Then, since k ≡ 1 or 3
mod 4, and
13 ≡ 1
mod 10
3
mod 10
3
mod 10
3
mod 10
3 ≡7
7 ≡3
9 ≡9
we conclude that if gcd(10, k) = 1, then {ak0 mod 10 : a0 = 1, 3, 7, 9} =
{1, 3, 7, 9}.
• {ak0 + 20n mod 100 : a0 = 2, 4, 6, 8 and n = 0, 1, ..., 4}. So since g = 20 we
only have to study {ak0 mod 20 : a0 = 2, 4, 6, 8} for gcd(10, k) = 1. Then, as
22 ≡ 4
3
mod 20
2 ≡8
mod 20
4
mod 20
2 ≡ 16
5
2 ≡ 12
6
2 ≡4
mod 20
mod 20
we see that 2k ≡ 22+x mod 20, where x = k − 2 mod 4 according to our work
on reducing k in section 2.2.2. We also see that there are four possible values
for ak0 mod 20.
Next we shall like to know if there are any k such that uk ≡ v k mod 20 if u 6= v
and u, v ∈ {2, 4, 6, 8}. 2k ≡ 4k ≡ 22k mod 20 if and only if k − 2 ≡ 2k − 2
mod 4 if and only if k ≡ 0 mod 4.
In the same way we can determine that 2k ≡ 8k mod 20 if and only if 2k ≡ 0
mod 4, and that 4k ≡ 8k mod 20 if and only if k ≡ 0 mod 4.
As k ≡ 1 or 3 mod 4 we conclude that 2k , 4k and 8k will be distinct mod 20 in
this case.
We can observe that since k ≥ 2, ak0 ≡ 22 (2k−2 ( a20 )k ) ≡ 22 q mod 20 where
q = 2k−2 ( a20 )k mod 5, much like in our work on reducing k.
Then 6k = 2k 3k = 22 (2k−2 3k ) ≡ 2k = 22 2k−2 mod 20 if and only if 2k−2 3k ≡
2k−2 mod 5 which holds if and only if 3k ≡ 1 mod 5, since gcd(2k−2 , 5) = 1.
Using the same method we can also conclude that 6k ≡ 4k mod 20 if and only
2.4. Analysing ak0 mod b2
17
if 3k ≡ 2k mod 5, and that 6k ≡ 8k mod 20 if and only if 3k ≡ 4k mod 5.
ϕ(5) = 4, so ak0 ≡ ar0 mod 5 where r = k mod 4. Therefore, as k ≡ 1 or 3
mod 4, 33 ≡ 2, 23 ≡ 3 and 43 ≡ 4 mod 5, we conclude that 2k , 4k , 6k and 8k
will be distinct mod 20 when gcd(10, k) = 1.
Let f (x) = xk mod 20, for k such that k ≡ 1 or 3 mod 4. We have proved that
f is injective on {2, 4, 6, 8}. And since there are only four possible values for ak0
mod 20, namely 4, 8, 12 and 16, we may establish that when gcd(10, k) = 1, {ak0
mod 20 : a0 = 2, 4, 6, 8} = {4, 8, 12, 16}.
• {ak0 + 50n mod 100 : a0 = 5 and n = 0, 1}.
In the beginning of section 2.2.2 we determined that 5k ≡ 25 mod 100 for all
k ≥ 2.
Therefore, if gcd(10, k) = 1, then {ak0 mod 100 : a0 = 5} = {25}.
Consequently, for gcd(10, k) = 1 we have
{mk
mod 100 : m ∈ Z+ }
= {x + 10n : x = 1, 3, 7, 9 and n = 0, 1, ..., 9}
∪ {x + 20n : x = 4, 8, 12, 16 and n = 0, 1, ..., 4}
∪ {25 + 50n : n = 0, 1} ∪ {0}.
We move on to consider the case of gcd(10, k) = 2. Then k ≡ 0 or 2 mod 4.
• {ak0 + 20n mod 100 : a0 = 1, 2, 3, 4, 6, 7, 8, 9 and n = 0, 1, ..., 4}. Now g = 20,
and we start by considering a0 = 1, 3, 7, 9. Since
12 ≡ 1
mod 20
2
mod 20
2
mod 20
2
mod 20
3 ≡9
7 ≡9
9 ≡1
it is rather obvious that when gcd(10, k) = 2, {ak0 mod 20 : a0 = 1, 3, 7, 9} =
{1, 9} if k ≡ 2 mod 4, and = {1} if k ≡ 0 mod 4.
We let a0 ∈ {2, 4, 6, 8}. In the case where 10 and k are coprime we concluded
that 2k ≡ 8k mod 20 if and only if 2k ≡ 0 mod 4, and that 6k ≡ 4k mod 20
if and only if 3k ≡ 2k mod 5. Both are true in this case since k ≡ 0 or 2 mod 4.
We also noted that 2k ≡ 4k mod 20 if and only if k ≡ 0 mod 4, which means
that representatives from the sets {2k , 8k } and {4k , 6k } will be distinct mod 20
when gcd(10, k) = 2 if and only if k ≡ 2 mod 4.
So what will the values of ak0 mod 20 be in this case? If k ≡ 2 mod 20, then
8k ≡ 2k ≡ 22 ≡ 4
k
k
6 ≡4 ≡2
2k
4
≡ 2 ≡ 16
mod 20
mod 20
and when k ≡ 0 mod 20
8k ≡ 6k ≡ 4k ≡ 2k ≡ 24 ≡ 16
mod 20
18
Chapter 2. Finding the last two digits
since 2 ≤ k ≤ 5 as 2k ≡ 22+x mod 20, where x = k − 2 mod 4.
And so, as gcd(10, k) = 2, {ak0 mod 20 : a0 = 2, 4, 6, 8} = {4, 16} if k ≡ 2
mod 4, and = {16} if k ≡ 0 mod 4.
In summary for gcd(10, k) = 2, {ak0 mod 20 : a0 = 1, 2, 3, 4, 6, 7, 8, 9} = {1, 4, 9, 16}
if k ≡ 2 mod 4, and = {1, 16} if k ≡ 0 mod 4.
• {ak0 mod 100 : a0 = 0, 5} = {0, 25} also when gcd(10, k) = 2 (see 10 and k
coprime).
In conclusion, when gcd(2 · 10, k) = 2
{mk
mod 100 : m ∈ Z+ }
= {x + 20n : x = 1, 4, 9, 16 and n = 0, 1, ..., 4} ∪ {0, 25}
and when gcd(2 · 10, k) = 4
{mk
mod 100 : m ∈ Z+ }
= {x + 20n : x = 1, 16 and n = 0, 1, ..., 4} ∪ {0, 25}
Next we consider the case of gcd(10, k) = 5. It implies that k ≡ 5 or 15 mod 20.
• {ak0 + 50n mod 100 : a0 = 1, 3, 5, 7, 9 and n = 0, 1}. g = 50, so since
ϕ(50) = 20 and
15 ≡ 1 ≡ 115
mod 50
5
15
mod 50
5
15
mod 50
15
7 ≡7≡3
mod 50
5
15
mod 50
3 ≡ 43 ≡ 7
5 ≡ 25 ≡ 5
5
9 ≡ 49 ≡ 9
we establish that when gcd(10, k) = 5, we have {ak0 mod 50 : a0 = 1, 3, 5, 7, 9} =
{1, 7, 25, 43, 49}.
• {ak0 mod 100 : a0 = 0, 2, 4, 6, 8 and gcd(10, k) = 5}. Much like in the previous case we find that as mk ≡ m2+u mod 100 where u = k − 2 mod 20
whenever gcd(10, m) = 2 according to equation (2.2), and
25 ≡ 32 ≡ 815
mod 100
5
15
mod 100
5
15
mod 100
5
15
mod 100
4 ≡ 24 ≡ 4
6 ≡ 76 ≡ 6
8 ≡ 68 ≡ 2
we can determine that if gcd(10, k) = 5, then {ak0 mod 100 : a0 = 2, 4, 6, 8} =
{24, 32, 68, 76}.
So in summary, whenever gcd(10, k) = 5
{mk
mod 100 : m ∈ Z+ }
= {x + 50n : x = 1, 7, 25, 43, 49 and n = 0, 1} ∪ {0, 24, 32, 68, 76}.
2.4. Analysing ak0 mod b2
19
Lastly we consider the case gcd(10, k) = 10. It is very similar to when gcd(10, k) =
5 and we shall handle in the same manner, although now k ≡ 0 or 10 mod 20.
• {ak0 mod 100 : a0 = 0, 1, 2, ..., 9}. a0 = 0, 5 has been covered before, we
proceed to study a0 = 1, 3, 7, 9.
We have noted that λ(100) = 20, so ak0 ≡ 1 mod 100 when k ≡ 0 mod 20 for
these choices of a0 . And for k ≡ 10 mod 20 we note that
110 ≡ 910 ≡ 1
mod 100
10
mod 100
3
≡7
10
≡ 49
so if gcd(10, k) = 10 indeed {ak0 mod 100 : a0 = 1, 3, 7, 9} = {1, 49} if k ≡ 10
mod 100, and = {1} if k ≡ 0 mod 100.
Now we let a0 = 2, 4, 6, 8. Once again, by using the fact that mk ≡ m2+u
mod 100 where u = k − 2 mod 20 if gcd(10, m) = 2, and observing the concrete
results of
810 ≡ 230 ≡ 210 ≡ 24
10
4
≡6
10
≡ 76
mod 100
mod 100
as well as
76 ≡ 220 ≡ 240 ≡ 420
≡2
20
≡2
20
20
≡2
60
≡2
mod 100
20
·1≡2
≡8
20
· 320 ≡ 620
mod 100
mod 100
we may conclude that when gcd(10, k) = 10 we have {ak0 mod 100 : a0 =
2, 4, 6, 8} = {24, 76} if k ≡ 10 mod 20, and = {76} if k ≡ 0 mod 20.
Therefore, when gcd(2 · 10, k) = 10
{mk
mod 100 : m ∈ Z+ } = {0, 1, 24, 25, 49, 76}
and when gcd(2 · 10, k) = 20
{mk
mod 100 : m ∈ Z+ } = {0, 1, 25, 76}. 20
Chapter 2. Finding the last two digits
Chapter 3
Conclusion and future work
3.1
Conclusion
The main objective in this project has been to find the last two digits of mk in
the base of 10 for different cases of k. And so we have done.
Our rather straightforward method of applying elementary number theory and
abstract algebra to parts of the main problem has proved itself sufficient. It has
also provided us with some interesting conclusions which applicability is not
exclusive to that of finding last digits.
Most of our results are more or less direct consequences of theorems, some theorems that was already known to us, others that has had to be constructed.
However some minor calculations have also been required to obtain the concrete results we sought.
When working on reducing k we deduced that in the base of 10 we only have
to consider 2 ≤ k ≤ 21. This is a consequence of the fact that we found the
following patterns for higher k.
• gcd(10, m) = 1: mk ≡ mr mod 100, where r = k mod 20.
• gcd(10, m) = 2: For k ≥ 2, mk ≡ m2+x mod 100, where x = k − 2 mod 20.
• gcd(10, m) = 5: For k ≥ 2, mk ≡ m2+j mod 100, where j = k mod 2.
• gcd(10, m) = 10: c0 = c1 = 0.
These results follow from the theorems we have stated, theorems that will allow
us to acquire similar results in any base b.
And now for the numbers that can and actually will appear as the last two
digits of mk in the base of 10. We sort them by different cases of k.
Schill Collberg, 2012.
21
22
Chapter 3. Conclusion and future work
• gcd(10, k) = 1:
{mk
mod 100 : m ∈ Z+ }
= {x + 10n : x = 1, 3, 7, 9 and n = 0, 1, ..., 9}
∪ {x + 20n : x = 4, 8, 12, 16 and n = 0, 1, ..., 4}
∪ {25 + 50n : n = 0, 1} ∪ {0}.
• gcd(2 · 10, k) = 2:
{mk
mod 100 : m ∈ Z+ }
= {x + 20n : x = 1, 4, 9, 16 and n = 0, 1, ..., 4} ∪ {0, 25}.
• gcd(2 · 10, k) = 4:
{mk
mod 100 : m ∈ Z+ }
= {x + 20n : x = 1, 16 and n = 0, 1, ..., 4} ∪ {0, 25}.
• gcd(10, k) = 5:
{mk
mod 100 : m ∈ Z+ and gcd(10, k) = 5}
= {x + 50n : x = 1, 7, 25, 43, 49 and n = 0, 1}
∪ {0, 24, 32, 68, 76}.
• gcd(2 · 10, k) = 10:
{mk
mod 100 : m ∈ Z+ } = {0, 1, 24, 25, 49, 76}.
• gcd(2 · 10, k) = 20:
{mk
mod 100 : m ∈ Z+ } = {0, 1, 25, 76}.
The entire text has been dedicated to reducing the inevitable, base specific calculations of finding these sets, and we have noted several interesting properties
to help us do this, in any base b.
However, using the method we developed we are at last required to evaluate
the set {ak0 mod g : m ∈ S} which I was not able to reduce further. Although,
as most of the results of section 2.2 still apply here, this task is also in a sense
simplified. This is observable in the example of section 2.4.
3.2
Future work
Even though one could possibly reduce the base specific calculations of the
problem of finding the last two digits further, I think that the properties we
have observed in this text should be enough to cover the topic.
Throughout the text I have made comments on how or if one can generalize
certain results to cover the more general case of bs , as if one wanted to find the
last s digits, for s ≥ 2. Our work may be useful in this case as well, however
this is a more complex problem which would require more calculation just using
our method.
Certainly one could argue that I should have phrased the results we have gotten
3.2. Future work
23
to treat the more general case of bs instead. And had I known from the beginning
how easily most of the results could be generalized, I would agree. Nevertheless,
as it is relatively unrelated to the main objective of the project, we shall leave
the development of additional theory, specific to the case of bs for s ≥ 2, as an
appropriate topic for future work.
24
Chapter 3. Conclusion and future work
Bibliography
[1] John B. Fraleigh, (2002), A First Course In Abstract Algebra, Addison Wesley, Rhode Island.
[2] G. H. Hardy, E. M. Wright, (1960), An Introduction to the Theory of Numbers (4th ed.), Oxford University Press, London.
[3] Melvyn B. Nathanson, (2000), Elementary Methods in Number Theory,
Springer, New York.
[4] Hans Riesel, (1985), Prime Numbers and Computer Methods for Factorization, Birkäuser, Boston.
Schill Collberg, 2012.
25
26
Bibliography
Copyright
The publishers will keep this document online on the Internet - or its possible replacement - for a period of 25 years from the date of publication barring
exceptional circumstances. The online availability of the document implies a
permanent permission for anyone to read, to download, to print out single copies
for your own use and to use it unchanged for any non-commercial research and
educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional on the consent of the
copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual
property law the author has the right to be mentioned when his/her work is
accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its
procedures for publication and for assurance of document integrity, please refer
to its WWW home page: http://www.ep.liu.se/
Upphovsrätt
Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare
- under 25 år från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för
var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och
att använda det oförändrat för ickekommersiell forskning och för undervisning.
Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta
tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det
lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed
kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot
att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang
som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller
egenart. För ytterligare information om Linköping University Electronic Press
se förlagets hemsida http://www.ep.liu.se/
c 2012, Adam Schill Collberg
Schill Collberg, 2012.
27
Download