Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Prime Numbers

Name: Anonymous 2009-01-27 20:02

Is there any real good formula(s) for finding out if a number is prime? I've managed to devise a formula on my own, but it doesn't work when you plug in something that has a multiple of three. The formula would yield either a whole or a fraction. A fraction means that the number you plugged in is a composite number, whereas a whole number meant you got yourself a genuine prime number. But, when I plug in a multiple of 3, I get a whole number and that's no good.

So, if anyone has a favorite formula or if there's just one good formula right now, please do share. Thanks.

Name: Anonymous 2009-01-27 20:16

Let me see your formula

Name: Anonymous 2009-01-27 20:23

http://img228.imageshack.us/my.php?image=primeformulahb4.jpg

n would be the same number as c.

http://img156.imageshack.us/my.php?image=primeformulasimpletestyo8.jpg

This is a simple test of it. I've applied a sleuth of numbers, but it never works right with multiples of 3. As you can see, the problem produces a whole number and according to my theory, that makes c a prime number.

Pardon how ugly it looks. I don't have anything to write out formulas like that. I also have a pretty minimal understanding of Calculus.

Name: Anonymous 2009-01-27 22:54

The distribution of prime numbers is not understood very well. You and never going to find such a formula with your high school math. But hey, at least you're interested enough to try.

Name: Anonymous 2009-01-27 22:58

>>4
You are* never
And no, there is no formula OP. You have to use a thing called brute force.

Name: Anonymous 2009-01-27 22:59

>>3 wut?

Use Wilson's Theorem.

Name: Anonymous 2009-01-27 23:20

i dont get Modular arithmetic.  Meaning its use.

Name: Anonymous 2009-01-27 23:26

>>3
HAHA, no.

Name: Anonymous 2009-01-27 23:27

>>7 p is prime if and only if p divides (p-1)! + 1

Name: Anonymous 2009-01-27 23:51

>>9  thats wilsons , not mod.  or wait

Name: Anonymous 2009-01-28 23:57

OP, here. Yeah, as I said, there's already a flaw. The whole idea was to see if anyone had any good idea as to what I can do with it. Thanks for the feedback, though.

And for the record, my High School Math was stupid. We never even touched on anything like this. Furthest we got was basic trig. I had to teach myself everything thereafter. So, blame that for my shitty Calculus. Heh.

Name: Anonymous 2009-01-28 23:59

sucks =\   they teach shit in highschool besides ap cal  sometimes thats shitty to.

Name: Anonymous 2009-01-29 0:20

Well, just in case one of your guys does accidentally come across it, you should be aware of this:
http://www.eff.org/awards/coop

Name: OP 2009-01-29 13:18

>>13

That's fucking awesome, man. I did not know anything at all about that.

Name: Anonymous 2009-01-29 14:40

>>14
SPOILER: The probability of a number with a billion decimal digits being prime is 2.3x10^-999999991.

Name: Anonymous 2009-01-29 15:53

>>15

You'd have a better shot at the lottery... but, at least this is fun and takes more time.

Name: Anonymous 2009-01-29 15:53

>>15

You'd have a better shot at the lottery... but, at least this is fun and takes more time.

Name: Anonymous 2009-01-29 20:18

AKS primality test is a polynomial-time algorithm

Name: mo‮8pE! to‬pui‮ !1uHaijp7IU!n9e4aOufPFUPnvI 2009-01-31 5:25

♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣
♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣
♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣

Please go to http://tinyurl.com/be5l89 and click "Save page."

♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣
♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣
♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣♦♥♠♣

Name: 4tran 2009-01-31 13:01

>>18
Even a simplistic brute force search is only sqrt.
I heard that a cube root algorithm exists.
Slowpoke is slow.

Name: Anonymous 2009-02-01 12:24

>>20
For an integer N, input size grows with \log N... Which makes brute force exponential.

Name: Anonymous 2009-02-02 3:33

>>3
i'm gonna assume the c and i on the left hand side of your equation were supposed to be flipped, cause that's the only way it makes sense to equal the right hand side.

if you write your formula as a function of n, then what you really have is


f(n) = \sum_{i=1}^n i/n = \frac{1}{n}\sum_{i=1}^n i = \frac{1}{n}\left(\frac{n(n+1)}{2}\right) = \frac{n+1}{2}


so all your formula really checks is whether or not the number is even or not. all prime numbers (greater than 2) are odd, but not all odd numbers are prime.

your observation that this fails for multiples of 3 is true, but it also fails for multiples of 5 and 7 and 11, etc.

if this stuff interests you, pick up a book on introduction to number theory, learn about some modular arithmetic, euler's totient function, chinese remainder theorem, and maybe some stuff on pythagorean triples and you'll be well on your way through a first course in number theory.

Name: Anonymous 2009-02-03 15:42

>>1
Yes, they're called Mersenne primes.
http://en.wikipedia.org/wiki/Mersenne_prime
They also happen to produce the largest primes that we know to date.

Name: Anonymous 2009-02-03 17:20

>>23
The "formula" for Mersenne primes doesn't always generate them and it is not known at this time if there are infinitely many or not (only 46 are known so far).

Name: Anonymous 2009-02-03 18:11

EVERY NUMBER OF THE FORM 2^2^2^2^2^2^2^2^2+1 IS PRIME.

PROVE ME WRONG!

Name: Anonymous 2009-02-03 18:55

cORREC.T

Name: Anonymous 2009-02-03 19:01

>>25
2^2^2^2^2^2+1 = 2^32+1 = 4,294,967,297 = (641)*(6,700,417)

Name: Anonymous 2009-02-03 19:10

>>27
Nah, he takes the 2nd power 8 times, you do it only 5.

Name: Anonymous 2009-02-03 19:25

>>25
EVERY NUMBER OF THE FORM 2^2^2^2^2^2^2^2^2+1 IS PRIME.

There's only one number of that form, you fucktard.

Name: Anonymous 2009-02-03 19:25

>>27
I said 2^2^2^2^2^2^2^2^2, not 2^2^2^2^2^2.

Name: Anonymous 2009-02-03 19:26

>>29
EVERY NUMBER OF THE FORM 7 IS PRIME!

PROVE ME WRONG!

Name: Anonymous 2009-02-03 20:02

>>31
No, I believe you are correct, good sir.

Name: Anonymous 2009-02-03 23:16

>>31
EVERY FORM OF THE FORM FORM IS A FORM!

PROVE ME WRONG!

Name: 4tran 2009-02-05 14:12

Aren't you supposed to take exponents from the right?
ie 333 = 3(33), rather than (33)3?

2^2^2^2^2^2^2^2^2+1 = 2^2^2^2^2^2^2^4+1 = 2^2^2^2^2^2^16+1 = 2^2^2^2^2^65536+1 = ...

Name: Anonymous 2013-05-26 15:00

Unknown Mathematician Proves Elusive Property of Prime Numbers : http://www.wired.com/wiredscience/2013/05/twin-primes

Name: Anonymous 2013-05-28 20:10

Fibonacci primes:
2, 3, 5, 13, 89, 233, 1597, 28657, 514229, 433494437, 2971215073, 99194853094755497, 1066340417491710595814572169, 19134702400093278081449423917, 475420437734698220747368027166749382927701417016557193662268716376935476241

Name: Anonymous 2013-05-29 4:41

>>35
PhD in math:  starting salary, whatever they pay to make sandwiches at Subway

Name: Anonymous 2013-07-07 12:43

New Largest Known Prime Number Discovered

Martin Nowak, an eye surgeon in Germany, and a long-time volunteer in the Great Internet Mersenne Prime Search (GIMPS) distributed computing project (http://www.mersenne.org/prime.htm), has discovered the largest known prime number. Nowak used one of his business PCs and free software by George Woltman and Scott Kurowski. His computer is a part of a wordwide array of tens of thousands of computers working together to make this discovery. The formula for the new prime number is 225,964,951-1. The number belongs to a special class of rare prime numbers called "Mersenne primes." This is only the 42nd Mersenne prime found since Marin Mersenne, a 17th century French monk, first studied these numbers over 350 years ago. Written out, the number has 7,816,230 digits, over half a million digits larger than the previous largest known prime number. It was discovered after more than 50 days of calculations on a 2.4-GHz Pentium 4 computer.

Name: Anonymous 2013-07-10 23:37

>>38
Nowak
Jew.

Name: Anonymous 2013-07-11 18:02

Name: Anonymous 2013-07-23 13:16

>>38
42

Don't change these.
Name: Email:
Entire Thread Thread List