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, ... .

C - determine if a number is prime

I am trying to come up with a method that takes an integer and returns a boolean to say if …

c# c primes
Why are primes important in cryptography?

One thing that always strikes me as a non-cryptographer: Why is it so important to use Prime numbers? What makes …

cryptography primes
How to find prime numbers between 0 - 100?

In Javascript how would i find prime numbers between 0 - 100? i have thought about it, and i am not sure …

javascript math primes
Why do we check up to the square root of a prime number to determine if it is prime?

To test whether a number is prime or not, why do we have to test whether it is divisible only …

algorithm primes primality-test
Simple prime number generator in Python

Could someone please tell me what I'm doing wrong with this code? It is just printing 'count' anyway. I just …

python primes
Program to find prime numbers

I want to find the prime number between 0 and a long variable but I am not able to get any …

c# .net primes sieve-of-eratosthenes
Sieve of Eratosthenes - Finding Primes Python

Just to clarify, this is not a homework problem :) I wanted to find primes for a math application I am …

python math primes sieve-of-eratosthenes
Calculating and printing the nth prime number

I am trying to calculate prime numbers, which I've already done. But I want to calculate and print ONLY the …

java primes
Very simple prime number test - I think I'm not understanding the for loop

I am practicing past exam papers for a basic java exam, and I am finding it difficult to make a …

java loops for-loop iterator primes
How does this prime number test in Java work?

The code snippet below checks whether a given number is a prime number. Can someone explain to me why this …

java primes number-theory