Is there a function to generate all primes or did i just find it?

Is there a function to generate all primes or did i just find it?

Other urls found in this thread:

en.wikipedia.org/wiki/Generating_primes
eff.org/awards/coop
en.wikipedia.org/wiki/Sieve_of_Eratosthenes
twitter.com/SFWRedditImages

there are multiple ones yeah

example?

en.wikipedia.org/wiki/Generating_primes

I mean to find all primes,not the biggest one or some of them.

I got it now,im bad at english.

If you discover a prime with at least a billion digits, EFF has a $250,000.00 USD bounty on it.
eff.org/awards/coop

f(x) = x

Guaranteed to generate all primes.

Brilliant.

i can do it

I'm flabbergasted nobody claimed the price yet.
I'm going to buy a new PC for Christmas and my dad showed me how to use Matlab.
I will write a script that checks whether a number is divisible by the primes smaller than it.
Hopefully I will get something out of this.

>I will write a script that checks whether a number is divisible by the primes smaller than it.
I wanted to add that I already wrote the algorithm on paper but I still have to implement it.

>as if that has never been thought of before

retard

But my algorithm is very clever.

>write a script that checks whether a number is divisible by the primes smaller than it.
Fucking genius.

Three possibilities here:

1. You're a complete moron and you're lying to increase your e-peen (10% Chance)

2. You're a brainlet who thinks they've found a function that only produces prime numbers, but falls apart after about a few tens or hundreds of primes (89.999999999% Chance)

3. You've genuinely found a function that will produce prime numbers to infinity and you've posted it on an anonymous nipponese imageboard. (0.000000001% Chance)


Oh boy! I wonder which category you fall under?!

Let [math]f: \mathbb{N} \to \mathbb{N}[/math] be the unique function such that [math]f(n)[/math] is the nth prime number.

There you go, OP.

N is just to big for this to work. You'd take years

en.wikipedia.org/wiki/Sieve_of_Eratosthenes

For well over two thousand years, yes. The trouble is getting a computationally easy algorithm.

Yes there are many, but they are not easy to express.

OP here.It doesn't work after a while.I guess i fucked up.

Or maybe you just have a virus designed to undermine your confidence by randomly changing what code is executed ;)

Yep, and it lets you win when you start making the "right" decisions ;)

ITT: Liers