Enhancing Prime Number Classification Using Neural Network Techniques with a Focus on Recall Efficiency and Fast Convergence
Author(s): 1. D P Singh, 2. Sudesh Kumar Garg
Authors Affiliations:
- Professor, Mathematics, Amity University Uttar Pradesh, Greater Noida Campus, India
- Professor, Mathematics, G.L.Bajaj Institute of Technology & Management, Greater Noida, India
The classification of prime numbers is fundamental to fields such as computational mathematics, cryptography, and theoretical computer science. This research evaluates the effectiveness of seven neural network models Feedforward Neural Network (FNN), Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Radial Basis Function Network (RBFN), Graph Neural Network (GNN), Spiking Neural Network (SNN), and Self-Organizing Map (SOM) in accurately identifying prime numbers across seven different numerical intervals: 2–199, 2–509, 2–1013, 2–11111, 2–10⁵, 2–10⁶, and 2–10⁹.
The main goal is to optimize recall performance while achieving fast convergence during the training process. Each neural model was assessed using key metrics, including Accuracy, Recall, F1-Score, Average Epochs to Convergence, and Average Time per Epoch (in seconds). The findings indicate that deep learning model especially CNNs demonstrated the most consistent classification accuracy, reaching up to 88.7% accuracy and 83.9% recall in the 2–199 range, although they require longer training times. FNNs achieve faster convergence and consistent results on smaller datasets but tend to show reduced recall with larger datasets. GNNs perform well within limited numerical ranges but incurred higher computational costs. Models inspired by biological systems, such as SNN and SOM, show effective performance in smaller numerical intervals.
This in-depth evaluation sheds light on the strengths of different neural network approaches for classifying number-theoretic data and supports the broader use of machine learning in solving mathematical problems.
D P Singh, Sudesh Kumar Garg (2025); Enhancing Prime Number Classification Using Neural Network Techniques with a Focus on Recall Efficiency and Fast Convergence, International Journal for Innovative Research in Multidisciplinary Field, ISSN(O): 2455-0620, Vol-11, Issue-6, Pp.7-16. Available on – https://www.ijirmf.com/
[1] Rivest, R. L., Shamir, A., & Adleman, L. (1978). A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Communications of the ACM, 21(2), 120–126. https://doi.org/10.1145/359340.359342
[2] Broomhead, D. S., & Lowe, D. (1988). Multivariable functional interpolation and adaptive networks. Complex Systems, 2(3), 321–355.
[3] Hornik, K., Stinchcombe, M., & White, H. (1989). Multilayer feedforward networks are universal approximators. Neural Networks, 2(5), 359–366.
[4] Kohonen, T. (1990). The self-organizing map. Proceedings of the IEEE, 78(9), 1464–1480.
[5] Park, J., & Sandberg, I. W. (1991). Universal approximation using radial-basis-function networks. Neural Computation, 3(2), 246–257.
[6] Koblitz, N. (1994). A Course in Number Theory and Cryptography. Springer.
[7] Ribenboim, P. (1996). The New Book of Prime Number Records. Springer.
[8] Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
[9] Maass, W. (1997). Networks of spiking neurons: The third generation of neural network models. Neural Networks, 10(9), 1659–1671.
[10] Crandall, R., & Pomerance, C. (2005). Prime Numbers: A Computational Perspective. Springer Science & Business Media.
[11] Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). ImageNet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, 25.
[12] Graves, A., Mohamed, A. R., & Hinton, G. (2013). Speech recognition with deep recurrent neural networks. IEEE ICASSP, 6645–6649.
[13] LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444.
[14] Zhang, X., Zhao, J., & LeCun, Y. (2015). Character-level Convolutional Networks for Text Classification. Advances in Neural Information Processing Systems, 28, 649–657.
[15] Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. https://www.deeplearningbook.org
[16] Sondhi, R., & Singh, D. (2018). Machine Learning Approaches to Prime Number Detection. Advances in Mathematical Sciences, 9(1), 15–24.
[17] Tavanaei, A., Ghodrati, M., Kheradpisheh, S. R., Masquelier, T., & Maida, A. (2019). Deep learning in spiking neural networks. Neural Networks, 111, 47–63
[18] Aggarwal, A., Sharma, M., & Singh, A. (2020). Classification of Prime Numbers using Machine Learning Algorithms. Journal of Mathematical Computation, 8(2), 45–52.
[19] King, D., Jin, H., Smith, A., & Lin, Y. (2020). Applications of Deep Learning in Mathematical Pattern Detection: A Case Study on Prime Numbers. Journal of Mathematical Analysis and Applications, 489(1), 124181. https://doi.org/10.1016/j.jmaa.2020.124181
[20] Zhou, J., Cui, G., Zhang, Z., Yang, C., Liu, Z., Wang, L., & Sun, M. (2020). Graph neural networks: A review of methods and applications. AI Open, 1, 57–81.
[21] Sharma, D., Kumar, R., & Singh, N. (2021). Neural Network Techniques for Prime Prediction. International Journal of Advanced Research in Computer Science, 12(4), 25–31.
[22] Wang, L., Zhou, H., Zhang, Y., & Li, Y. (2022). Hybrid deep learning models for classification: CNN-RNN, CNN-GRU and CNN-LSTM. Journal of Supercomputing, 78, 11213–11235.
[23] Singh, D. P.,Jassi J.S., Sunaina, 2023. Exploring the Significance of Statistics in the Research: A Comprehensive Overview, European Chemical Bulletin 12(Special Issue 2):2089-2102
[24] Singh, D. P. (2024), An extensive examination of machine learning methods for identifying diabetes. Tuijin Jishu/Journal of Propulsion Technology, 45(2).
[25] Singh, D. P. (2024), An extensive analysis of machine learning models to predict breast cancer recurrence. Tuijin Jishu/Journal of Propulsion Technology, 45(2).
[26] Singh, D. P. (2024), An extensive analysis of machine learning techniques for predicting the onset of lung cancer. Tuijin Jishu/Journal of Propulsion Technology, 45(4).
[27] Singh, D. P. (2024), Comprehensive analysis of machine learning models for cardiovascular disease detection and diagnosis. Tuijin Jishu/Journal of Propulsion Technology, 45(4).
[28] Singh, D. P. (2025), Exploring Machine Learning-Driven Advanced Regression Models For Predicting Prime Number Distributions, IJCRT | Volume 13, Issue 4 , ISSN: 2320-2882,page:b229-b239.

