Towards an artificial intelligence-based agent for characterising the organisation of primes - Oyetunji, Nicole Armlade (Rhodes University, Faculty of Science, Department of Mathematics)
Machine learning has experienced significant growth in recent decades, driven by advancements in computational power and data storage. One of the applications of machine learning is in the field of number theory. Prime numbers hold significant importance in mathematics and its applications, for example in cryptography, owing to their distinct properties. Therefore, it is crucial to efficiently obtain the complete list of primes below a given threshold, with low relatively computational cost. This study extensively explores a deterministic scheme, proposed by Hawing and Okouma (2016), that is centered around Consecutive Composite Odd Numbers, showing the link between these numbers and prime numbers by examining their internal structure. The main objective of this dissertation is to develop two main artificial intelligence agents capable of learning and recognizing patterns within a list of consecutive composite odd numbers. To achieve this, the mathematical foundations of the deterministic scheme are used to generate a dataset of consecutive composite odd numbers. This dataset is further transformed into a dataset of differences to simplify the prediction problem. A literature review is conducted which encompasses research from the domains of machine learning and deep learning. Two main machine learning algorithms are implemented along with their variations, Long Short-Term Memory Networks and Error Correction Neural Networks. These models are trained independently on two separate but related datasets, the dataset of consecutive composite odd numbers and the dataset of differences between those numbers. The evaluation of these models includes relevant metrics, for example, Root Mean Square Error, Mean Absolute Percentage Error, Theil U coefficient, and Directional Accuracy. Through a comparative analysis, the study identifies the top-performing 3 models, with a particular emphasis on accuracy and computational efficiency. The results indicate that the LSTM model, when trained on difference data and coupled with exponential smoothing, displays superior performance as the most accurate model overall. It achieves a RMSE of 0.08, which significantly outperforms the dataset's standard deviation of 0.42. This model exceeds the performance of basic estimator models, implying that a data-driven approach utilizing machine learning techniques can provide valuable insights in the field of number theory. The second best model, the ECNN trained on difference data combined with exponential smoothing, achieves an RMSE of 0.28. However, it is worth mentioning that this model is the most computationally efficient, being 32 times faster than the LSTM model.
Keywords: Numbers, Prime; Odd number; Machine learning; Deep learning (Machine learning); Mathematical forecasting; Neural networks (Computer science); Artificial intelligence