Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#51 2013-04-24 17:07:49

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Good luck with that! I have to go out now...


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#52 2013-04-24 19:57:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

Sorry, but problems still not fixed and it looks like my connectivity will be on and off for the rest of the night.

See you later.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#53 2013-04-24 22:29:35

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Hi Bobby,

Just messin' 'round with output presentation, and also included a timer, infinite looping (for looooong calcs) and a prompt for P. Here's what I've done:

Last edited by phrontister (2013-04-28 00:51:25)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#54 2013-04-24 22:36:42

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

Your machine is faster than mine. Mine took 12 seconds.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#55 2013-04-25 00:01:35

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

I grease the workings of my computer with Vegemite. If you want to try that on your machine to soup it up, just make sure you don't use molasses, which has a similar appearance but will have the opposite effect.

Last edited by phrontister (2013-04-25 00:04:35)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#56 2013-04-25 04:55:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi phrontister;

I will try that but vegemite is hard to come by here.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#57 2013-04-25 04:59:07

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Hi Bobby,

You probably already know approx how the running times of the various parts of your code compare, but I thought I'd run a 'Timing' test so I could see which area/s could do with some speeding up. I used P=13 and minimum upper limits.

0.047 seconds: p = Table[Prime[k], {k, 1, 45793}];

0.109 seconds: ans = Accumulate[Table[p[[n]]^13, {n, 1, 45793}]];

10.656 seconds: Position[MapIndexed[fubar, ans], {{True}, {True}}]

I'm not sure how to break that last one into separate times for Position and MapIndexed, but from a test I tried it seems that MapIndexed takes up most of the combined time (but I may be wrong there, because I had to split that line into two for Timing to work).


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#58 2013-04-25 05:09:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

That is to be expected, that is where the primality testing is. But it does look like I did not choose the best way possible.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#59 2013-04-25 05:11:59

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Getting sleepy...my inbuilt clock is running down. sleep CuL8r.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#60 2013-04-25 05:19:08

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

Okay, have a good night. Maybe I will have something to post when you get back.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#61 2013-04-25 13:05:23

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Hi Bobby,

I just changed my code in post #53 to remove the upper limit, which will be useful for cooking my cpu during long service leave if I particularly want to solve a hard-to-get P value.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#62 2013-04-25 14:19:48

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

There is some strange coincidence with these answers.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#63 2013-04-25 14:33:36

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

What have you discovered?


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#64 2013-04-25 14:37:02

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

That all the n's are odd.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#65 2013-04-25 14:46:13

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

That is an 'odd' coincidence!

Actually, I don't know how to check that. I tried printing n, but failed.

And I have to go out now...


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#66 2013-04-25 14:51:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Okay, there are even answers but the first answer is so far always odd. Have a good time.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#67 2013-04-25 15:21:16

Stangerzv
Member
Registered: 2012-01-30
Posts: 266

Re: My New Twin Prime Numbers

hi bobbym

Yeah I notice it too..can you get n to be even for Ps? It is like finding odd perfect numbers, so far all perfect numbers are even.

Last edited by Stangerzv (2013-04-25 15:22:52)

Offline

#68 2013-04-25 15:55:17

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi;

This is an even answer for n, but it is not the smallest one.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#69 2013-04-25 18:32:27

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

I changed my code to run automatically while I was out, and got the following:

All odd from P=2 to P=43.

Then 3 evens:

P=47: n=43620
P=53: n=10102
P=59: n=181138

P=61 is back to odd again, and then 3 evens:

P=67 n=25982
P=71: n=64636
P=73: n=342

There may not be an odd:even pattern.

P=79 is computing now, but is taking a long time.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#70 2013-04-25 18:34:59

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Oops...for P=37, n=57126

...and P=79: n=621475

Last edited by phrontister (2013-04-25 18:36:38)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#71 2013-04-25 18:38:06

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Was that P = 37 the smallest one?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#72 2013-04-25 18:51:32

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,880

Re: My New Twin Prime Numbers

Yes. I tested it in your program and in mine.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#73 2013-04-25 18:57:15

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Okay, then that puts that conjecture to sleep.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#74 2013-04-25 19:30:30

Stangerzv
Member
Registered: 2012-01-30
Posts: 266

Re: My New Twin Prime Numbers

If there is no computer maybe it would take hundreds of years to verify this for sure. But now it takes less than a day:)

Offline

#75 2013-04-25 22:15:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: My New Twin Prime Numbers

Hi Stangerzv;

I doubt that anyone would ever be attempting this without a computer.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB