mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-08-10, 23:39   #188
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
What I consider a general composite is any composite number, such as 35615990503459801, or 7948413665865367, or even 1208925819614629174706176.
I don't think that's what you mean! I think you would cry foul if I chose 2^101 - 1.

Quote:
Originally Posted by 3.14159 View Post
So you waited until it generated 49 numbers?
I had a script generate random odds and test them until one had >= 20 bases to which it was a pseudoprime. The first I generated at that size happened to have 49 (or 50, or 48, depending on how you count it) bases.
CRGreathouse is offline   Reply With Quote
Old 2010-08-10, 23:40   #189
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
see I wanted it so people could write random functions without having to worry about what they input so I was thinking along Vec(input()) thanks to you then searching the vector for the specific phrase needed however this seems overly complicating.


so something like
Code:
Vec(input());forstep(i=1,length(input()),length(string to search for),if(v[i]=="a" && v[i+1]=="l"
.etc then checking for the next space after that to find the end of the format of the number then pretty much you know the rest lol.
Yes, I understand. If you're using input() then the user needs to surround the text with quote marks for that to work right. Well, I suppose you could convert it to a string -- this works on the assumption that the string has no special characters or spaces and that the resultant polynomial is undefined.
CRGreathouse is offline   Reply With Quote
Old 2010-08-10, 23:53   #190
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
see I wanted it so people could write random functions without having to worry about what they input so I was thinking along Vec(input()) thanks to you then searching the vector for the specific phrase needed however this seems overly complicating.


so something like
Code:
Vec(input());forstep(i=1,length(input()),length(string to search for),if(v[i]=="a" && v[i+1]=="l"
.etc then checking for the next space after that to find the end of the format of the number then pretty much you know the rest lol.

think i know a way to simplify this lol Vec(string1,string2,etc.) at least to the most common things you get annoyed with people asking then vector each string separately and walk through it does Vec(input())[i] with the individually vectored strings from the vector above. This might take a lot of variables though. that might shorten the code some(might increase time though) the hard part is putting the placement of these into variables etc. and then making sense of it all to write the code needed.

Last fiddled with by science_man_88 on 2010-08-10 at 23:54
science_man_88 is offline   Reply With Quote
Old 2010-08-10, 23:57   #191
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default

I could also see doing something like
Code:
for(n=2,100,if(Vec(input())==stringN + n,print(function to do it))
science_man_88 is offline   Reply With Quote
Old 2010-08-11, 00:09   #192
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
I don't think that's what you mean! I think you would cry foul if I chose 2^101 - 1.
Why? Because all of its bases are powers of two? And it would generate the first 100 powers of two?
3.14159 is offline   Reply With Quote
Old 2010-08-11, 00:11   #193
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I could also see doing something like
Code:
for(n=2,100,if(Vec(input())==stringN + n,print(function to do it))
That would wait for user input 99 times. Surely that's not what you want?

Ideally, the program wouldn't directly ask for user input at all. That way I could write a program that checks mersenneforum.org for updates, read those updates into a string, and send the string to the program, which would either output a program or give some sort of an error.

So if it read a post that said
Quote:
What are the primes from 1 to 100?
it might generate something like
Code:
userscript_mersenneforum_post83529()={
  forprime(p=1,100,print(p))
};
addhelp(userscript_mersenneforum_post83529, "userscript_mersenneforum_post83529(): Lists the primes p with 1 <= p <= 100. Assumes that 100 <= default(primelimit).")
and if it reads something like
Quote:
What's the best CPU for double-checking?
it just gives
Code:
***   user error: cannot determine program from description
CRGreathouse is offline   Reply With Quote
Old 2010-08-11, 00:15   #194
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

135338 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Why?
I'm trying to figure out what you mean by "general composite". In post #187 you define it to mean the same as "composite", but in that case why did you say "general composite" in post #157 rather than just "composite"?

I had the feeling that you had some special meaning like "generated uniformly at random" or "algorithmically irreducible". At the least, I supposed that you would exclude SNFS-type numbers.

In the end, I suppose only you can tell me what you meant in #157.
CRGreathouse is offline   Reply With Quote
Old 2010-08-11, 00:35   #195
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Quote:
Originally Posted by CRGreathouse
I'm trying to figure out what you mean by "general composite". In post #187 you define it to mean the same as "composite", but in that case why did you say "general composite" in post #157 rather than just "composite"?
Initially, I meant "general semiprimes", due to the comparisons between how many bases a 2nd kind Cunningham semiprime is pseudoprime to, compared to a general semiprime.

Ex: 63727551014401 = 5644801 * 11289601 vs. 289481332205123 = 7056779 * 41021737

Here are the false witness results:
The latter: No false witness below 1 million.
The former: Too many false witnesses to count. (Begins 1, 5, 7, 10, ..)

And this has been the consistent result for all comparisons between a 2nd kind Cunningham and a general semiprime. An explanation why is a Google search away, I guess.
My best guess is that the 2nd kind Cunninghams I am using have many prime factors when 1 is subtracted from them, and that is somehow correlated to the amount of false witnesses that they produce.

Last fiddled with by 3.14159 on 2010-08-11 at 00:48
3.14159 is offline   Reply With Quote
Old 2010-08-11, 00:49   #196
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

I'm going to try 2nd kind Cunninghams that lack so many prime factors whenever 1 is subtracted from them, to test my bullshit idea.

Debunked - Even when the only prime divisor that was necessarily there is two, here's the false witness sequence:

1, 2, 4, 6, 7, 8, 9, 16, 18, 21, 24, 28, 32, 36, 42, 49, 50, 54, 63, 64, 72, 75, 81, 84, 85, 96, 98, 112, 128, 142, 144, 145, 150, 162, 168, 170, 175, 185, 189, 190, 191, 196, 200, 213, 216, 235, 252, 255, 256, 263, 285, 288, 290, 293, 294, 295, 300, 305, 307, 323, 324, 336, 337, 340, 343, 350, 358, 359, 378, 382, 384, 392, 401, 409, 419, 421, 426, 435, 441, 448, 450, 451, 454, 461, 486, 497, 503, 512, 521, 523, 525, 526, 533, 537, 541, 551, 554, 555, 567, 568, 570, 576, 578, 580, 583, 600, 605, 610, 625, 629, 631, 646, 648, 665, 672, 674, 675, 680, 681, 682, 689, 698, 700, 703, 705, 715, 722, 727, 729, 740, 745, 751, 756, 760, 764, 765, 784, 789, 799, 800, 802, ...


Whatever gives 2p^2-p so many false witnesses..

Last fiddled with by 3.14159 on 2010-08-11 at 00:54
3.14159 is offline   Reply With Quote
Old 2010-08-11, 00:55   #197
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
That would wait for user input 99 times. Surely that's not what you want?

Ideally, the program wouldn't directly ask for user input at all. That way I could write a program that checks mersenneforum.org for updates, read those updates into a string, and send the string to the program, which would either output a program or give some sort of an error.

So if it read a post that said

it might generate something like
Code:
userscript_mersenneforum_post83529()={
  forprime(p=1,100,print(p))
};
addhelp(userscript_mersenneforum_post83529, "userscript_mersenneforum_post83529(): Lists the primes p with 1 <= p <= 100. Assumes that 100 <= default(primelimit).")
and if it reads something like

it just gives
Code:
***   user error: cannot determine program from description
I was thinking of making pari write the program itself before taking over the world lol (just joking about the taking over the world). no I don't want to ask users input 99 times I'd have to make a variable then that = Vec(input) then check that vector.

I need to learn to read more lol.

maybe if it finds something it can't decipher it could suggest questioning about what it can't figure out.

a program making a program seems like a virus but this idea sounds cool. one thing I've thought of is using a text to speech translator like what Microsoft has in Windows(though if possible better) and instead of turning it to speech interpret its meaning and spit out a program based on what it can understand(hopefully a lot).

Last fiddled with by science_man_88 on 2010-08-11 at 01:27
science_man_88 is offline   Reply With Quote
Old 2010-08-11, 00:59   #198
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Well, a promising clue is right here.

Last fiddled with by 3.14159 on 2010-08-11 at 01:00
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 06:55.


Fri Aug 6 06:55:00 UTC 2021 up 14 days, 1:23, 1 user, load averages: 2.48, 2.66, 2.72

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.