[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 1.26 MB, 1280x544, indiana.jones.and.the.raiders.of.the.lost.ark.1981.720.bluray.x264-nezu.mkv_snapshot_00.07.34_[2015.09.01_02.37.09].png [View same] [iqdb] [saucenao] [google]
8502632 No.8502632 [Reply] [Original]

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

>> No.8502637

there are multiple ones yeah

>> No.8502642

>>8502637
example?

>> No.8502644

>>8502642
https://en.wikipedia.org/wiki/Generating_primes

>> No.8502649

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

>> No.8502659

>>8502644
I got it now,im bad at english.

>> No.8502818

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

>> No.8502825

>>8502632
f(x) = x

Guaranteed to generate all primes.

>> No.8502831

>>8502825
Brilliant.

>> No.8502980

>>8502818
i can do it

>> No.8502999

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

>> No.8503003

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

>> No.8503008

>>8503003
>as if that has never been thought of before

retard

>> No.8503016
File: 191 KB, 470x595, Why+are+you+naked+_09c7755af593d9197d8b32e3a50ccf6f.jpg [View same] [iqdb] [saucenao] [google]
8503016

>>8503008
But my algorithm is very clever.

>> No.8503059

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

>> No.8503069

>>8502632
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?!

>> No.8503088

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

>> No.8503098

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

>> No.8503113

https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

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

>> No.8503135

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

>> No.8503142

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

>> No.8503152

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

>> No.8503154

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

>> No.8503204
File: 3.44 MB, 470x285, smells_fishy.gif [View same] [iqdb] [saucenao] [google]
8503204

ITT: Liers