I have to set all the indexes in an array equal to 1. Then I have to find which indexes are not prime and set them equal to 0. Then print out all the indexes of the array that are equal to 1(prime).
...

So my boss has a special fondness for defining all CSS and HTML properties with prime numbers. I was asked to design a modal pop-up box for whatever reason, and this box will have elements appear and ...

I'm currently taking a university course on parallel programming, and our recent assignment was to create a parallel program that would find the largest gap between prime numbers in a given range. The ...

I'm trying to make a program to compute all primes smaller than a given number, and the natural logarithm of the product of all those primes. So because we're working with logarithms I could also just ...

I've been working through the problems on project euler and instead of using bruteforce, I wanted to complete the problems with a quality solution. I built this to find prime numbers, and have been ...

I'm trying to write a method that will calculate if two numbers are relatively prime for an assignment. I'm primarily looking for answers on where to start. I know there is a method gcd() that will do ...

Is it a matter of cutting out iterations to check if a number is a prime?
ex. 37 is a prime, and checking up to 18.5 (half of 37) versus 6.08(square root) cuts out a lot of the work, but both follow ...

Does anyone happen to know of a C# Sieve of Atkin algorithm using BigInteger? From my understanding, this is the best known prime factorization algorithm currently in existence.
I currently have this ...

I keep getting SIGABRT error on the submission page. Please tell me what exactly this error is and how to resolve this error in the context of this problem.
Note: I have tried using vectors instead ...

I am stuck on Project Euler question 60. I know it is advised not too ask questions or find answers online about it, but otherwise I cannot find the motivation to continue. So I hope to find some help ...

I'm writing a method that keeps returning a value early. I know how to write in a different way, but I would like to understand why writing it this way keeps returning the wrong value. I'm trying to ...

I have a factor finder that I have programmed that is supposed to start by checking if the value entered in the input box is 1 or 0 so it would display "The factor of 1 is 1." or "The factor of 0 is ...

I wrote this python code to find any prime number, the 1st, 2nd, 1000th, etc. I ran the code and it returned this, no matter what integer I entered:
2 is the 1 prime
3 is the 2 prime
5 is the 3 prime
...

I've been playing around with the code challenges on projecteuler.net. A few of them involve prime numbers, so I've created a function to find them based on the sieve of Eratosthenes.
It works fine, ...

A coach is trying to construct a dodge ball team. Each player is assigned a student ID, and if one player's ID divides by other player's ID, they fight. So the couch wants to make a team so that no ...

I intend to find the largest prime factor of a number n in Javascript. However, i think this code is to slow or could be sortened, but i dont see how.
The point would be to display the last element of ...

I'm working on a program which will found the nth. prime number. For example, By listing the first six prime numbers: 2, 3, 5, 7, 11 and 13, we can see that the 6th prime is 13. I'm trying to making ...

Hi sorry for my bad english, i have a question guys, i'm learning objective c and i'm learning booleans right now, my question is: why when running the second loop in the code, the number 2 is taken ...

I am trying to make a program in which a number is taken as input and the program displays the smallest number bigger than the input which is both prime and palindrome. But this program does not give ...

The program (c code) gets a minimum and maximum value from the user to then determine whether all of the numbers in between are prime or not. If the number is not prime, the program must also tell the ...

My code works to give most primes, however it still include 1 and misses some numbers: 23 and 47 (when calculating prime numbers under 100). For some reason it includes 91, any ideas why??
I have been ...