#O(N) Time Complexity Prime Generation

262 messages · Page 1 of 1 (latest)

shy bison
#

“Note every missing value”?

Please elaborate on this step, as I don’t think noting every missing value would lead to a comprehensive list of primes

#

For example, if you enumerated:
2 : 1
3 : 2
5 : 3
7 : 4
11 : 5

and so on in increasing value, and you noted every missing value (4, 6, 8, 9, 10, 12, …)

I don’t think that would result in a comprehensive list of primes?

cerulean leaf
#

I don't think this works

brittle lichen
#

isn't this exactly what SOE does?

outer veldt
brittle lichen
#

bro can you give me your code

outer veldt
#

I believe that the missing step (if there is a missing step) is to then enumerate the multiples of each missing value generated. Anywhere that one of those values is missing among the primes in the missing set, you will know that it must be composite and not one of the primes. All remaining values in the missing set should then be prime. This can be calculated up to N by enumerating 2, 3, 5, 7, and each missing value up to √N if I am not mistaken. @shy bison @cerulean leaf

outer veldt
cerulean leaf
#

could you provide a computation table of maybe a few iterations of it?

brittle lichen
outer veldt
# brittle lichen your programme.

Allow me to iterate upon it and make sure that it is performing correctly. I will not "give" you ownership of my algorithm(s) ("code"/"programme"), but I will let you utilize it/them for the sake of testing. Once I finish interating I will post a code for you to test. What language do you prefer, Python?

outer veldt
outer veldt
cerulean leaf
brittle lichen
#

lmao

#

you can just give me the pseudocode

#

i prefer C

outer veldt
brittle lichen
#

never heard of it

brittle lichen
outer veldt
brittle lichen
brittle lichen
outer veldt
brittle lichen
#

got it

brittle lichen
outer veldt
cerulean leaf
#

and why only 2,3,5,7? there are infinitely many primes

outer veldt
#

Not mad to elaborate @brittle lichen.
This is enumeration @cerulean leaf :
2: 4 6 8 10 12 14 16 18 20 . . .
3: 6 9 12 15 18 21 24 27 30 . . .
5: 10 15 20 25 30 35 40 45 50 . . .
7: 14 21 28 35 42 49 56 63 70 . . .
Now, list them all numerically.
2 3 4 5 6 7 8 9 10 12 14 15 18 20 21 . . .
Note the missing values, and be sure to include the initial condition set {2, 3, 5, 7} among them.
2 3 4 5 6 7 8 9 10 [11] 12 [13] 14 15 16 [17] 18 [19] 20 21 . . .
2 3 5 7 11 13 17 19 . . .
All primes. As should continue indefinitely. But some composites get mixed it, specifically multiples of primes greater than 7. So since we've generated those primes already as missing values, we enumerate multiples of each of missing value to and remove those values from our original missing values set. 121 (11 • 11) is on such example for as to why this step is necessary, although performing a trial division primacy test on each missing value could be more computationally effecient. Although, realistically, it so would not be.

outer veldt
cerulean leaf
#

nono, there is no largest prime, i'll write you a proof

#

To give an example, assume 5 is the largest prime.
we let N=2x3x5 = 30
you can see that 30/2=15, 30/3=10, 30/5=6, N has factors of all primes by definition.
so N+1, 31, is not divisible by 2,3 nor 5. (in this case, all alleged primes), so the only factors it has are 1 and 31,
But that must mean it is prime. However, 31 > 5, meaning it is a larger prime. Thus i have shown here that if a largest prime exists, you can always make a bigger one. So no largest prime exists, thus there are infinitely many primes

#

even if they do get less common

#

This means that to properly account for your "missing values", you'd need the list of all infinite primes

brittle lichen
shy bison
outer willow
#

i already told you that your algorithm was exactly the sieve of eratosthenes bruh did u forget

outer veldt
outer willow
#

this is a train on fire

#

but we know that lim n->infinity p_n+1 - p_n

#

amazingly, chatgpt looks extremely right in the context of this chat

#

ok, i will say pretty much everything chatgpt said is correct, except that lim n->inf p_n+1 - p_n is not infinity, well i was not reading super closely because i was trying to avoid looking at your responses, but i think you should read and really try to understand it rather than just trusting your intuition which happens to be incorrect in this case

#

in particular, you do not understand that an alternating sequence, such as prime, primegap, prime, primegap, that is infinite, has no end, by definition of infinite, and so there is no last prime nor a last prime gap

that's like saying "well either the last integer is even or it's odd" - clearly it's neither, there is no last integer

#

and also arbitrarily large doesn't mean whatever you think it means

outer veldt
outer willow
#

it's good to question facts that don't make sense to you

#

however there is a point at which you enter crackpot land

outer veldt
outer willow
#

are you not convinced by the proof that there are infinitely many primes

outer veldt
outer veldt
outer willow
#

so you don't believe that

  1. infinitely many primes
  2. gaps that get bigger and bigger
    are consistent facts
#

is that right?

outer veldt
outer willow
outer veldt
outer willow
#

you said
"the more consistent expression of my current belief, satan"

outer veldt
outer willow
#

keyword is concise

#

ill just give my counterexample, i don't need to know exactly what you think, i think this will help

#

consider the set of perfect squares, that is, 1,4,9,16,25,36,49,64...
the gaps increase without bound, so we can find arbitrarily large "square gaps"
and yet there are obviously infinitely many square numbers

outer veldt
outer willow
#

alright forget that

outer willow
#

anyway it is irrelevant

outer veldt
outer willow
#

big words don't make you big right

#

what do you disagree with exactly

outer veldt
outer willow
#

either you are arguing that there are finitely many perfect squares, or that the gaps are not arbitrarily large

#

so if your only argument is "but thats impossible there is no element that lacks another in an alternative series that is initially bound leading to a messy contanglation"

#

then you can enjoy your time in crackpot land

#

maybe you'll invent a new field of math

#

who knows

outer veldt
#

Is this still here

#

jesus fuck

#

I was trying to remove my mistake about OoO

deep cloak
#

There is no good justification to stress over rambling psychotic bozos

outer willow
#

i'm not stressing

#

i'm having a fine time and maybe saving some people from psychosis

deep cloak
#

You won’t

outer willow
#

optimism

outer veldt
outer willow
#

it's hopeless

cerulean leaf
#

@outer veldt could you please point out the hole in my proof?

#

It’s quite solid, and has been like that for atleast 300+ years, ofcourse, since you have shook the world of mathematics i would like to know exactly whats wrong about it

outer veldt
cerulean leaf
#

Here it is again,

outer veldt
cerulean leaf
# outer veldt I never said you made a mistake. But my proof refuted yours.

It did not. My proof is a simple proof by contradiction. Your proof assumes that at some point there is an infinite gap between primes, which mind you even if there was, there still wouldn’t be a largest prime, as after this “infinitely large gap”, there would still be infinitely many primes after it. Your assumption doesnt work, because no matter which point you pick on the number line, the gap between the 2 neighbouring primes is NOT infinite, your assumption only holds true after infinitely many primes.

outer veldt
outer veldt
cerulean leaf
#

While the average gap between 2 primes does increase, it only reaches infinity after infinitely many primes, so its a baseless statement that you cant really garner any knowledge from. You especially cannot use this to prove that there are a finite amount of primes, as i have mentioned before. Your statement relies on the fact that infinitely many primes exist

brittle lichen
brittle lichen
#

bro no way someone doesn't believe there's infinitely many primes

cerulean leaf
outer veldt
cerulean leaf
brittle lichen
#

dog lmao

cerulean leaf
brittle lichen
cerulean leaf
#

What you did is build a house on it’s own roof. It has collapsed

outer veldt
cerulean leaf
#

Ok… i saw that… weird.. (context for others, he wrote a msg and deleted it about “being the all end all beginning all”)

outer veldt
#

Let me show you a thing.

brittle lichen
#

also btw use something else besides chat gpt

cerulean leaf
#

Yeah Chatgpt is À notorious liar

outer veldt
cerulean leaf
#

And EVEN worse at math

outer veldt
cerulean leaf
#

So without even reading it, i know that your proof for the contra is wrong

#

Its not enough to say “i have proven X, here look at my conversations with chagpt”

#

Write out a formal mathematical proof

outer veldt
brittle lichen
#

brother i Don't understand half the words you say English is not my native language but until your write us a logically accurate mathematical proof you will not be taken seriously

cerulean leaf
brittle lichen
#

If the proof suffices you win the next noble prize dw

pallid flicker
#

lol did his five page essay get automodded

brittle lichen
#

@cerulean leaf stop wasting time here let him think where he went wrong

outer veldt
pallid flicker
#

google "euler infinite primes proof" for more context

cerulean leaf
cerulean leaf
pallid flicker
#

yh

cerulean leaf
#

I dont get it, its always the cliche “i have discovered how to make a car run on water”, type discovery, and every 2nd word is just randomly picked from some dictionary, absolutely nonsense ramblings

#

And like, im not stupid, i really do try to understand what they mean, but its like having a stroke, i just cant

pallid flicker
#

is bro saying there are not infinite primes

outer veldt
#

𒀭𒉈𒂵

brittle lichen
#

@outer veldt suppose you have 2 statements A and B. They are completely independent of eachother but are describing the same thing. If someone proposes A be right, you cannot logically refute the righteousness of A by the fact that B is True.

outer veldt
#

What have I to do with ye?

brittle lichen
#

you have to directly show us the error in the proof

cerulean leaf
outer veldt
#

àrschlockt

pallid flicker
#

there are 5 proofs for infinite primes

#

🔥

brittle lichen
outer veldt
cerulean leaf
pallid flicker
outer veldt
#

יהוה זעם

pallid flicker
brittle lichen
#

bros cursing us out in cryptic language

cerulean leaf
brittle lichen
#

keyboard warrior

cerulean leaf
outer veldt
#

Not cursing out. Just cursing (unless...).

outer veldt
brittle lichen
#

basically edgelordism I'm gonna assume

pallid flicker
outer veldt
cerulean leaf
#

Foremost go back to pestering ur grandchildren about how the government is putting chips in ur cereal or smt

pallid flicker
#

@outer veldt

brittle lichen
#

English bro

cerulean leaf
#

Im not even gonna un-google translate whatever he’s saying

pallid flicker
#

english bro

cerulean leaf
#

Nie

#

Hej wolfie, ty skargo, ja ziem cie zaras am nam nam nam mmmm

pallid flicker
#

hi wolfie, hitu3riuriugub3rqibrehirqiurn

#

i used google translat3

brittle lichen
#

speak it

cerulean leaf
#

I also did, (it got it so wrong)

#

But my polish is supreme

cerulean leaf
#

I love d4dj but that song sucks

outer veldt
#

I'm 30. Have you heard about how the U.S. military is currently training with gas chambers at basic, and how the furries and comparable animé enthusiasts are among the first to go? More grease for the gears.

pallid flicker
#

damn why did u call him a [you know what u called him]

#

@outer veldt

faint pawn
#

@outer veldt please stop typing extremely offensive messages

cerulean leaf
#

Tell us something new

outer veldt
#

Oh, schwarze Himmel, wie die schmutzige verdammte stinkende Wildschweine immer so langsam doch tief unten befruchten die dicken Gewässer...Oh, erbarmungslose Übertreter der freidenkende Menschen...

faint pawn
#

@outer veldt also please don't call anyone the F word

brittle lichen
#

brother speaking some other language is making us not take you seriously even more

#

we ain't even translating that shit

faint pawn
outer veldt
#

These are a fecundity and a fetidity unfettered upon me. Mehr Beschichtung für Zahnräder.

faint pawn
cerulean leaf
#

Papa flammy is that you 👉👈

pallid flicker
outer veldt
#

No. I am is not.

pallid flicker
#

🔥

outer veldt
#

I'll translate for you.

faint pawn
faint pawn
#

also

#

#admin-cmd

pallid flicker
#

what

#

anyways

cerulean leaf
# outer veldt No. I am is not.

Actually you are. You are actually stuck inside of a vr world, we are your family pleading with you to escape using any way we can, it is me. Your brother, xingeldwœf, please come back to us. Escape this nightmare

pallid flicker
#

@cerulean leaf he is an attention seeking kid and wants attention, if u stop replying it will resolve the conflict

cerulean leaf
faint pawn
#

@cerulean leaf @outer veldt stick to the topic of this discussion, have this arguement somewhere

#

@cerulean leaf

outer veldt
pallid flicker
#

who the heck is free bird gov

faint pawn
cerulean leaf
#

Well im bored now

#

Oh yeah how can i msgs “yaovmal”

#

Where are they

outer veldt
pallid flicker
outer veldt
#

Pustulate.

faint pawn
cerulean leaf
#

WOAH

faint pawn
#

-timeout @outer veldt 2 hours

cerulean leaf
#

You got a little too impatent to get banned the cool way?

outer veldt
#

I AM FUCKING THE LOVE OUT OF ME IT THE.

cerulean leaf
#

Dude redcliff ban him, obviously its á troll

#

After he is unmuted he will go right back to trolling

maiden forgeBOT
#

Put @outer veldt in timeout for 3 hours

pallid flicker
#

what is bro doing

faint pawn
cerulean leaf
#

He said smt rly interesting

faint pawn
#

foremost said something very bad

cerulean leaf
faint pawn
#

ill tell u in #granola-whey-motion-kontol

cerulean leaf
#

Noo i want acess

faint pawn
#

ill try that later

cerulean leaf
#

It says “no access”

pallid flicker
faint pawn
pallid flicker
#

-timeout @faint pawn 1h

faint pawn
faint pawn
pallid flicker
#

yag doesnt work in threads

faint pawn
#

I had to use the other bot lol

cerulean leaf
#

-ban @pallid flicker

faint pawn
pallid flicker
#

now tht the owner is banned

#

lets close the thread

#

noovs

faint pawn
#

yeah

#

idk how to

pallid flicker
#

who let bro cook

faint pawn