primes
Why is my implementation of Atkin sieve is slower than Eratosthenes? [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.[详细]
2023-03-16 18:18 分类:问答What's the problem of my prime test code?
I implemented the Miller-Rabin prime test algorithm found on wikipedia with Python 3. It seems to be working correctly with most numbers but occasionaly fail on certain numbers.[详细]
2023-03-15 16:07 分类:问答no EmptyL in data.sequence?
I\'m currently trying to solve problem 7 on project euler with ideon. I\'m implementing a prime numbers generator. Here is what I have:[详细]
2023-03-14 08:09 分类:问答How to call the lazy-seq made so far within construction of a lazy-seq?
For my prime numbers lazy seq, I am checking to see if an index value is divisible by all the p开发者_StackOverflowrimes below that current index (prime?). The problem is, when I call primes within it[详细]
2023-03-12 20:48 分类:问答Where can I find a large list of primes for an array literal?
I need a way to store and very efficiently retrieve the first 3512 primes in C#.As far as I know I would use an int array.[详细]
2023-03-12 12:38 分类:问答Explaining this primes generator function, i cannot understand [python]
def primes(n): if n==2: return [2] elif n<2: return [] s=range(3,n+1,2) mroot = n ** 0.5 half=(n+1)/2-1[详细]
2023-03-11 08:46 分类:问答Program to factorize a number into two smaller prime numbers
I have a very big number, and I want to make a program, that finds two prime numbers, that will give the original number, if multiplied.[详细]
2023-03-10 13:35 分类:问答Haskell list comprehension for finding primes
I\'m trying to find all the primes less than some integer n as concisely as possible, using list comprehensions. I\'m learning Haskell, and this is just an exercise. I\'d like to write something like:[详细]
2023-03-07 18:36 分类:问答How to solve this memory error - python
I have the following code def gen_primes(): D = {} q = 2 while True: if q not in D: yield q D[q * q] = [q] else:[详细]
2023-03-06 15:11 分类:问答-
Prime Factors In C#
I want to c开发者_如何学运维reate a program in C# 2005 which calculates prime factors of a given input. i want to use the basic and simplest things, no need to create a method for it nor array things[详细]
2023-03-02 05:04 分类:问答