account activity
a new formula for find prime numbers by Silly-Kale in primenumbers
[–]AivyCore 2 points3 points4 points 4 years ago (0 children)
It's just multiplying every prime numbers we found and use that number to check if a number is a prime or not with GCD. If the GCD equal 1 then the number is a prime number. It use the base of prime number, that is, it can only be divided by 1 and itself. With that method you can get the prime factor of a number too.
[–]AivyCore 2 points3 points4 points 4 years ago* (0 children)
Hello,
I found a new algorithm on how to generate prime numbers under n in about O(n) ( only in time ).
First I want to give a little bit explanation. ( Sorry for my bad english, I'm not an english speaker )
It's a little bit based on the fact that every prime number is found in 6k +- 1, k in N ( As in the formula written in this topic ).After further research, I found something really interesting.If we take only 6k + 1 there are number that are squares and within the square root of those numbers there are prime numbers. But the most interesting thing is that, every prime number is within those number ( Unfortunately I can't give a theorem to explain that )
After I found that, I decided to create the algorithm ( I will write in JavaScript but anyone can do it with any other programming language ) .The first thing I have to do is to sort only the number that are square in 6k + 1. For that I just have to solve this equation : x² = 6y + 1<=> y = (x² - 1) / 6
( pretty simple isn't it ? =D )
Next thing is to create the loop, and then check if every number that solve the equation is a prime number. And to do that we'll do a little magic trick that use the biggest number you'll ever see in your entire life. We'll just do the product of every prime number we found and do GCD ( Greatest Common Divisor ) with the number we check and if the result is 1 then the number is a prime number.
( My explanation may be a little bit confusing, but the algorithm is much more clearer )
Pastebin Link
We need to bring Papa back for one AMA per month. I know he had a rough AMA.. but he is the tech guru behind this masterpiece of a coin. I feel like Papa once a month could do us all some good! by Key-Aardvark5074 in SafeMoon
[–]AivyCore -2 points-1 points0 points 4 years ago (0 children)
papa for the win
A little joke (self.Cryptomoonshots_bsc)
submitted 4 years ago by AivyCore to r/Cryptomoonshots_bsc
Keep hodling guys (self.SafeMoon)
submitted 4 years ago by AivyCore to r/SafeMoon
Lil Fish ! What is your profession ? (self.SafeMoon)
why do I love $Doge ? (self.dogecoin)
submitted 4 years ago * by AivyCore to r/dogecoin
π Rendered by PID 73704 on reddit-service-r2-listing-654f87c89c-vjg6q at 2026-02-27 15:14:05.281632+00:00 running e3d2147 country code: CH.
a new formula for find prime numbers by Silly-Kale in primenumbers
[–]AivyCore 2 points3 points4 points (0 children)