Top "Primes" questions

Primes or prime numbers are integers greater than 1 which are divisible only by themselves and 1, i.e.: 2, 3, 5, 7, 11, ... .

Printing prime numbers from 1 through 100

This c++ code prints out the following prime numbers: 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97. But I don't think that's the way my book wants it …

c++ c algorithm primes
Which is the fastest algorithm to find prime numbers?

Which is the fastest algorithm to find out prime numbers using C++? I have used sieve's algorithm but I still …

c++ algorithm primes
How to create the most compact mapping n → isprime(n) up to a limit N?

Naturally, for bool isprime(number) there would be a data structure I could query. I define the best algorithm, to …

algorithm math data-structures primes
Python Prime number checker

I have been trying to write a program that will take an inputed number, and check and see if it …

python primes
Check if number is prime number

I would just like to ask if this is a correct way of checking if number is prime or not? …

c# primes primality-test
Python Finding Prime Factors

Two part question: 1) Trying to determine the largest prime factor of 600851475143, I found this program online that seems to work. …

python primes
Checking if a number is a prime number in Python

I have written the following code, which should check if the entered number is a prime number or not, but …

python primes
Fastest way to list all primes below N

This is the best algorithm I could come up. def get_primes(n): numbers = set(range(n, 1, -1)) primes = [] while …

python math optimization primes
isPrime Function for Python Language

So I was able to solve this problem with a little bit of help from the internet and this is …

python primes
Print series of prime numbers in python

I was having issues in printing a series of prime numbers from one to hundred. I can't figure our what's …

python primes series