Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira. ISSN 0122-1701 y ISSN-e: 2344-7214
48
Abstract We consider the complexification of a commutative
ring with unity and specialize this construction to

, with
a
prime of the form
+
. Since this ring is commutative with
unity and is not a field, it is feasible to study various classes of
special elements such as invertibles, zero-divisors, idempotents,
and nilpotents. The method for this study consists of developing
computer programs in Python, through which the lists of special
elements in

are generated for different values of
. The
patterns that characterize these lists are sought, in addition to the
cardinality of each of these sets. Subsequently, conjectures of
mathematical type are stated for each of these classes of elements,
which reflect the observed patterns and properties. Finally, formal
mathematical proofs of all the conjectures found are made based
on various concepts and results of the theory of numbers, groups,
and rings. Thus, we show that Python programming, properly
used as part of a method, becomes an important tool to identify
patterns, properties, and characteristics of several abstract
concepts, typical of algebra.
Index TermsIdempotent, invertible, nilpotent, Python, zero-
divisor.
Resumen En este trabajo presentamos la complejificación de
un anillo conmutativo con unidad y especializamos esta
construcción al anillo de los enteros gaussianos
[
]
, con
un
primo de la forma
+
. Como este anillo es conmutativo con
unidad y no es un cuerpo, resulta viable estudiar diversas clases de
elementos especiales como invertibles, divisores de cero,
idempotentes y nilpotentes. La metodología seguida para este
estudio consiste en desarrollar programas computacionales en
Python, mediante los cuales se generan las listas de elementos
especiales en
[
]
para distintos valores de
; luego con estas
listas se buscan los patrones que caracterizan a los elementos
invertibles, idempotentes, divisores de cero y 2-nilpotentes,
además del cardinal de cada uno de estos conjuntos.
Posteriormente, para cada una de las clases de elementos
anteriores se enuncian conjeturas de tipo matemático, las cuales
reflejan los patrones y propiedades observadas. Finalmente,
apoyados en diversos conceptos y resultados de la teoría de
números, grupos y anillos, se hacen las demostraciones
matemáticas formales de todas las conjeturas halladas.
This work was submitted on December 20, 2024. Accepted on March 25,
2025. Published on March 31, 2025. This work was partially funded by the
University of Tolima, Ibagué, Colombia.
J. Ávila is a professor in the Department of Mathematics and Statistics at the
University of Tolima, Ibagué, Colombia (email: javila@ut.edu.co).
Mostramos así que la programación en Python, usada
adecuadamente en la metodología, se convierte en una
herramienta importante para identificar patrones, propiedades y
características de diversos conceptos abstractos, propios del
álgebra.
Palabras clave— Divisor de cero, 2-nilpotente, idempotente,
invertible, Python.
I. INTRODUCTION
C
OMPLEX numbers, since their appearance in the 16th
century due to Girolamo Cardano [1], have served as
inspiration for many studies in mathematics, engineering,
and physics, including countless applications in control theory,
electromagnetism, fluid dynamics, signal processing, quantum
mechanics, cosmology and cartography, among many others
[2,3]. In some cases, it has been necessary and fundamental to
consider subsets of the complex numbers, such as the Gaussian
integers or Eisenstein integers, since they are the appropriate
environment to study various problems in number theory, such
as the laws of quadratic and cubic reciprocity [4], or certain
subfields of the complex numbers, important for studying the
roots of polynomials, extensions of fields and Galois
correspondences [5,6]. Currently, the formal construction of the
field of complex numbers is based on taking the complete set of
ordered pairs with real entries and considering as operations the
usual component by component sum and a special product,
which is the one that characterizes the complex numbers [7].
The importance of this construction lies in the fact that any ring
can be taken as a basis, as shown in [8] and developed in detail
in [9,10], which means that virtually any commutative ring with
unity can be complexified. This not only allows the
construction of new rings, extended via the complex numbers,
but also provides another way to introduce some special sets of
the complex numbers, such as the ring of Gaussian integers, the
field of rational complex numbers, and also finite rings such as
the Gaussian integers modulo
, which will be studied in this
paper.
J. D. Liévano-González works with RST Asociados, Bogotá D.C., Colombia
(email: mineriadedatos@rstasociados.com.co).
O. E. Trujillo-Niño is a Master's student in Mathematical Statistics at the
University of Puerto Rico, Mayagüez Campus, Puerto Rico (email:
oscar.trujillo1@upr.edu).
Python programming and algebra: Some special
elements in Gaussian integers modulo a prime
Programación en Python y álgebra: Algunos elementos especiales en los enteros gaussianos
módulo un primo
J. Ávila , J. D. Liévano-González ,O. E. Trujillo-Niño
DOI: https://doi.org10.22517/23447214.25748
Scientific and Technological Research Paper
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira.
49
On the other hand, the current importance of programming and
more broadly of computational thinking lies, among many other
things, in the fact that it is a fundamental tool for solving
complicated problems, automating tasks, and facilitating
multiple aspects of contemporary society, a process that has
accelerated due to the emergence and development of artificial
intelligence. According to [11],
the concept of computational thinking was implicit in Papert
[12], where he spoke of its importance in the framework of his
educational proposal known as constructionism, through the
work with the robot “turtle” and the programming language
LOGO. Papert recognized the importance of an education in
which technology should be immersed, so he considered it
important to include robotics and programming from an early
age, which was not achieved in the following decades.
However, according to [11], the work that marks a turning point
in the current conception of computational thinking is that
developed by Wing [13], where she shows that this concept
provides new meanings and dimensions for the human being,
with great potential to be developed in educational
environments. For [14], computational thinking is a term coined
by Wing [13], to describe a set of skills, habits, and
comprehensive approaches to solving problems related to
programming, which are not only limited to computer use.
Thus, in a certain way, we can understand that computational
thinking is a set of processes that allow active interaction
between a person and a computer, to solve problems of various
kinds and make use of patterns, algorithms, models, etc.
Given the above, the Ministries of Education and Ministries or
Institutes of Technology in many countries have been creating
special initiatives aimed at young people, to foster
computational skills, including programming. Even in countries
such as England, Spain, the United States, Costa Rica, Ecuador,
and Argentina, curricular proposals have been developed to
enhance computational and technological skills, including
computational thinking and programming [15]. In the
Colombian case, the Ministry of Information Technologies and
Communications has a Digital Government Policy [16],
through which it is developing the Colombia Program and
Green Code Strategy initiatives. The purpose of the former is to
generate resources and opportunities for teachers’ professional
development to promote computational thinking in official
educational institutions in Colombia, with a focus on gender
equity. The second consists of the first learning ecosystem for
the development of computational thinking skills for children
and young people in public and private schools in Colombia.
The ICT Ministry also has the following four proposals for Free
Digital Training: Talento Tech, Senatic, Avanza Tech, and
Talento GovTech.
As we have seen, programming, and more broadly
computational thinking, has become a fundamental tool in
practically all areas of knowledge. In mathematics, this tool has
been important not only for research but also for education.
Currently, several programs for mathematical and statistical use
are booming, due to their potential, ease of learning, and
because they are open source, allowing any user to use them
without any subscription costs for their use. In particular,
Python programming has provided countless possibilities in
research and teaching, which is why we highlight in this work
the use of this language for the study of various algebraic
concepts.
Our principal goal in this work is to show the importance of
programming to obtain results in algebra. This paper is
organized as follows. After the introduction, in Section II, we
present the construction of the complexification of any
commutative ring with unity. In Section III, we use Python
programming to continue the work developed in [9,10]. We
study the zero-divisors, idempotents, 2-nilpotents, and
invertible elements of the ring
[
]
with
a prime of the form

+
1
. We want to emphasize the importance of programming
to obtain results in algebra. Thus, the implemented
methodology consists of developing computer programs in
Python language. This leads to obtaining the lists of such
elements for different values of the prime
. In the next step,
we find the corresponding patterns that characterize these
classes of elements, which are presented as conjectures. Finally,
we proceed to find the formal proofs of the conjectures
obtained, most of which were originally developed by the
authors. This same process is done to determine the cardinality
of each of these classes.
II. THE COMPLEXIFICATION OF
, WITH
PRIME
The classical construction of the complex numbers from the real
numbers is a topic that is usually addressed in the exercises of
an algebra textbook or presented in a course on complex
variables. In addition, the three classical representations of the
complex numbers, the usual one, the one by matrices, and the
one by a quotient, are often overlooked by many students of
both engineering and mathematics. The work done in [9,10]
recovers these constructions and representations and brings
them into more general contexts. Following these two works,
we present below the construction of the complexification of
any commutative ring with unity.
Let
be a commutative ring with unit element
1
. On the set
×

we define the sum component by component. The
product is given by
(

)
(

)
=


+

,
for any

×
.
Affirmation 1. If
is a commutative ring with unit
1
, then the
set
×
with the operations given above is a commutative ring
with unit.
Proof. Since the sum of pairs is component by component, it is
easily observed that

×

+
)
is an abelian group. Moreover,
the product is commutative, since
is commutative. Now for
(

)
,
(

)

×
it follows that
(

)
(

)
(

)
=


+

=





+

+


(1)
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira
50
and
(

)
(

)
(

)
=


+

(

)
=






+

+

. (2)
Since (1) = (2), then
(

)
(

)
(

)
=
(

)
(

)
(

)
.
That is, the product in
×
is associative.
Moreover, for
(

)
,
(

)

×
it follows that
(

)
(

)
+
(

)
=
(

)
(
+

+
)
=

+




+

+

+

.
=
(

)
(

)
+
(

)
(

)
.
That is, the product distributes with respect to the sum on the
left. The other distributive property is a consequence of the
previous distributivity and commutativity. Finally, it is easy to
see that the pair
(1,0)
is the identity element for the product.
Therefore, the set
×
with the indicated operations is a
commutative ring with unity.
The ring

×

+
,
)
, described above will be denoted by
. In addition, seeking to make this work complete for the
reader, we present below some particularities of this ring.
Affirmation 2. Let
be a commutative ring with unit element
1. Then:
1. The function

defined by
(
)
=
(

)
for all
is an injective homomorphism of rings.
2. The element
=
(0,1)
commutes with

, for
each
.
According to Affirmation 2, the First Isomorphism Theorem
allows us to conclude that the ring
contains a subring
isomorphic to the ring
or we can also say that any element
is biunivocally identified with the pair

.
Then, for each

we have
(

)
=
(

)
+

. Moreover, note that the element
=
(0,1)
satisfies
=
(
1,0)
and
commutes with each element
(

)
. Therefore, using the aforementioned identification we
can conclude that
(

)
=
+

where

,
=
(0,1)
is
such that
=
1
and
commutes with each element
(

)
.
Thus,
can be seen as the Complexification of the ring
’’ [8]. That is,
coincides with the ring,
A
[
]
=
{
+


=
1, 
=
 
}
.
As particular cases, it is clear that when
=
, the field of
complexes
is obtained; if
=
, one obtains the ring of
Gaussian integers
[
]
=
{
+

}
[5,6]; and if
=
, one obtains the Gaussian integers modulo
,
[
]
=
{
+

}
, which can also be constructed as the quotient
of the ring
[
]
by the ideal
in
[
]
generated by n [17,18].
Since by considering as a base ring the field of reals
, the field
of complex numbers
is obtained, one can generalize this
construction by considering finite fields. This is the case in
[9,10], where they consider as a base ring the field
, with
a
prime, construct the ring
[
]
and show that it is a field if, and
only if,
is not a sum of two squares or equivalently
is of the
form

+
3
. Furthermore, they prove that in this case three
isomorphic representations of
[
]
, analogous to those
obtained from the reals, are obtained. They are obtained using
the matrix ring
=

, the quotient
ring
[
]
/
+
1
and the one we have developed in this
section
(see Figure 1). Thus, we will denote the ring
of Gaussian integers over
as
[
]
or
.
Fig. 1. Isomorphic representations of
[
]
for
prime of the
form

+
3
.
III. SOME ALGEBRAIC CONCEPTS IN

, WITH
A PRIME
OF THE FORM

+
1
According to the previous section, if
is a prime of the form

+
1
, or equivalently
is an odd prime which is the sum of
two squares, then
[
]
is a commutative ring with unity, which
is not a field. This means that in these rings it is feasible to find
various elements important for ring theory such as invertibles,
zero-divisors, idempotents, and nilpotents, among many others
[5, 8, 19].
Although several of these classes of elements have been
characterized in various works [17, 18], the way this has been
done is by directly using previous results or theoretical aspects
of algebra and number theory to finally, on some occasions,
verify these results using programming languages. In this work,
we want to emphasize the importance of programming to obtain
results in algebra. By continuing the work developed in [9,10],
we will use Python to study the zero-divisors, idempotents, 2-
nilpotents, and invertible elements of the ring
[
]
with
a
prime of the form

+
1
. Thus, the process we will follow in
this work consists of developing programs in Python and
generating the previously described lists of elements of the ring
[
]
, for all primes
of the form

+
1
less than 100. Then,
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira.
51
we proceed to identify the patterns or characteristics of each
class of these elements, state the conjectures obtained in
mathematical terms, and make the corresponding formal proofs.
This process is also done to determine the cardinality of each of
the sets defined by the different classes of elements. All the
results presented here are part of a more general study presented
in [20].
Figure 2 shows the program that allows one to perform and
visualize the product of elements in
[
]
.
Fig. 2. Python program for the product in

.
Definition 1. A nonzero element
,
is a zero-
divisor if there exists a nonzero element
,
such
that
,
,
=
0
,
0
.
The Python program in Figure 3 was designed to display the
zero-divisors for each prime and indicate the number of zero-
divisors in each case.
Fig. 3. Python program for the zero-divisors in

.
The values obtained for
=
5, 13,
and
17
are shown in Table
I. In each pair found by the program, a very interesting
particularity is observed. For example, for
=
5
if we take the
pair of zero-divisors
1
,
2
and
1
,
3
, then one has that
1
+
2
=
0
and
1
+
3
=
0
. If for
=
13
one takes the pair
8
,
12
and
1
,
5
, one has that
8
+
12
=
0
and
1
+
5
=
0
. This
pattern is observed for all other pairs of zero-divisors, for all
odd primes, sum of two squares less than 100. We can then
conjecture that a nonzero element
,
is a zero-
divisor if, and only if,
+
=
0
. Before proving this
conjecture, we must prove a preliminary result.
Affirmation 3. Let
be an odd prime which is a sum of two
squares. If
,
is a zero-divisor in
, then
0
and
0
.
Proof. By assumption, there exists
,
nonzero
such that
,
,
=


,

+

=
0
,
0
. If
=
0
,
then

=
0
and

=
0
. Since
is an integral domain, one
has that
=
0
and
=
0
, which is a contradiction. The same is
true if
=
0
, so we conclude that
0
and
0
.
TABLE I
ZERO-DIVISORS IN
[
]
,

[
]
, AND

[
]
p = 5
p = 13
p = 17
32; distintos 8
288; distintos 24
512; distintos 32
[1, 2] * [1, 3]
[1, 5] * [1, 8]
[1, 4] * [1, 13]
[1, 2] * [2, 1]
[1, 5] * [2, 3]
[1, 4] * [2, 9]
[1, 2] * [3, 4]
[1, 5] * [3, 11]
[1, 4] * [3, 5]
[1, 2] * [4, 2]
[1, 5] * [4, 6]
[1, 4] * [4, 1]
[1, 3] * [1, 2]
[1, 5] * [5, 1]
[1, 4] * [5, 14]
[1, 3] * [2, 4]
[1, 5] * [6, 9]
[1, 4] * [6, 10]
[1, 3] * [3, 1]
[1, 5] * [7, 4]
[1, 4] * [7, 6]
[1, 3] * [4, 3]
[1, 5] * [8, 12]
[1, 4] * [8, 2]
[2, 1] * [1, 2]
[1, 5] * [9, 7]
[1, 4] * [9, 15]
[2, 1] * [2, 4]
[1, 5] * [10, 2]
[1, 4] * [10, 11]
[2, 1] * [3, 1]
[1, 5] * [11, 10]
[1, 4] * [11, 7]
[2, 1] * [4, 3]
[1, 5] * [12, 5]
[1, 4] [12, 3]
[2, 4] * [1, 3]
[1, 8] * [1, 5]
[1, 4] * [13, 16]
[2, 4] * [2, 1]
[1, 8] * [2, 10]
[1, 4] * [14, 12]
[2, 4] * [3, 4]
[1, 8] * [3, 2]
[1, 4] * [15, 8]
[2, 4] * [4, 2]
[1, 8] * [4, 7]
[1, 4] * [16, 4]
[3, 1] * [1, 3]
[1, 8] * [5, 12]
[1, 13] * [1, 4]
[3, 1] * [2, 1]
[1, 8] * [6, 4]
[1, 13] * [2, 8]
[3, 1] * [3, 4]
[1, 8] * [7, 9]
[1, 13] * [3, 12]
Definition 2. Let
be a prime and
an integer relatively prime
to
, a relation which is denoted by
(

)
=
1
. We say that
is
a quadratic residue or a square modulo
, if there exists
such that
(

)
.
Note that if
is a quadratic residue modulo
, then there exists
such that
=
. We can then say that
is a square root
of
modulo
and
is also. Then, in this case, we can write
=
±
.
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira
52
For the study of quadratic residues, the Legendre symbol
becomes fundamental. It is defined below.
Definition 3. Let
be an odd prime and
such that
(

)
=
1
. Legendre’s symbol is defined as:
=
1,
if
is a quadratic residue
1,
if
is not a quadratic residue
The following proposition presents some properties of the
Legendre symbol. The proofs can be found in many classical
texts on number theory [21,22].
Proposition 1. Let
be an odd prime and

such that
(

)
=
(

)
=
1
. Then:
1.

 
.
2
.
=
1.
3.

=
.
4. If
(

)
,
then
=
.
5.
1
(
 4
)
if, and only if,
1
is a quadratic residue
modulo
.
6.
3
(
 4
)
if, and only if,
1
is not a quadratic residue
modulo
.
Affirmation 4. Let
be an odd prime sum of two squares and
0
,
0
,
. Then
,
is a zero-divisor if, and
only if,
+
=
0
.
Proof. If
,
is a zero-divisor, then there exists
,
nonzero such that
,
,
=
0
,
0
. Note then that
,
is also a zero-divisor and by Affirmation 3, it follows that
0
and
0
. From this equality there follows


,

+

=
0
,
0
and thus we obtain


=
0
(1)

+

=
0
(2)
Multiplying equation (1) by
, equation (2) by
and summing
yields

+

=
0
. Since
0
, we conclude that
+
=
0
.
Conversely, since
0
,
0
,
and
+
=
0
,
then
0
,
0
,
and
,
,
=
,
+
=
0
,
0
. That is,
,
is a zero-divisor.
Having characterized the zero-divisors, we also ask how many
of them are there, in terms of the prime
. If we denote the
cardinality of this set as
|


|
, then, according to the
lists provided by the program (see Table I), it can be seen that
for
=
5
we have
|


|
=
8
=
2
(
5
)
2
; for
=
13
it
follows that
|



|
=
24
=
2
(
13
)
2
; and for
=
17
,
that
|



|
=
32
=
2
(
17
)
2
. This same pattern holds
for all odd primes that are a sum of two squares, less than 100.
This allows us to conjecture that
|


|
=

1)
,
which is formally proven below.
Affirmation 5. If
is an odd prime which is a sum of two
squares, then
|


|
=

1)
.
Proof. Let
,
be a zero-divisor. Then
and
are
nonzero and
+
=
0
. This implies that
=
and by
Proposition 1, we have that for all
1
,
2
,…,
1
:
=
1
=
1
.1
=
1.
Which signifies that
is a quadratic residue modulo
.
Equivalently,
has two square roots in
and they are
and
. Moreover,
and
are different because otherwise
you would have

=
0
, which leads to
=
0
, which is a
contradiction.
In conclusion, if
,
is a zero-divisor, the
possibilities for
are
1
and for
are 2. That is, there exist

1)
zero-divisors.
Definition 4. An element
,
is called nilpotent if
there exists
such that
,
=
(
0
,
0
)
. We will say that
,
is
2
nilpotent if
,
=
(
0
,
0
)
.
The Python program in Figure 4 is designed to find the 2-
nilpotent elements for each prime
and at the same time
indicate the number of 2-nilpotents in each case.
Fig. 4. Python program for the 2-nilpotent elements in

.
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira.
53
The values obtained for
=
5, 13, 17, 29,
and
37
are given in
Table II. Note that in all cases, there is only one 2-nilpotent
element, the trivial
(
0
,
0
)
. This is also observed for the other odd
primes that are sums of two squares and are less than 100. So,
we can conjecture that only the null element of

is
2
nilpotent, which is proved below.
TABLE II
2-NILPOTENT ELEMENTS IN
[
]
, FOR
=
5, 13, 17, 29,
AND
37
Primo
Lista Nilpotentes
Total Lista
p = 5
[0, 0] * [0, 0] = [0, 0]
1
p = 13
[0, 0] * [0, 0] = [0, 0]
1
p = 17
[0, 0] * [0, 0] = [0, 0]
1
p = 29
[0, 0] * [0, 0] = [0, 0]
1
p = 37
[0, 0] * [0, 0] = [0, 0]
1
Affirmation 6. Let
be an odd prime which is a sum of two
squares. Then, the only
2
nilpotent element of
is
(
0
,
0
)
.
Proof. If
,
is
2
nilpotent, then
,
,
=
0
,
0
. That
is,
,

+

=
0
,
0
and we obtain the system
=
0
(3)

=
0
(4)
Equation
(4)
implies that
=
0
or
=
0
. Replacing either of
the two options in equation
(3)
yields
=
0
or
=
0
,
respectively. In conclusion,
=
0
and
=
0
.
Definition 5. An element
,
is called idempotent
if
,
=
(
,
)
.
It is clear that
0
,
0
and
1
,
0
are idempotents of
,
which are called trivial idempotents.
The Python program in Figure 5 was designed to show the
idempotent elements for each prime
and at the same time
indicate the number of these elements.
Fig. 5. Python program for the idempotent elements in

.
The results given by the above program for
=
5, 13, 17, 29, 37
, and 41 are shown in Table III. It can be
observed that the nontrivial idempotents for
=
5
are
3
,
1
and
(
3
,
4
)
. In both cases the first component is
3
,
3
=
5
1
2
and
furthermore
3
+
1
=
0
and
3
+
4
=
0
. For
=
13
they
are
7
,
4
and
(
7
,
9
)
. In both cases the first component is
7
,
7
=
13
1
2
and moreover
7
+
4
=
0
and
7
+
9
=
0
. This
same pattern is observed in the other primes in the table and in
all other odd primes less than 100 that are the sum of two
squares. Thus, we conjecture that
(
,
)
is a nontrivial
idempotent if, and only if,
=
1
2
and
+
=
0
. This is
proved below.
TABLE III
IDEMPOTENT ELEMENTS IN
[
]
, FOR
=
5, 13, 17, 29, 37
, AND 41
Primo
Lista Idempotentes
Total Lista
[0, 0] * [0, 0] = [0, 0]
[1, 0] * [1, 0] = [1, 0]
[3, 1] * [3, 1] = [3, 1]
p = 5
[3, 4] * [3, 4] = [3, 4]
4
[0, 0] * [0, 0] = [0, 0]
[1, 0] * [1, 0] = [1, 0]
[7, 4] * [7, 4] = [7, 4]
p = 13
[7, 9] * [7, 9] = [7, 9]
4
[0, 0] * [0, 0] = [0, 0]
[1, 0] * [1, 0] = [1, 0]
[9, 2] * [9, 2] = [9, 2]
p = 17
[9, 15] * [9, 15] = [9, 15]
4
[0, 0] * [0, 0] = [0, 0]
[1, 0] * [1, 0] = [1, 0]
[15, 6] * [15, 6] = [15, 6]
p = 29
[15, 23] * [15, 23] = [15, 23]
4
[0, 0] * [0, 0] = [0, 0]
[1, 0] * [1, 0] = [1, 0]
[19, 3] * [19, 3] = [19, 3]
p = 37
[19, 34] * [19, 34] = [19, 34]
4
p = 41
[0, 0] * [0, 0] = [0, 0]
4
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira
54
[1, 0] * [1, 0] = [1, 0]
[21, 16] * [21, 16] = [21, 16]
[21, 25] * [21, 25] = [21, 25]
Recall that if
is a nontrivial idempotent in a ring with unity 1,
then
is a zero-divisor since one has
(
1
)
=
0
.
Affirmation 7. Let
be an odd prime which is the sum of two
squares and
(
,
)
. Then
(
,
)
is a nontrivial
idempotent if, and only if,
=
1
2
and
+
=
0
.
Proof. If
,
is a nontrivial idempotent, then
,
is a zero-
divisor and by Affirmation 3,
0
and
0
. The following
system of equations results:
=
(5)

=
(6)
From Equation (6), one has
2
=
1
=
+
1
=
1
2
.
Substituting in Equation (5) we obtain
+
=
2
=
2

1)
4
1
2
=
1
2
1
2
=
0
.
On the other hand, let
(
,
)
with
=
1
2
and
+
=
0
. Then,
=
and moreover,
,
=
,

=
2
,
=
2

1)
4
,
=
1
2
,
=
,
.
That is,
(
,
)
is idempotent.
For the number of nontrivial idempotent elements, it suffices to
look at Table III. The results indicate that independently of the
prime
, exactly two nontrivial idempotents are always found.
That is, if we denote the cardinality of this set by
|


|
,
then
|


|
=
2
. This will be proved below.
Affirmation 8. If
is an odd prime which is a sum of two
squares, then
|


|
=
2
.
Proof. Let
(
,
)
be a nontrivial idempotent. Then
=
1
2
and
+
=
0
. Thus,
has a fixed value that
depends on
and
=
. By Proposition 1 and the proof
of Affirmation 7,
has two different square roots in
.
That is,
takes two different values, which implies that
|


|
=
2
.
To finish this work, it remains to study the invertible elements
of

.
Definition 6. An element
+

is invertible if there is
a
+

with
+
+
=
1
.
The Python program in Figure 6 was designed to display the
invertible elements for each prime
and at the same time
indicate the number of these elements.
Fig. 6. Python program for the invertible elements in

.
The results obtained by the above program for
=
5
and
=
13
are observed in Tables IV and V. We can observe that
the only invertible pairs
(
,
)
are those with
+
0
. The
same result is observed for all odd primes less than 100 that are
the sum of two squares. The proof of this is analogous to that
presented in [9, 10], we include it for completeness of this paper
and as a benefit to the reader.
TABLE IV
INVERTIBLE ELEMENTS IN
[
]
p = 5
Total inversos = 16
[0, 1] * [0, 4] = [1, 0]
[2, 2] * [4, 1] = [1, 0]
[0, 2] * [0, 2] = [1, 0]
[2, 3] * [4, 4] = [1, 0]
[0, 3] * [0, 3] = [1, 0]
[3, 0] * [2, 0] = [1, 0]
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira.
55
[0, 4] * [0, 1] = [1, 0]
[3, 2] * [1, 1] = [1, 0]
[1, 0] * [1, 0] = [1, 0]
[3, 3] * [1, 4] = [1, 0]
[1, 1] * [3, 2] = [1, 0]
[4, 0] * [4, 0] = [1, 0]
[1, 4] * [3, 3] = [1, 0]
[4, 1] * [2, 2] = [1, 0]
[2, 0] * [3, 0] = [1, 0]
[4, 4] * [2, 3] = [1, 0]
Affirmation 9. Let
be an odd prime which is the sum of two
squares and
+

. Then,
+
is invertible if, and
only if,
+
0
.
Proof. If
+
=
0
, by Affirmation 4 we have that
+
is
a zero-divisor and thus it is not invertible.
On the other hand, if
+
0
, then it is easy to see that the
multiplicative inverse of
+
is
+

=
+


.
TABLE V
INVERTIBLE ELEMENTS IN

[
]
p = 13
Total inversos = 144
[0, 1] * [0, 12] = [1, 0]
[1, 7] * [6, 10] = [1, 0]
[0, 2] * [0, 6] = [1, 0]
[1, 9] * [10, 1] = [1, 0]
[0, 3] * [0, 4] = [1, 0]
[1, 10] * [4, 12] = [1, 0]
[0, 4] * [0, 3] = [1, 0]
[1, 11] * [8, 3] = [1, 0]
[0, 5] * [0, 5] = [1, 0]
[1, 12] * [7, 7] = [1, 0]
[0, 6] * [0, 2] = [1, 0]
[2, 0] * [7, 0] = [1, 0]
[0, 7] * [0, 11] = [1, 0]
[2, 1] * [3, 5] = [1, 0]
[0, 8] * [0, 8] = [1, 0]
[2, 2] * [10, 3] = [1, 0]
[0, 9] * [0, 10] = [1, 0]
[2, 4] * [4, 5] = [1, 0]
[0, 10] * [0, 9] = [1, 0]
[2, 5] * [5, 7] = [1, 0]
[0, 11] * [0, 7] = [1, 0]
….............
[0, 12] * [0, 1] = [1, 0]
[12, 6] * [7, 3] = [1, 0]
[1, 0] * [1, 0] = [1, 0]
[12, 7] * [7, 10] = [1, 0]
[1, 1] * [7, 6] = [1, 0]
[12, 9] * [3, 1] = [1, 0]
[1, 2] * [8, 10] = [1, 0]
[12, 10] * [9, 12] = [1, 0]
[1, 3] * [4, 1] = [1, 0]
[12, 11] * [5, 3] = [1, 0]
[1, 4] * [10, 12] = [1, 0]
[12, 12] * [6, 7] = [1, 0]
As for the number of invertible elements, the program shows in
Tables IV and V, that for
=
5
there are 16 invertibles and for
=
13
there are 144 invertibles. We note then that
16
=
(
5
1
)
and
144
=
(
13
1
)
. Moreover, the same can be
observed for the other odd primes less than 100 that are the sum
of two squares. Thus, if we denote the cardinality of this set by
|


|
, then
|


|
=
(
1
)
. This is proved
below.
Affirmation 10. If
is an odd prime which is the sum of two
squares, then
|


|
=
(
1
)
.
Proof. According to Affirmations 4 and 9, it can be concluded
that every nonzero element
+

, is a zero-divisor or
invertible: this depends on whether
+
=
0
or
+
0
, respectively. That is, the set

is partitioned into three
classes, the zero-divisors, the invertibles, and the zero element.
By Affirmation 5,
=
|


|
+
2
(
1
)
+
1
, which
implies that
|


|
=
2
(
1
)
1
=
(
1
)
,
which is what we wanted to prove.
IV. CONCLUSIONS
We present below the most relevant aspects that emerged
during the development of this work and at the same time we
would like to make some recommendations to continue with
this study, providing new elements for discussion and research.
- The process employed in this work allows using
computational programming to conjecture results in algebra.
This shows that programming is not only useful in engineering
or applied sciences but also allows interesting computational
studies in algebra, an abstract area. Consequently, many of the
known processes in mathematical problem-solving using
programming were evidenced, such as: problem understanding,
exploration, case study, program design and implementation,
desktop testing, and evaluation.
- We emphasize the pedagogical importance of the process
followed in this work to obtain the results. This allows, through
computer programming, to obtain results, which in turn lead to
a differentiated mental development in terms of the observation
of patterns, formulation of hypotheses, and finally the formal
proofs of the assertions. In the same way, other mental
processes are developed in the student as a consequence of the
deep understanding of the set being studied together with its
structure, the programming of the different algebraic concepts,
analysis of the results, observation of patterns, formulation of
hypotheses, and their theoretical proof.
- The computer programs developed in this work can be
modified to study other important elements in a ring such as
nilpotent in general, regular, associated, and irreducible, among
many others [5, 8, 19]. In this case, one could also consider
various rings of integers modulo
or some subclasses as
,
,

with

primes and the corresponding
complexification of each of them. Even other sets of integers
modulo
such as Eisenstein, Hurwitz and Lipschitz integers
could be considered [23, 24].
- As a continuation of this work and also relying on
computational programming, additional studies on the group of
invertible elements, its generators, and the cardinality of this set
can be considered. As for the zero-divisors we can observe that
the simulations found can be used to determine which and how
many are the pairs
,
such that
,
,
=
0
,
0
, where
,
is a fixed zero-divisor. That is, in the language of graphs
we would be thinking about determining which and how many
vertices are connected to the given vertex
,
. This would
lead to the study of the zero-divisor graph of the ring

with
an odd prime of the form

+
1
or more generally of the
rings

and
[8]. Finally, as for idempotents, this paper
shows that in the case of the rings

with
an odd prime of
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira
56
the form

+
1
, only two nontrivial idempotents result, which
does not allow us to go deeper into this ring. However, when
considering more general rings such as
,

and even
quaternions modulo
, a nontrivial number of idempotents arise
[20]. This makes viable a deeper study of them in terms of
characterization, cardinality, classes of these, associated
ordered set, and all notions arising from this order [19].
REFERENCES
[1] I. Stewart, Significant Figures: The Lives and Works of
Greats Mathematician. New York, NY, USA: Basic Books,
2007.
[2] R. Penrose, The Road to Reality: A Complete Guide to the
Laws of the Universe. New York, NY, USA: Alfred. A. Knopf,
2005.
[3] S. Ponnusamy and H. Silverman, Complex Variables with
Applications. Boston, MA, USA: Birkhäuser, 2006.
[4] I. Kleiner, “From numbers to rings: The early history of ring
theory,” Elem. Math., vol 53, pp. 18-35, 1998, DOI
10.1007/s000170050029.
[5] D. S. Dummit and R. M. Foote, Abstract Algebra. 3rd ed.
New Delhi, IND: Wiley India Pvt. Ltd., 2016.
[6] J. B. Fraleigh, A First Course in Abstract Algebra. 7th ed.
New York, NY, USA: Pearson, 2002.
[7] J. B. Conway, Functions of One Complex Variable. 2nd ed.
New York, NY, USA: Springer New York, 1978.
[8] K. H. Spindler, Abstract Algebra and Applications Vol. II,
Rings and Fields. New York, NY, USA: Marcel Dekker Inc.,
1994.
[9] J. Ávila, J. S. Correa-Amaya y E. Cupitra-Vergara,
“Números complejos sobre anillos,” Scientia Et Technica, vol.
23, no. 04, pp. 581-585, 2018, DOI 10.22517/23447214.18171.
[10] J. S. Correa-Amaya y E. Cupitra-Vergara, “De los
complejos a
×
, p primo,” Tesis de Pregrado,
Departamento de Matemáticas y Estadística, Universidad del
Tolima, Ibagué, Colombia, 2016.
[11] M. D. M. Sánchez-Vera, “La robótica, la programación y
el pensamiento computacional en la educación infantil,”
Infancia, Educación y Aprendizaje (IEYA), vol. 7, no. 1, pp.
209-234, 2021, DOI 10.22370/ieya.2021.7.1.2343.
[12] S. Papert, “Mindstorms: Children, Computers and
Powerful ideas,” New York, NY, USA: Basic Books Inc.
Publishers, 1980. [Online]. Available:
https://worrydream.com/refs/Papert_1980_-
_Mindstorms,_1st_ed.pdf. Accessed on: Dec 9, 2024.
[13] J. M. Wing, “Computational thinking,” Communications
of the ACM, vol. 49, no. 3, pp. 33-35, 2006, DOI
10.1145/1118178.1118215.
[14] L. A. Sánchez-Ruíz, “Comprendiendo el pensamiento
computacional: Experiencias de programación a través de
Scratch en colegios públicos de Bogotá,” Tesis de Maestría,
Departamento de Psicología, Universidad Nacional de
Colombia, Bogotá, Colombia, 2016.
https://repositorio.unal.edu.co/bitstream/handle/unal/57424/lui
salfredosanchezruiz.2016.pdf?sequence=1&isAllowed=y
Accessed on: Mar 28, 2025.
[15] E. Coronel-Díaz y G. Lima-Silvain, “El pensamiento
computacional. Nuevos retos para la educación del siglo XXI,”
Virtualidad, Educación y Ciencia, año 11, no. 20, pp. 115-137,
2020, DOI 10.60020/1853-6530.v11.n20.27451.
[16] Ministerio de Tecnologías de la Información y las
Comunicaciones. Decreto no. 767 de 16 mayo 2022, Por el cual
se establecen los lineamientos generales de la Política de
Gobierno Digital y se subroga el Capítulo 1 del Título 9 de la
Parte 2 del Libro 2 del Decreto 1078 de 2015, Decreto Único
Reglamentario del Sector de Tecnologías de la Información y
las Comunicaciones. [Online]. Available:
https://gobiernodigital.mintic.gov.co/692/articles-
272977_Decreto_767_2022.pdf. Accessed on: Mar 28, 2025.
[17] A. A. Allam, M. J. Dunne, J. R. Jack, J. C. Lynd, and H.
W. Ellingsen Jr., “Classification of the group of units in the
Gaussian integers modulo N,” Pi Mu Epsilon Journal, vol. 12,
no. 9, pp. 513-519, 2008. [Online]. Available:
http://www.jstor.org/stable/24345265. Accessed 28 Mar. 2025.
[18] O. Emad-Abu, A. A. Salah, and J. Nafiz-Abu, “Zero
divisor graph for the ring of Gaussian integers modulo
,”
Commun. Algebra, vol. 36, no. 10, pp. 3865-3877, 2008, DOI
10.1080/00927870802160859.
[19] T. Y. Lam, A First Course in Noncommutative Rings. New
York, NY, USA: Springer-Verlag, 2001.
[20] J. D. Liévano y O. E. Trujillo, “Algunos conceptos
algebraicos en los complejos y cuaterniones sobre
,
p
primo,”
Tesis de Pregrado, Departamento de Matemáticas y Estadística,
Universidad del Tolima, Ibagué, Colombia, 2021. [Online].
Available:
https://repository.ut.edu.co/server/api/core/bitstreams/a48ec74
b-3d68-4dc3-b751-791f1da1f930/content. Accessed on: Mar
28, 2025.
Scientia et Technica Año XXVIII, Vol. 30, No. 01, enero-marzo de 2025. Universidad Tecnológica de Pereira.
57
[21] R. Jiménez, E. Gordillo y G. Rubiano, Teoría de
Números para Principiantes. 2a ed. Bogotá, COL: Universidad
Nacional de Colombia, 2014.
[22] I. M. Vinogradov, Fundamentos de la Teoría de los
Números. Moscú, URSS: Mir, 1977.
[23] A. Osama and Emad-Abu, “On Eisenstein integers modulo
,” Int. Math. Forum, vol. 5, no. 22, pp. 1075-1082, 2010.
[Online]. Available: https://www.m-hikari.com/imf-2010/21-
24-2010/index.html. Accessed on: Mar 28, 2025.
[24] N. Tsopanidis, “The Hurwitz and Lipschitz integers and
some applications,” Tese de Doutoramento, Departamento de
Matemática, Universidade do Porto, Porto, Portugal, 2020.
[Online]. Available: https://repositorio-
aberto.up.pt/bitstream/10216/131608/2/437378.pdf. Accessed
on: Mar 28, 2025.
J. Avila. He was born in Líbano, Tolima - Colombia, in 1972.
He graduated in Mathematics and Physics from the Universidad
del Tolima in 1995. He studied a Master's Degree in
Mathematics at the Universidad Nacional de Colombia, Bogotá,
and graduated in 2002. PhD. in Mathematics from the
Universidade Federal do Rio Grande do Sul, Brazil, and
graduated in 2008. He currently works as a professor at the
Universidad del Tolima. His areas of interest are algebra and
topology.https://orcid.org/0000-0002-8713-2449
J. D. Liévano-González. He was born in Ibagué, Tolima -
Colombia, in 1993. He completed undergraduate studies at the
Universidad del Tolima, obtaining a degree of Professional in
Mathematics with Emphasis in Statistics in 2021. Subsequently,
he took certified courses in software development and data
science. Currently, he works as a data scientist in the collection
management industry.https://orcid.org/0009-0001-1898-7494
O. E. Trujillo-Niño. He was born in Ibagué, Tolima-Colombia,
in 1996. He graduated in Mathematics with Emphasis in
Statistics from the Universidad del Tolima in 2022. He is
currently studying for a master's degree in mathematics-
statistics at the University of Puerto Rico, Mayagüez campus.
He is also working as a data scientist in the company Lumni
Colombia S.A. https://orcid.org/0009-0003-8421-9914