Digital Electronics inside of PB2

General Discussion related to the Plazma Burst game series!

Digital Electronics inside of PB2

Postby phsc » 29 April 2021, 03:35

Okay so this is a more serious post than I generally tend to make, this is about the discussion of something I did and also one question, has anyone ever implemented logical gates (AND, OR, XOR, etc) inside of PB2? and of course, I did, but I would guess someone probably has done it before (I believe this has been possible for a long time, the method I executed involves using doors and regions and moving the regions in the X axis (I believe this was added in 2013, but I could be wrong) and a few other features, the map uses other more modern features but such are not required, and not a single variable, to calculate the sum of two numbers in binary, which is actually what your computer does.
There are other methods to do this (enemy positions, doors in a more developed way), if one can execute the NAND gate inside of PB2 I believe all of the gates should be executable, anyway, here is the map:
https://www.plazmaburst2.com/?s=9&a=&m= ... id=1013127
It is open source but the functioning is not that hard to understand, first, what is a computer? what I made is not Turing complete, but adapting what I created into being Turing complete is possible, but if you take the Google definition of computer: "an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program.", I do believe it passes this.

First, what is binary? instead of the fancy 10 number basis, we work with 2, 0 is 0, 1 is 1, 2 is 10, 3 is 11, 4 is 100, 5 is 101, 10 is 1010 and so on, the formula is: decimal = d0 * 2^0 + d0 * 2^1 + d0 * 2^2 + d0 * 2^x... infinitely, d is digit, to convert a binary number into decimal, to convert a decimal number into binary, you divide it by two, take the quotient and write down the remainder, the example for the number 13: 13/2 = quotient of 6, remaider of 1. 6/2 has a quotient of 3 and a remainder of 0, 3/2 has a quotient of 1 and a remainder of 1, 1/2 has a quotient of 0 and a remainder of 1, the remainders are 1 0 1 1, 13 on the base of 10 is 1101 on the base of two (binary), 1101 is 1*2^3 + 1*2^2 + 0*2^1 + 1*2^0 = 13.

Your computer does everything in binary because it is easier to work with, why? because it uses capacitors, which gets into the magical field of digital electronics, ever seen these fancy circuits? well, turns out you can do that not only with capacitors, but with everything, even dominos, and also doors, in my map I only executed the AND and the XOR gates, why? because with them you can create the half adder with them, which happens to be the preview of my map, here is the half adder:

At the top we have the XOR gate, simbolized by the )D thing, and at the bottom we have the AND gate, which is the D, and the two inputs, A and B, the idea of XOR is that it is X OR, if A or B are 1, it is true, but only if it is one (that is why it is the OR), so here is the logical table for it:
A = 0, B = 0 -> XOR = 0
A = 0, B = 1 -> XOR = 1
A = 1, B = 0 -> XOR = 1
A = 1, B = 1 -> XOR = 0
The AND gate is very simple, if both A and B are 1, it is true, so 1, the logical table for it:
A = 0, B = 0 -> AND = 0
A = 0, B = 1 -> AND = 0
A = 1, B = 0 -> AND = 0
A = 1, B = 1 -> AND = 1
If you have a slighty working brain you probably got the idea, the half adder S is the sum, and the C is the carry, just like when you do 5+5 which passes 1 to the next digit and 0 to the current, this also happens in binary, turns out you can do sums with this, and that is what the map does!
So let's first see what the circuit does:

It's a bunch of half adders, that calculates the sum of digits, since we are working in binary, one half adder can sum one digit, the next one another, and so on, 2^n, there are 5 half adders, so 2^5 which is 32, but the max value for the sum is 31, because 0 is also a number to be considered here, but since the input is limited by 4 digits, 4 instances of A and B, the maximum input is 15, and the lowest one is 0, now take a look at the map and it's source:


You can see which gate is which, and how they are connected (not necessary, I did this so it is easier to understand), all it does is move the region to the right based on the truth tables, it adds 100 to the X size of the region, and the door moves there, there is a region under there that activates stuff related to the next gate and so on, it adds 100, for the XOR gate, since it will only run if only A or B are 1, when it is at 100 it will run, but when it hits 200 it will not, so it is a 0, the AND is the opposite, if it only moves 100 it will not run, but if it moves 200, both A and B being true, it will activate the next one as true.
The input digits are just doors so you can save their values, you activate the triggers on the right to move them to the right (1), and the ones on the left to move them to the left (0), the USE button on the far left of the map runs the whole circuit.
So let's see it in practice:
12 + 13 = 25, right? let's do this, 12 in binary is 12/2 = 6 (0), 6/2 = 3 (0), 3/2 = 1 (1), 1/2 = 0 (1), so we get 1 1 0 0, so 12 = 1100, 13 as we know is 1101, 25 is 25/2 = 12 (1), 12/2 = 6 (0), 6/2 = 3 (0), 3/2 = 1 (1), 1/2 = 0 (1), so 11001.
So 1100 + 1101 or 1101 + 1100 should be 11001, what happens if you run it?

So yeah, did I mention this uses literally no variables? yeah, that is the thing, this is what is happening in your computer, not the same exact thing in the same exact way, but the principles are the same.
A few things I did not mention, the XOR gates marked with II could be OR gates, in real life the OR gate is cheaper to manufacture since the XOR one uses 6 capacitors and the OR uses only one as far as I know, so yeah there is that, but in PB2 with the system I created, the XOR is easier, so I went with it, you could execute this in a different way literally creating the logical table with the movable objects and such, but this was simplier for me to do and it gives a good idea of the concept.

Anyway, why did I make this post?
The general idea is that, I don't have the time to really play with this, and this is actually very interesting and useful if you have the brains for it, this can be executed super fast in a small scale and if someone creates the other logical gates (I might do this later), you can have any circuit in the game, there are a few other issues but these can be dealt with, this really shows how amazing PB2 is as a game and how far it goes in it's system, and what I find most impressive is that this could've been done in the past, so again, has anyone done this? I really think someone might have, this is a quite well known about topic and it has been possible for a while.

Anyway, there is more to be discussed, if nobody has ever made this, isn't this kind of sad? other games with more mature communities such as Factorio have done things such as this, I mean the PB2 target audience are obviously kids, so this explains this, but isn't it sad? anyway while the game got easier to do things, I think it lost one of it's charms, the difficulty in executing this, this could've been much more developed if some random dude in 2013 did this and people learned it and executed variables, in such case, the updates with variables probably wouldn't have happened, and if it did it would probably be earlier, this applies to everything, I made that image insertion program (the original version was bad but still), the image decors were added, what if someone did that before? I think people are very limited by what they see and not the opportunities this game has, this is something you can execute in very few games and it is amazing.

Also I think General Discussion is better than either Tutorials or Maps because... it is not really a Tutorial, and not really a Map, it is both, but more of a general discussion about the topic.

tldr: you can create fancy nerd stuff in pb2 to like calculate things without using variables, basically, make a computer, this topic gives a brief introduction to the topic and some commentary

Also if anyone has done this in the past please let me know!!!
User avatar
phsc
Noir Lime [600]
 
Posts: 694
Joined: 27 July 2013, 13:58
Location: Brazil

Re: Digital Electronics inside of PB2

Postby schatzkluger » 2 May 2021, 04:47


Will there be a feature for NAND, NOR, and XNOR?

schatzkluger
Recruit
 
Posts: 7
Joined: 3 November 2020, 11:40
Location: IDK

Re: Digital Electronics inside of PB2

Postby phsc » 2 May 2021, 07:56

schatzkluger wrote:
Will there be a feature for NAND, NOR, and XNOR?

Yes I am working on it, I found a way to execute all the gates but I sadly lack the time to finish the system right now, but in a few days I will post a update in this forum thread.
User avatar
phsc
Noir Lime [600]
 
Posts: 694
Joined: 27 July 2013, 13:58
Location: Brazil

Re: Digital Electronics inside of PB2

Postby Lord Blue Blood » 5 June 2021, 23:15

yo that's pretty interesting that you actually thought of this, i have a very good understanding of digital electronics but i never thought it would be applicable in pb2.
i also agree with you that its sad that this could have been thought of and utilized to its maximum potential way back if the game was popular enough.
however i don't see how someone could use this and create something advanced as it would require a really enormous quantity of logic gates, for example a CPU contains more than 100 million logic gates.
btw how would you derive the OR logic gate?
User avatar
Lord Blue Blood
Usurpation Soldier [50]
 
Posts: 66
Joined: 16 July 2013, 21:05

Re: Digital Electronics inside of PB2

Postby phsc » 6 June 2021, 15:55

Lord Blue Blood wrote:however i don't see how someone could use this and create something advanced as it would require a really enormous quantity of logic gates, for example a CPU contains more than 100 million logic gates.

i don't think something that complicated could be made, but something in a smaller scale could work, something simpler to do what people often do with variables, a lot of it ends up just being if statements and such, and that could work really well for like saw maps and such if variables were never introduced, of course something like https://www.plazmaburst2.com/?s=9&a=&m= ... &id=987993 would not be possible, but even more complicated stuff could be, so you can actually edit pb2 map files via text with the XML stuff, someone couldve made a system that implements a ton of logical gates in a small and effective way (this wouldve been figured out by the community if people actually had to use logical gates naturally) automatically to do algorithms, this is the kind of thing id do in an alternate timeline or something (i did play around with the XML pb2 map files and such with an image insertion program i made so), so you could have more complicated stuff, but considering how advanced most people in pb2s community are in related fields its rather unlikely it would be used, but then, if back then people realized you could do this and someone made cool stuff, that would be a reason for people to learn about it and understand it, which would make the average map maker more skilled when it comes to knowledge related to what i was talking about

btw how would you derive the OR logic gate?

i actually did this but i didnt make a fancy map to show it out (lack of time) but think of this like this
instead of only moving it in the X axis, also moving it on the Y axis
if A is 0 X doesnt move, if A is 1 X moves to the right (could be the left or anywhere etc)
if B is 0 Y doesnt move, if B is 1 Y moves
so you can have all the gates like this

the regions for A = 1 while B = 0 and A = 0 while B = 1 woouldnt activate since the regions are moved before the doors, so in the case of the OR, you can have both cases if you execute it like that
User avatar
phsc
Noir Lime [600]
 
Posts: 694
Joined: 27 July 2013, 13:58
Location: Brazil

Re: Digital Electronics inside of PB2

Postby Assassian4 » 8 June 2021, 17:17

Lord Blue Blood wrote:yo that's pretty interesting that you actually thought of this, i have a very good understanding of digital electronics but i never thought it would be applicable in pb2.
i also agree with you that its sad that this could have been thought of and utilized to its maximum potential way back if the game was popular enough.
however i don't see how someone could use this and create something advanced as it would require a really enormous quantity of logic gates, for example a CPU contains more than 100 million logic gates.
btw how would you derive the OR logic gate?




I've already created a trigger variable based counting CPU which circumvents the need of part heavy logic gates, furthermore I am currently recreating an I486SX inside of PB using this same method. A CPU is possible as i've done it but just to warn you its very unstable as pb2 really does not like loading every logic calculation done by it at once.
Im also attempting to load real code from x86 machines onto this processor which is pissing pb2 off by a ton.

Assassian4
Recruit
 
Posts: 13
Joined: 16 July 2017, 06:28

Re: Digital Electronics inside of PB2

Postby phsc » 8 June 2021, 17:56

since assassian decided to go public about his lies its time to show how funny the shit he made is

individual of questionable intelligence wrote:I've already created a trigger variable based counting CPU which circumvents the need of part heavy logic gates

so you didnt make a CPU, a CPU is literally a ton of logic gates, you literally have no idea of what you are talking about, if you already have variables, there is no need for a CPU, literally, by definition, the CPU executes logical commands basically, there is no need to execute most logical commands like this using a CPU if you ALREADY have variables and are using them to make the CPU, this is literally redundant, but you are so ignorant you did not even read that to lie about things you didnt make, xd

individual of questionable intelligence wrote:furthermore I am currently recreating an I486SX inside of PB using this same method. A CPU is possible as i've done it but just to warn you its very unstable as pb2 really does not like loading every logic calculation done by it at once.

if you made it, then make a technical video explaining it and if you have the balls, make it open source, but uh unsure if you know but, lets get a bit technical, if you did make the processor itself, the actual architeture of it, you are using logical gates, by definition, because that is how the processor itself works, but if you are emulating it, it is still objectively impossible, and here is why
the i486 has around 1 million transistors, even if you did emulate it or make some retarded bullshit, a pb2 map is physically uncapable to handle it, generally, under my tests, pb2 basically wont load a map bigger than around 1.75MB, of course this depends on the computer running it, but the pure text loading time considering the flash limitations start to die after that value (i did many tests related to that), what happens is that, since one character in ASCII that pb2's map encoding system uses is 1 byte, you are limited to around 1750000 characters, the thing is, triggers use a massive amount of characters, even if you managed to make every single transistor-equivalent trigger 2 characters, while in reality it is probably 10 and more realistically 100 or even more times that, for a single transistor, the map would not load, talking about real values, the map would not even load on the level editor

individual of questionable intelligence wrote:Im also attempting to load real code from x86 machines onto this processor which is pissing pb2 off by a ton.
~
you are not pissing pb2 off dude, you are making everybody laugh, you really take yourself too seriously, all you did is lie about a thing with no evidence about it, a lot of ignorant people fall for it because they are well, ignorant, but some people like a few friends of mine and such understand how a processor works and such

anyway, if anyone wants to laugh at this dude, i saved his video responses to me
https://www.dropbox.com/s/smnilma9ho2z7 ... 1.mp4?dl=0
https://www.dropbox.com/s/qjusb12dcj5p7 ... o.mp4?dl=0
https://www.dropbox.com/s/8eoft4el705z9 ... 3.mp4?dl=0

anyway it is pretty obvious to me assassian just wants to cause drama and such and it is well known he is a toxic and ignorant individual, he just wants to get this locked because i actually did what he could not do, since he is unable to show evidence that what he did is what he says he did, and since he also did not make it open source or property explain it in a valid technical way, i don't think replying to him further is going to add a lot to it, but i hope staff does not lock this just because of him


EDIT: i just realized he said COUNTING CPU, CPUS DO MORE THAN COUNTING YOU FILTHY ANIMAL LIKE CAN YOU EVEN THINK A LITTLE BIT, IF YOU MADE A THING THAT ONLY COUNTS, ITS NOT A CPU!!!!!!!!!!!!!!!!!!
User avatar
phsc
Noir Lime [600]
 
Posts: 694
Joined: 27 July 2013, 13:58
Location: Brazil

Re: Digital Electronics inside of PB2

Postby Assassian4 » 10 June 2021, 17:42

phsc wrote:since assassian decided to go public about his lies its time to show how funny the shit he made is

individual of questionable intelligence wrote:I've already created a trigger variable based counting CPU which circumvents the need of part heavy logic gates

so you didnt make a CPU, a CPU is literally a ton of logic gates, you literally have no idea of what you are talking about, if you already have variables, there is no need for a CPU, literally, by definition, the CPU executes logical commands basically, there is no need to execute most logical commands like this using a CPU if you ALREADY have variables and are using them to make the CPU, this is literally redundant, but you are so ignorant you did not even read that to lie about things you didnt make, xd

individual of questionable intelligence wrote:furthermore I am currently recreating an I486SX inside of PB using this same method. A CPU is possible as i've done it but just to warn you its very unstable as pb2 really does not like loading every logic calculation done by it at once.

if you made it, then make a technical video explaining it and if you have the balls, make it open source, but uh unsure if you know but, lets get a bit technical, if you did make the processor itself, the actual architeture of it, you are using logical gates, by definition, because that is how the processor itself works, but if you are emulating it, it is still objectively impossible, and here is why
the i486 has around 1 million transistors, even if you did emulate it or make some retarded bullshit, a pb2 map is physically uncapable to handle it, generally, under my tests, pb2 basically wont load a map bigger than around 1.75MB, of course this depends on the computer running it, but the pure text loading time considering the flash limitations start to die after that value (i did many tests related to that), what happens is that, since one character in ASCII that pb2's map encoding system uses is 1 byte, you are limited to around 1750000 characters, the thing is, triggers use a massive amount of characters, even if you managed to make every single transistor-equivalent trigger 2 characters, while in reality it is probably 10 and more realistically 100 or even more times that, for a single transistor, the map would not load, talking about real values, the map would not even load on the level editor

individual of questionable intelligence wrote:Im also attempting to load real code from x86 machines onto this processor which is pissing pb2 off by a ton.
~
you are not pissing pb2 off dude, you are making everybody laugh, you really take yourself too seriously, all you did is lie about a thing with no evidence about it, a lot of ignorant people fall for it because they are well, ignorant, but some people like a few friends of mine and such understand how a processor works and such

anyway, if anyone wants to laugh at this dude, i saved his video responses to me
https://www.dropbox.com/s/smnilma9ho2z7 ... 1.mp4?dl=0
https://www.dropbox.com/s/qjusb12dcj5p7 ... o.mp4?dl=0
https://www.dropbox.com/s/8eoft4el705z9 ... 3.mp4?dl=0

anyway it is pretty obvious to me assassian just wants to cause drama and such and it is well known he is a toxic and ignorant individual, he just wants to get this locked because i actually did what he could not do, since he is unable to show evidence that what he did is what he says he did, and since he also did not make it open source or property explain it in a valid technical way, i don't think replying to him further is going to add a lot to it, but i hope staff does not lock this just because of him


EDIT: i just realized he said COUNTING CPU, CPUS DO MORE THAN COUNTING YOU FILTHY ANIMAL LIKE CAN YOU EVEN THINK A LITTLE BIT, IF YOU MADE A THING THAT ONLY COUNTS, ITS NOT A CPU!!!!!!!!!!!!!!!!!!




mad cuz bald

alright time to speedrun the debunking of bald spanish mans arguement

- you didnt read "part heavy logic gates" correctly, your english isnt the best bud its in refrence to your door based gates which use a shitload of entities while mine are completely done using variables

- no technical video will be done a) because i like my intellectual property and b) alt tabbing with the level editor open makes it shit the bed and the recording would be at such low FPS you could breath faster than the framerate

- you proceed to say "you are not pissing pb2 off" then explain how i am pissing pb2 off

- why would i care about drama in a dead flash game you just make me laugh with your retarded excuses
i dont even use the forums so how would i know how the locking or whatever happens

if you need me to show images or whatever you are actually mentally inept and have the brain capacity of a rubber mallet



oh and incase anyone still isnt convinced phsc is less intelligent than a rock keep in mind this man said CPUS werent possible in pb then 5 seconds later said he would make one

ill make a more in depth counterarguement in a few hours.

Assassian4
Recruit
 
Posts: 13
Joined: 16 July 2017, 06:28

Re: Digital Electronics inside of PB2

Postby Build » 10 June 2021, 23:39

Dude, I'm in PB2 since 2011. I've created a god damn most detailed map of this game. I've made a god damn multilevel elevator and a password panel. And you're gonna teach me how to use this?!
User avatar
Build
Falkok [250]
 
Posts: 275
Joined: 27 February 2018, 18:18
Location: Backrooms

Re: Digital Electronics inside of PB2

Postby phsc » 10 June 2021, 23:40

individual of questionable intelligence wrote:mad cuz bald

ad hominem, non sequitur

individual of questionable intelligence wrote:alright time to speedrun the debunking of bald spanish mans arguement

ad hominem, non sequitur (i mean an ad hominem is a non sequitur), also i am not spanish, and i am not bald, but this is your level of "argumentation" (its not a proper argument, its like a childrens logical fallacy)

individual of questionable intelligence wrote:no technical video will be done

because you cant make one, you cannot even explain how it works by text, because its a lie, there is no evidence for it, thus it is fake, burden of proof inversion, russels teapot, call it what you want, the concept is true and passes humes guillotine so your opinion does not matter on this topic, it is objective (you dont know what any of this is because you are ignorant not only in computing-related fields but also in logic)

individual of questionable intelligence wrote:i like my intellectual property

you cannot own concepts, you can say you hold a thing and like the state or whatever might protect it, this is what patents are after all, the thing is, if i come up with the same thing you do (not saying i will because what you made is actually false since there is no evidence for it, i mean you can do anything w varialbes tahts super simple but since oyu are saying I MADE A CPU USING VARIABLES and a CPU handles variables there is no way of knowing if you made a CPU unless you show it otherwise you can just be using variables directly duh) nothing will happen to me, so you dont actually own it, you just hide it (because its a lie)

individual of questionable intelligence wrote:alt tabbing with the level editor open makes it shit the bed and the recording would be at such low FPS you could breath faster than the framerate

again as i said the map would physically not load if you actually did what you said but since its a lie and i explained how it is impossible this is redundant

individual of questionable intelligence wrote:you proceed to say "you are not pissing pb2 off" then explain how i am pissing pb2 off

ur literally not pissing anyone off, i really dont care about the map youve made, i do think you are annoying but this is funny i mean u generate a lot of memes and such for my discord server and related, its funny, im not actually mad at you you are just ridiculous yno how far you go to back up the lies

individual of questionable intelligence wrote:why would i care about drama in a dead flash game you just make me laugh with your retarded excuses

u care so much about drama you keep going even when you are literally saying nothing, like you literally backed up nothing, ur just doing excuses and projecting, I WONT SHOW ANY EVIDENCE OR EXPLAIN ANYTHING BECAUSE I DONT WANT TO HURR DURR this is what you are doing, you came here to comment because you are mad people saw that i made an actual computer with actual gates, and you feel bad, because you wish you could do it, you lie about it for the admiration and praise or just to bait people to try to feel superior or something, if not both, so you come here comment and try to dismiss what ive made in public, because you fear it, this is your motivation, you care, its well known and this is why it is so funny, rather sadistic from my part so there is that

individual of questionable intelligence wrote:i dont even use the forums so how would i know how the locking or whatever happens"

you dont need to use something to know how it works, ive never used something like the m40 but i know how it works because i have handled weapons that work in decently similar ways, you might have used forums in other parts of the internet, or heard about it, or anything, this is a fallacy but its so dumb i dont even remember its name because nobody uses it, also you dont need to use something to view it, and you have seen a few posts on the forums, in total you have 13, i dont think it is even tracked how many you have seen but its at least 13
AND YOU ACTUALLY COMMENTED ON A LOCKED POST! viewtopic.php?f=128&t=24065&p=209091


individual of questionable intelligence wrote:if you need me to show images or whatever you are actually mentally inept and have the brain capacity of a rubber mallet

YOU WANT ME TO EXPLAIN WHY THE EARTH IS FLAT? YOU WANT ME TO SHOW IMAGES THAT THE EARTH IS FLAT? YOU ARE MENTALLY INEPT AND HAVE THE BRAIN CAPACITY OF A RUBBER MALLET (last part is an ad hominem)

individual of questionable intelligence wrote:oh and incase anyone still isnt convinced phsc is less intelligent than a rock keep in mind this man said CPUS werent possible in pb then 5 seconds later said he would make one

you are so stupid you dont even know what you are saying, i didnt make a CPU, i made a computer, both are different, this is not turing complete, i also didnt say a CPU is not possible, i literally said it probably is, a processor is a CPU
https://www.dropbox.com/s/qjusb12dcj5p7 ... o.mp4?dl=0 its literally the image you used on this video, you are so stupid you dont even know what you used on your own videos


individual of questionable intelligence wrote:ill make a more in depth counterarguement in a few hours.

go ahead, if you say anything that has any epistemic value or anything i think is relevant i will reply, the thing is, as i said, you are just baiting with no actual arguments or anything just to take attention from the main post and such because you are JEALOUS, you are simply jealous that i made what you lie about, with evidence and open source, but its funny as shit
User avatar
phsc
Noir Lime [600]
 
Posts: 694
Joined: 27 July 2013, 13:58
Location: Brazil

Re: Digital Electronics inside of PB2

Postby Stryde » 11 June 2021, 14:21

mokaal wrote:Ironically, Phsc waste his time on replying some people who opposing his opinions and write a 250+ paragraph for a single reply, why don't you go outside and relax instead of replying to some people to make an effort?



Assassian4 wrote:
mokaal wrote:Ironically, Phsc waste his time on replying some people who opposing his opinions and write a 250+ paragraph for a single reply, why don't you go outside and relax instead of replying to some people to make an effort?



phsc makes it his job to waste his life on pb2


and both of your comments on this post are doing the same, so stay on track to the topic or don't post on it anymore

Stryde
Moderator
 
Posts: 361
Joined: 9 November 2015, 02:17

Re: Digital Electronics inside of PB2

Postby schatzkluger » 6 July 2021, 13:53

I edited this, i think it's better for this digital electronics to calculate prime numbers i think that's cool (rather than a simple calculation) and i have provided a mathematical representation of it, i guess it would be easy to translate it into the digital electronics, here :

2N ± 1=P_N (N ∈ N), let's call this thing the prime function which could calculate two primes at the the same time
And now lets do something with it let's just say N=1, then we get:

2*(1) ± 1= 5 & 3 where both are primes which means P_1=5 & P_2=3, then let's sum up both of this prime to get a new even value which results 5+3=8 \ P_1+P_2=8, and let's just say this new number to be our new N value and we keep doing this until there's no prime results at all on both P_1 & P_2 (note that the sum formula could be generalized into (2(A-1), where A=P_1).

2(1) ± 1=3, 5->8
2(8) ± 1=17, 15->32
2(32) ± 1 =65, 63.

let's stop and see that none both of 65 & 63 are prime this could be done by using the floor function test, or odd number division test. Now what happens if we continue? basically if keep continue the probability that's going to get a prime number is defined by this formula:

P(S-1)=1/S, where the S is how much time do we need until we end up with no prime at all (note that having only one prime is not a problem).

therefore by using this probability formula we can find what's the probability next for the sum of this none-primes of getting two primes or just one prime, our S is 3 because we failed at the third time

P(3-1)=1/2=0.5, that's means it's rather an ambigous if it's prime next let's just try

2(32) ± 1 =65, 63->128
2(128) ± 1=257, 255.

257 is a prime number what a good thing, now it's all up to you to continue.

schatzkluger
Recruit
 
Posts: 7
Joined: 3 November 2020, 11:40
Location: IDK


Return to General Discussion

Who is online

Users browsing this forum: No registered users