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 19:44

[QUOTE=3.14159;224784]Anyone have any idea how to save your programs, so I don't have to continuously keep defining them every time I open PARI/GP?[/QUOTE]

Listen to wise science_man_88:

[QUOTE=science_man_88;224785]maybe like CRG suggest we should all make scripts to write it to file and then read from the file the next time we open it I haven't done it yet but it should help lol.[/QUOTE]

In fact, if you edit your .gprc file (in the "C:\Program Files\PARI" folder or similar) to include the line
[code]read "foo.gp"[/code]
then every time you open Pari it will read that file for you.

I *strongly* recommend this.

CRGreathouse 2010-08-10 19:55

[QUOTE=3.14159;224787]To axn: Here's another wonderful pseudoprime number for you: 9479779630110266401 is pseudoprime to bases: 10, 17, 24, 36, 40, 54, 59, 60, 61, 68, 77, 90, 96, 98, 100, 102, 109, 127, 135, 139, 147, 150, 151, 153, 160, 179, 199, 203, 216, 218, 236, 242, 244, 247, 250, 254, 255, 263, 272, 278, 281, 287, 289, 299, 308, 319, 327, 341, 347, 349, 358, 360, 371, 375, 381, 384, 392, 397, 398, 406, 417, 425, 431, 433, 434, 436, 443, 451, 462, 479, 486, 497, 508, 523, 526, 531, 537, 545, 549, 553, 554, 556, 562, 563, 571, 574, 576, and 583.

Meh, there's no point in that, as I can collect an infinite amount of these.[/QUOTE]

Well, any odd composite is a strong pseudoprime to some base, right?

3.14159 2010-08-10 20:00

[QUOTE=CRGreathouse]Well, any odd composite is a strong pseudoprime to some base, right?
[/QUOTE]

Meh. There's rarely any other false witnesses besides 1. Or, can you try a search for a general composite that turns up 20 false witnesses?

axn 2010-08-10 20:14

[QUOTE=CRGreathouse;224790]Well, any odd composite is a strong pseudoprime to some base, right?[/QUOTE]

Sure about that (after accounting for trivial bases)?

CRGreathouse 2010-08-10 20:19

[QUOTE=3.14159;224791]Meh. There's rarely any other false witnesses besides 1.[/QUOTE]

I wasn't counting 1.

[QUOTE=3.14159;224791]Or, can you try a search for a general composite that turns up 20 false witnesses?[/QUOTE]

I generated random 200-bit odd numbers until I found one that had at least 20 bases to which it was a strong pseudoprime. I found
2459914847011133427927355231834335535322382601220307217655951
which has 49 such bases.

Depending on what you allow as "general composites" there may be faster techniques.

CRGreathouse 2010-08-10 20:22

[QUOTE=axn;224792]Sure about that (after accounting for trivial bases)?[/QUOTE]

My proof was showing that 'the other' trivial base always works, so I'm sure in what I said but certainly wouldn't agree that removing both will always leave some bases. (I suspect that it *usually* would leave none, but I can't prove that suspicion at this time and wouldn't bet anything on it one way or the other.)

CRGreathouse 2010-08-10 20:36

[QUOTE=science_man_88;224781]have i made sense yet ?[/QUOTE]

Not to me. Maybe start a new thread and ask if anyone can follow it?

3.14159 2010-08-10 20:41

[QUOTE=CRGreathouse]I generated random 200-bit odd numbers until I found one that had at least 20 bases to which it was a strong pseudoprime. I found
2459914847011133427927355231834335535322382601220307217655951
which has 49 such bases.[/QUOTE]

:orly owl: Please, tell me which 49 bases it is pseudoprime to.

Also: The number factors as 281 * 1013 * 2218207 * 25849700567 * 481506753362074034556725949990356011.

CRGreathouse 2010-08-10 20:46

[QUOTE=3.14159;224798]Please, tell me which 49 bases it is pseudoprime to.[/QUOTE]

No thanks, that would be too much work. But feel free to work them out yourself if you like.

To duplicate my count note that I include those bases strictly between 1 and n. If you include 1 that makes 50 bases.

science_man_88 2010-08-10 20:52

[CODE]scriptwriter(name,input()) = print(name"() ={");addhelp(name,input());[/CODE]

as you can see I'm trying to make a description interpreting script writer to give CRGreathouse a break lol any advice ?

CRGreathouse 2010-08-10 20:59

[QUOTE=science_man_88;224800][CODE]scriptwriter(name,input()) = print(name"() ={");addhelp(name,input());[/CODE]

as you can see I'm trying to make a description interpreting script writer to give CRGreathouse a break lol any advice ?[/QUOTE]

I used to edit text on Windows with Crimson Editor, where I had a nice macro. I would type the name of the function and its arguments, like

[code]foo(a,b)[/code]
and press the shortcut key to transform this to
[code]foo(a,b)={

};
addhelp(foo, "foo(a, b): ");[/code]
by appropriate use of 'duplicate line', 'next word', etc. functions.

:smile:

Now I'm using gedit on Linux and Notepad++ on Windows; I like them better, overall, but I have no such feature. Pity.


All times are UTC. The time now is 06:55.

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