IDEAS home Printed from https://ideas.repec.org/a/hin/jjmath/7034529.html
   My bibliography  Save this article

A Simple Algorithm for Prime Factorization and Primality Testing

Author

Listed:
  • Kabenge Hamiss
  • Niansheng Tang

Abstract

We propose a new simple and faster algorithm to factor numbers based on the nature of the prime numbers contained in such composite numbers. It is well known that every composite number has a unique representation as a product of prime numbers. In this study, we focus mainly on composite numbers that contain a product of prime numbers that are greater than or equal to 5 which are of the form 6k+1 or 6k+5. Therefore, we use the condition that every prime or composite P of primes greater than or equal to 5 satisfies P2≡1 mod24. This algorithm is very fast especially when the difference in the prime components of a composite number (prime gap) is not so large. When the difference between the factors (prime gap) is not so large, it often requires just a single iteration to obtain the factors.

Suggested Citation

  • Kabenge Hamiss & Niansheng Tang, 2022. "A Simple Algorithm for Prime Factorization and Primality Testing," Journal of Mathematics, Hindawi, vol. 2022, pages 1-10, December.
  • Handle: RePEc:hin:jjmath:7034529
    DOI: 10.1155/2022/7034529
    as

    Download full text from publisher

    File URL: http://downloads.hindawi.com/journals/jmath/2022/7034529.pdf
    Download Restriction: no

    File URL: http://downloads.hindawi.com/journals/jmath/2022/7034529.xml
    Download Restriction: no

    File URL: https://libkey.io/10.1155/2022/7034529?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:hin:jjmath:7034529. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Mohamed Abdelhakeem (email available below). General contact details of provider: https://www.hindawi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.