Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8897869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:27:41+00:00 2026-06-15T00:27:41+00:00

I am looking for an algorithm that would make it possible to prove any

  • 0

I am looking for an algorithm that would make it possible to prove any large number for primality. By large number, I mean numbers with at least 100,000,000 decimal digits in them and which cannot be expressed with simple formulas like Mersenne primes, etc.

Here are my requirements:

1- it must be completely correct

2- it must be runnable on a basic home computer

3- It must complete it’s course within a few weeks or months.

My memory limitation is 8 GB of ram (I can set my options on how much cache is available) on a dedicated machine with a 1tb hard drive. I will be considering numbers one at a time over the course of several months.

Edit1: I am well aware of the fact that this is a difficult arena to compete in, if not nearly impossible using current methods. I’m not using current methods, and I need a way of proving my methods correct for very large numbers.

Edit2: Part of the reason why I need a non-probabilistic method is because this will be an attempt at an EFF award, and, succeeding there, at a second EFF award. If my methods are correct (and that’s one honking IF), I should be able to do all that with my notebook PC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:27:43+00:00Added an answer on June 15, 2026 at 12:27 am

    From what I understand, you are looking for a algorithm which is:

    • deterministic
    • fairly fast
    • with a fairly reasonable memory footprint

    I’m not sure about the last part, since I never tried to implement it (yet), but I know that the primality problem was solved for general numbers. In other words, you can determine if a number is prime or not, with 100% certainty, regardless of the form. You should take a look at the AKS primality test which is the first known algorithm that solves this problem.

    Like you said, it may take a while to run, but it will eventually finish with a certain answer. The complexity of the optimized version is O((log n)^7.5 (log n is proportional with the number of digits of n).

    However, since this runtime is pretty large and you want to test for a lot of numbers, you should consider filtering such numbers with a faster, non-deterministic algorithm first. In other words, I would try to run the Miller-Rabin test for a few numbers (a=2,3,5,7,… – the first ten primes should be enough, but even if you really want a better accuracy, you probably shouldn’t go beyond 50 primes). The probability that the tested number is a false-prime after k Miller-Rabin tests is less than 1/4^k if I remember correctly. In other words, you can run a small number of tests (not to mention these tests are very fast) and be very confident if the number is prime (if any of these tests fail, the number is definitely NOT prime). After all the MR tests pass, run the AKS algorithm on the tested number just to make sure (as you can see on the MR wikipedia page, the smallest false positive after doing even a few tests increases at a very fast rate).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a sound algorithm that would randomly place a given number
I'm looking at boost::lambda as a way to to make a generic algorithm that
I'm looking for an algorithm that can check if nested regex repeats are reducible.
I am looking for a algorithm that takes a string and splits it into
I am looking for an algorithm that could find the two most distant elements
I'm looking for an algorithm that given two permutations of a sequence (e.g. [2,
I'm looking for an efficient algorithm that for a space with known height, width
I have a relatively simple algorithm that walks an std::vector looking for two neighbouring
I'm looking for an algorithm to compute pow() that's tail-recursive and uses memoization to
Possible Duplicate: A simple algorithm for polygon intersection I'm looking for an outline on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.