scieee AI-readable full text Open interactive document viewer

An Innovative Approach to Find Remainder

Prof. Anil Kumar Sharma

Abstract

Abstract: Let r be the remainder when x! is divided by p, (x, p) ∈ N, x < p. Then the value of r is given by the minimum value of k for which (−1) (m-1) (m-1)! k + 1 = 0(mod p), where m = p − x, k ∈ N.

Full text

Indian Journal of Advanced Mathematics (IJAM) ISSN: 2582-8932 (Online), Volume-5 Issue-2, October 2025 6 Retrieval Number:100.1/ijam.B120505021025 DOI: 10.54105/ijam.B1205.05021025 Journal Website: www.ijam.latticescipub.com Published By: Lattice Science Publication (LSP) © Copyright: All rights reserved. An Innovative Approach to Find Remainder Anil Kumar Sharma Abstract: Let r be the remainder when x! is divided by p, (x, p) ∈ N, x < p. Then the value of r is given by the minimum value of k for which (−1) (m-1) (m-1)! k + 1 = 0(mod p), where m = p − x, k ∈ N. Index Terms: Remainder, Number Theorem, Factorial Remainder, Remainder using Wilson’s Theorem I. INTRODUCTION Theorem: [Wilson] According to Wilson’s theorem [1] (p-1)! + 1 = 0 (mod p), p is prime, i.e., when (p-1)! +1 is divided by p, the remainder is 0 [2] or (p -1)! + 1 = 0(mod p), or (p – 1)! = -1 (mod p) ………………………………… (A) Instead of (p-1)! If we have x! where x< p and x ∈ N, then how do we obtain the remainder? There are complicated modulo methods by which we can ultimately obtain the remainder, but in this paper, I present an innovative technique and theorem to calculate the remainder straightforwardly. PURPOSE: The primary objective of my work is to develop a concise formula for finding the remainder in a simplified manner. II. METHODOLOGY Theorem: Let r be the remainder when x! is divided by p, (x, p) ∈ N, x < p. Then the value of r is given by the minimum value of k for which (−1) (m-1) (m-1)! k + 1 = 0(mod p), where m = p − x, k ∈ N. Proof: According to Wilson’s theorem [1]: for any prime p, (p – 1)! + 1 is divisible by p, or (p -1)! + 1 = 0(mod p), or (p – 1)! = -1 (mod p) [2] Now the question is, in place of (p-1)! if we are given (p2)! or in general (p-m)! m< =p, then how to get r, from x! = r (mod p) where x = (p-m) Let x=(p-2), we can write, (p-2)! = k (mod p) or (p-2)! (p-1) = k(p-1) (mod p) or (p-1)! = (-1) k (mod p) Or (p-1)! +1= [ (-1) k+1] (mod p), [by (A)], [ (-1) k+1] =0 (mod p) and k is the minimum value for which [ (-1) k+1] is divisible by p. If x = (p-3)! then we have to find k for which (p-3)! = k (mod p) Manuscript received on 03 July 2025 | First Revised Manuscript received on 27 June 2025 | Second Revised Manuscript received on 17 September 2025 | Manuscript Accepted on 15 October 2025 | Manuscript published on 30 October 2025. *Correspondence Author(s) Prof. Anil Kumar Sharma*, Department of Engineering Science, Academy of Technology, Adisaptagram, Hooghly, India. Email ID: [email protected],[email protected] ORCID ID: 0000-0003-28264983 © The Authors. Published by Lattice Science Publication (LSP). This is an open access article under the CC-BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/) or (p-3)! (p-2) (p-1) = k(p-1) (p-2) (mod p) or (p-1)! = (-1) (-2) k (mod p) = [(-1)2 2! k + 1] (mod p) and by (A) [(-1)2 2! k] should be divisible for minimum value of k. Thus, if x =(p-m), we can write (p-m)! = k (mod p) or, (p-m)! (p-m+1) (p -m+2).……. (p -2) (p -1) = [(-1) (-2) (- 3) …………. {-(m-1)] k (mod p) By (A), [(-1) (-2) (-3) …………. {-(m-1)] k + 1 is divisible by p. The remainder r is given by the minimum value of k for which [(-1) (-2) (-3) …………. {-(m-1)} k+1] is divisible by p. In other words, the remainder is given by the minimum value of k for which [(-1) (m-1) (m-1)! k + 1] =0(mod p) III. VALIDATION OF THE THEOREM Example 1. Remainder when 4! is divided by 7, or 4! = r (mod 7). Remainder r is given by the minimum value of k, k ∈ N, for which (-1) (-2) k+1 is divisible by 7, and the minimum such value of k is 3. Hence, the remainder is 3. Example 2. Remainder when 9! is divided by 13, or 9! = r (mod 13). Remainder r is given by the minimum value of k, k ∈ N, for which (-1) (-2) (-3) k+1 is divisible by 13, and the minimum such value of k is 11. Hence, the remainder is 11. Example 3: 12! = r (mod 17), then to find r, we have to calculate the minimum value of k for which (-1)4 4! k + 1 is divisible by 17 Or 24k+1 is divisible by 17. Or 7k+1 is divisible by 17. The minimum value of k is 12. So, the remainder is k=12. Verification of result: 12! = 479001600/17 = 12. Example 4: 97! = r! (mod 101). Then, to find r, we have to calculate the minimum value of k for which (- 1) ^33! k + 1 is divisible by 101 Or -6k+1 is divisible by 101. So, the remainder is k=17. IV. CONCLUSION AND FUTURE WORK In this paper, I have presented an innovative and efficient approach to determine the remainder when the factorial of a positive integer n! is divided by a prime number p. The proposed method simplifies the computational complexity associated with large factorials, especially for cases where direct computation is infeasible due to factorial growth. By leveraging properties of modular arithmetic, Wilson's Theorem, and pattern recognition in modular sequences, this approach enhances the accuracy and efficiency of remainder calculation, which has significant applications in number theory, cryptography, and competitive mathematics. While the current method demonstrates promising results, several avenues for An Innovative Approach to Find Remainder 7 Retrieval Number:100.1/ijam.B120505021025 DOI: 10.54105/ijam.B1205.05021025 Journal Website: www.ijam.latticescipub.com Published By: Lattice Science Publication (LSP) © Copyright: All rights reserved. future exploration remain. I plan to generalize the approach to handle composite moduli, extending its utility beyond prime divisors. Additionally, incorporating optimization techniques for tremendous n values can make this method applicable to high-performance computing and cryptographic algorithms. Future work may also focus on developing closed-form expressions or recurrence relations for specific classes of problems, as well as integrating this method with machine learning models to predict modular patterns. Further research into the algebraic structure and periodicity of factorial remainders, along with computational experiments, will contribute to strengthening the theoretical foundation of this approach and expanding its practical applications. Originality: The formula I have developed is unique in its domain of calculation, as indicated by my literature survey and Turnitin Check. DECLARATION STATEMENT I must verify the accuracy of the following information as the article's author. ▪ Conflicts of Interest/ Competing Interests: Based on my understanding, this article has no conflicts of interest. ▪ Funding Support: This article has not been funded by any organizations or agencies. This independence ensures that the research is conducted with objectivity and without any external influence. ▪ Ethical Approval and Consent to Participate: The content of this article does not necessitate ethical approval or consent to participate with supporting documentation. ▪ Data Access Statement and Material Availability: The adequate resources of this article are publicly accessible. ▪ Author’s Contributions: The authorship of this article is contributed solely by the author. REFERENCES 1. P.N. Seetharaman. (2024). In Search of an Elementary Proof for Fermat’s Last Theorem. Indian Journal of Advanced Mathematics, 4(1), 35–39. DOI: https://doi.org/10.54105/ijam.a1190.04010424 2. Bashir, S. (2023). Pedagogy of Mathematics. International Journal of Basic Sciences and Applied Computing, 10(2), 1–8. DOI: https://doi.org/10.35940/ijbsac.b1159.1010223 AUTHOR’S PROFILE Prof. Anil Kumar Sharma is a distinguished faculty member of Mathematics at the Academy of Technology under MAKAUT, WB, in the Department of Engineering Sciences & Humanities. With 14 years of dedicated service, he brings vast teaching and administrative experience. He holds dual M.Sc. degrees — one in Mathematics and another in Statistics — as well as an MBA from the University of Calcutta. His interdisciplinary expertise enriches engineering curricula, fostering analytical thinking and quantitative rigour. His research area includes innovative mathematical formulation, machine learning and number theory. Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of the Lattice Science Publication (LSP)/ journal and/ or the editor(s). The Lattice Science Publication (LSP)/ journal and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.