mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-10-12, 16:53   #1497
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
is there a formula for telling which in a lucas sequence are prime ?
Sure, take any of the standard formulas for prime-testing and substitute the formula for a member of the Lucas sequence for the number.

But that would be very slow. Are you looking for an algorithm instead?
CRGreathouse is offline   Reply With Quote
Old 2010-10-12, 17:34   #1498
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Sure, take any of the standard formulas for prime-testing and substitute the formula for a member of the Lucas sequence for the number.

But that would be very slow. Are you looking for an algorithm instead?
my latest idea if no prime finding formula that can work fast can be found is to create something that will feed the exponents into findrec in specific possible orders increasing that may find multiple lucas sequences I'm unsure right now though.
science_man_88 is offline   Reply With Quote
Old 2010-10-12, 18:29   #1499
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
my latest idea if no prime finding formula that can work fast can be found is to create something that will feed the exponents into findrec in specific possible orders increasing that may find multiple lucas sequences I'm unsure right now though.
Well, you have the code... try it!
CRGreathouse is offline   Reply With Quote
Old 2010-10-14, 00:37   #1500
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

might need to rethink lol 39! possible for 39 and then 39!/2! for 38 etc. lol
science_man_88 is offline   Reply With Quote
Old 2010-10-17, 23:47   #1501
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default something new ?

Code:
for(i=2,#mersenne,print(isprime(floor(mersenne[i]^exp(1)/mersenne[i-1]))))
gives me false consistently, care to see if it's done already ? etc. I think someone else got in my account as I don't remember adding an image.

Last fiddled with by science_man_88 on 2010-10-17 at 23:52
science_man_88 is offline   Reply With Quote
Old 2010-10-18, 02:13   #1502
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

I was just pondering..

Imagine you choose a random 210-digit odd number to factor.

What are the odds that it has no factor ≤ 30 digits ?

Ex:
Code:
765223385698389926571242942756698700016608850019007376399764250461012579493486533505154279222065824923099207583225846866415511389377654307908279943765426193326813047827405221065725982667368472098358003394603467 = 77771442250823086981801725238987802825302970789365898005146018089 * 9839387872356080094484924867666017102610781172377705317233177547076926514496969631181594854116446488590453712956846616476891085418145551273102803

Last fiddled with by 3.14159 on 2010-10-18 at 02:14
3.14159 is offline   Reply With Quote
Old 2010-10-18, 04:55   #1503
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Roughly \frac{2e^{-\gamma}}{\log10^{30}}\approx1.6\%.
CRGreathouse is offline   Reply With Quote
Old 2010-10-18, 12:39   #1504
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

I find that exp(1) seems to work in numerous places I tried Pi in the same places and it didn't always turn out false.
science_man_88 is offline   Reply With Quote
Old 2010-10-19, 00:53   #1505
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Quote:
Originally Posted by Charles View Post
Roughly \frac{2e^{-\gamma}}{\log10^{30}}\approx1.6\%.
Even though there are more potential factors ≥ 1000000000000000000000000000057 than there are of the lesser primes?

Last fiddled with by 3.14159 on 2010-10-19 at 00:53
3.14159 is offline   Reply With Quote
Old 2010-10-19, 01:10   #1506
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Even though there are more potential factors ≥ 1000000000000000000000000000057 than there are of the lesser primes?
Correct. In fact, more than 30% of numbers have no prime factors greater than their square root. Think about it: there more than 90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 times as many primes between 1e10 and 1e100 as between 1 and 1e10, and yet 30% of the numbers near 1e100 use none of those many large primes.
CRGreathouse is offline   Reply With Quote
Old 2010-10-19, 01:25   #1507
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by Charles View Post
Correct. In fact, more than 30% of numbers have no prime factors greater than their square root. Think about it: there more than 90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 times as many primes between 1e10 and 1e100 as between 1 and 1e10, and yet 30% of the numbers near 1e100 use none of those many large primes.
This statement can be distorted into some strange sort of crackpottery about some obscure pseudo-proof about some obscure pseudo-theorem.

Last fiddled with by 3.14159 on 2010-10-19 at 01:25
3.14159 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:10.


Fri Aug 6 23:10:41 UTC 2021 up 14 days, 17:39, 1 user, load averages: 4.91, 4.22, 4.03

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.