primes
Primality test for numbers of form 10^n + k
I have some numbers of form 10N + K, where N is about 1000, and K is really small (lower than 500). I want to test these numbers for primality. Currently I\'m using Fermat\'s test by base 2, preceded[详细]
2023-04-13 06:15 分类:问答Find the sum of all the primes below two million [duplicate]
This question already has answers here: Closed 10 years ago. Possible Duplicate: How much time should it take to find the sum of all prime numbers less than 2 million?[详细]
2023-04-12 14:37 分类:问答How to find nth prime with complexity o(1)
How to find nth prime num开发者_如何转开发ber with complexity o(1)The only way to do this in O(1) would be an array of all prime numbers.So, you\'d only be able to support a certain number depending o[详细]
2023-04-12 13:57 分类:问答Where is the access violation is my code?
I\'m getting an Access Violation whe开发者_如何学运维n attempting to run this code which finds prime numbers in a bound.[详细]
2023-04-09 13:52 分类:问答Testing whether an ordered infinite stream contains a value
I have an infinite Stream of primes primeStream (starting at 2 and increasing). I also have another stream of Ints s which increase in magnitude and I want to test whether each of these is prime.[详细]
2023-04-08 21:39 分类:问答Dynamic Sieve Algorithms for Prime Generation
I\'m implementing开发者_如何转开发 the Sieve of Eratosthenes, for an explanation of this see http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes. However I would like to adapt it to generate M primes,[详细]
2023-04-08 18:19 分类:问答Can binarysearch be used for checking primality?
I wonder if binary search can be used to check whethe开发者_开发百科r a number is prime , Since the real question is can I find a number which is divisble other than the number itself and 1, and there[详细]
2023-04-08 17:03 分类:问答Parallel Reduction in CUDA for calculating primes
I have a code to calculate primes which I have parallelized using OpenMP: #pragma omp parallel for private(i,j) reduction(+:pcount) schedule(dynamic)[详细]
2023-04-07 19:56 分类:问答Primes in PHP, elliptic curve
how i can calculate receiving a number K, K return the next prime 开发者_如何学JAVAnumber greater than 2 ^ 57 + 1 ? some 1 can help me with that ? If you need prime tester, you can download it here.[详细]
2023-04-06 19:05 分类:问答Prime numbers c# [closed]
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari[详细]
2023-04-06 16:48 分类:问答