Two algorithms to find twin prime numbers in a specified range using functional programming

Keywords: algorithm, learning, function, prime number, paradigm, programming, recursion

Abstract

A great challenge for teaching engineers is to find applications where specific engineering is a solution to problems in other areas in such a way as to take advantage of its conceptual and instrumental potential. Such is the case of computer programming, which, as part of systems engineering, allows solving problems thanks to today’s great technological capabilities that allow taking advantage of what human knowledge has developed. This paper presents an algorithmic solution to the problem of finding twin prime numbers in a range specified by the user. The functional programming paradigm and concepts such as function, recursion, and cycles were used to solve the problem. From this perspective, reliable results were obtained that comply both with the definition of twin prime numbers and with the principles of algorithmic efficiency. It is concluded that to the extent that applications that solve problems in other areas can be shared with programming students, the concepts of a paradigm will become much more understandable and applicable, and the sense of taking advantage of technology in favor of the human being will be found.

Author Biographies

Omar Iván Trejos Buriticá, Universidad Tecnológica de Pereira

Ph. D. en Ciencias de la Educación de la Universidad Tecnológica de Pereira, Pereira, Risaralda, Colombia.

Luis Eduardo Muñoz Guerrero, Universidad Tecnológica de Pereira

Ph. D. en Ciencias de la Educación de la Universidad Tecnológica de Pereira, Pereira, Risaralda, Colombia.

Downloads

Download data is not yet available.

Author Biographies

Omar Iván Trejos Buriticá, Universidad Tecnológica de Pereira

Ph. D. en Ciencias de la Educación de la Universidad Tecnológica de Pereira, Pereira, Risaralda, Colombia.

Luis Eduardo Muñoz Guerrero, Universidad Tecnológica de Pereira

Ph. D. en Ciencias de la Educación de la Universidad Tecnológica de Pereira, Pereira, Risaralda, Colombia.

References

A. Alexander, Functional Programming, Boston: CreateSpace Independent Publishing, 2017.

R. Shorey, Soft Skills for a big impact, Nueva York: Independently Publisher, 2021.

B. J. Hoogenboom y R. C. Manske, "How to write a scientific article", International Journal of Sports Physical Therapy, vol. 7, nº 5, 512-517, 2012.

O. Trejos, Significado y competencias, Pereira: Editorial Papiro, 2015.

G. Small, Digital Brain, Bogotá: Urano, 2016.

Y. Harari, 21 lecciones para el siglo XXI, Madrid: Editorial Debate, 2018.

D. &. Deitel, Programación orientada a objetos, Nueva York: Independent Press, 2017.

F. M. Tamayo, Fundamentos de lógica de programación, Madrid: Editorial Académica Española, 2012.

O. Trejos, Lógica de programación, Bogotá: Ediciones de la U, 2017.

E. Diez, Solución de problemas en teoría de números y geometría, Nueva York: Independently Publisher, 2022.

D. Wells, Prime Numbers: the most Mysterious Figures in Math, Londres: Wiley, 2007.

M. Kline. El pensamiento matemático. De la antigüedad a nuestros días, Madrid: Alianza Editorial, 2012.

C. Boyer, Historia de la matemática, Madrid: Alianza Editorial, 2010.

I. Stewart, Incredibles Numbers, Barcelona: Crítica, 2016.

E. Grothendieck, Matemáticas: funciones, Nueva Zelanda: Electronic Press, 2020.

K. Dorling, The Math Book (Big Ideas), Londres: DK, 2019.

C. Boguslaw, Introduction to programming with C++, Nueva York: Wiley IEEE Press, 2019.

P. Van Roy, Functional Programming: Tecniques, Models and Theory, Boston: MIT Press, 2016.

O. Trejos, Programación funcional con Racket, Madrid: RaMa, 2019.

L. Peña, Introducción a la programación funcional, Nueva York: Kindle Press, 2021.

C. Cobo y J. Moravec, Aprendizaje invisible: hacia una nueva ecología de la educación, Barcelona: Publicacions i Edicions Universitat de Barcelona, 2011.

G. Siemens, Knowing Knowledges, Morrisville (NC): Lulu.com, 2006.

J. Wing, Computational Thinking, Boston: Oreilly Publishing, 2017.

How to Cite
Trejos Buriticá, O. I., & Muñoz Guerrero, L. E. (2022). Two algorithms to find twin prime numbers in a specified range using functional programming. Ciencia E Ingenieria Neogranadina, 32(2), 131–144. https://doi.org/10.18359/rcin.6252
Published
2022-12-26
Section
ARTICLES