mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

CRGreathouse 2010-08-10 23:39

[QUOTE=3.14159;224834]What I consider a general composite is any composite number, such as 35615990503459801, or 7948413665865367, or even 1208925819614629174706176.[/QUOTE]

I don't think that's what you mean! I think you would cry foul if I chose 2^101 - 1.

[QUOTE=3.14159;224834]So you waited until it generated 49 numbers?[/QUOTE]

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 2010-08-10 23:40

[QUOTE=science_man_88;224832]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"[/CODE] .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.[/QUOTE]

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.

science_man_88 2010-08-10 23:53

[QUOTE=science_man_88;224832]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"[/CODE] .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.[/QUOTE]


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.

science_man_88 2010-08-10 23:57

I could also see doing something like [CODE]for(n=2,100,if(Vec(input())==stringN + n,print(function to do it))[/CODE]

3.14159 2010-08-11 00:09

[QUOTE=CRGreathouse]I don't think that's what you mean! I think you would cry foul if I chose 2^101 - 1.
[/QUOTE]

Why? Because all of its bases are powers of two? And it would generate the first 100 powers of two?

CRGreathouse 2010-08-11 00:11

[QUOTE=science_man_88;224840]I could also see doing something like [CODE]for(n=2,100,if(Vec(input())==stringN + n,print(function to do it))[/CODE][/QUOTE]

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?[/quote]
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).")[/code]
and if it reads something like
[quote]What's the best CPU for double-checking?[/quote]
it just gives
[code]*** user error: cannot determine program from description[/code]

CRGreathouse 2010-08-11 00:15

[QUOTE=3.14159;224841]Why?[/QUOTE]

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.

3.14159 2010-08-11 00:35

[QUOTE=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"?
[/QUOTE]

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.

3.14159 2010-08-11 00:49

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..

science_man_88 2010-08-11 00:55

[QUOTE=CRGreathouse;224842]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).")[/code]
and if it reads something like

it just gives
[code]*** user error: cannot determine program from description[/code][/QUOTE]

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).

3.14159 2010-08-11 00:59

Well, a promising clue is right [URL="http://www.math.dartmouth.edu/~carlp/PDF/lower.pdf"]here[/URL].


All times are UTC. The time now is 21:14.

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