32 questions linked to/from List of primes under a million
311 views

### Shortest test for primality for byte [duplicate]

Write a function which gets as input a number (0 <= n <= 255) stored in 32-bit variable and returns non-zero integer if n ...
55k views

### Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
3k views

### Prime counting function

Introduction The Prime Counting Function, also known as the Pi function $\pi(x)$, returns the amount of primes less than or equal to x. Challenge Your program will take an integer x which you can ...
5k views

3k views

### Looks prime to me!

Figuring out whether a given number is prime, while not very complicated, is kind of hard. But making a guess doesn't need to be. Seeing whether a number is a multiple of 2 or 5 is easy - you can just ...
2k views

### Smallest n-digit prime containing only these digits

You will need to generate the smallest prime with n digits, and it will only contain digits specified in the list k. Examples: ...
40k views

### List of first n prime numbers most efficiently and in shortest code [closed]

Rules are simple: First n primes (not primes below n), should be printed to standard output separated by newlines (primes should be generated within the code) primes cannot be generated by an inbuilt ...
4k views

### Kolmogorov-mania

The Kolmogorov complexity of a string s is defined as the length of the shortest program P that outputs s. If the length of P is shorter than the length of s, then s is said to be compressible, ...
3k views