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)

science_man_88 2011-08-08 19:19

[CODE]LLRM(X) = s=Mod(14,2^X-1);for(x=1,(X-3)/2,s=Mod(s^4,2^x-1)-4*Mod(s^2,2^X-1)+2);if(s==0,1,0)[/CODE]

yeah I need a better name than this but I used something CRG talked about to speed it up it originally only beat lucaslehmer(x) under 1279 now at over 9000 + it seems like 10 + times faster than it.

science_man_88 2011-08-08 21:01

[QUOTE=science_man_88;268689][CODE]LLRM(X) = s=Mod(14,2^X-1);for(x=1,(X-3)/2,s=Mod(s^4,2^x-1)-4*Mod(s^2,2^X-1)+2);if(s==0,1,0)[/CODE]

yeah I need a better name than this but I used something CRG talked about to speed it up it originally only beat lucaslehmer(x) under 1279 now at over 9000 + it seems like 10 + times faster than it.[/QUOTE]

[CODE](16:16)>LLRM(3217)
%40 = 1
(16:16)>##
*** last result computed in 32 ms.
(16:16)>lucaslehmer(3217)
%41 = 1
(16:16)>##
*** last result computed in 281 ms.
(16:16)>LLRM(9689)
%42 = 1
(16:17)>##
*** last result computed in 485 ms.
(16:17)>lucaslehmer(9689)
%43 = 1
(16:17)>##
*** last result computed in 4,922 ms.
(16:17)>LLRM(21701)
%44 = 1
(16:23)>##
*** last result computed in 4,156 ms.
(16:23)>lucaslehmer(21701)
%45 = 1
(16:24)>##
*** last result computed in 39,562 ms.[/CODE]

found a typo in the code. never mind it's twice as slow.

3.14159 2011-08-12 15:23

Pardon the question, but has anyone found the (10[sup]13[/sup])th prime? Or (10[sup]14[/sup])th prime?

I've only found up to 10[sup]12[/sup]

Edit: Scratch that, found way more past 10[sup]13[/sup] and 10[sup]14.[/sup]

CRGreathouse 2011-08-13 03:00

prime(10^19) = 465675465116607065549.

cmd 2011-08-13 12:20

[QUOTE=CRGreathouse;268994]prime(10^19) = 465675465116607065549.[/QUOTE]

[url]http://factordb.com/index.php?id=1100000000442493681[/url]

i)..prp<309>

|\| |_| |_ |_

cmd 2011-08-13 13:57

..*9<73
 
[QUOTE=cmd;269010][url]http://factordb.com/index.php?id=1100000000442493681[/url]

i)..prp<309>

|\| |_| |_ |_[/QUOTE]

[url]http://factordb.com/index.php?id=1100000000442497462[/url]

|) |= |\/| ()

[url]http://factordb.com/index.php?id=1100000000442493555[/url]

Demo=andiamo (venice~it)s|_ang

science_man_88 2011-09-01 00:13

64-bit
 
I can't figure which one it is I upgraded to the 64-bit windows OS disk I had ( the 32 and 64 are in the same packaging).

CRGreathouse 2011-09-01 04:11

[QUOTE=science_man_88;270501]I can't figure which one it is I upgraded to the 64-bit windows OS disk I had ( the 32 and 64 are in the same packaging).[/QUOTE]

Do you mean what version of Windows or what version of PARI?

There isn't a released 64-bit Windows version of PARI/GP that has readline and the other nice features yet; there are serious difficulties building it.

For Windows, right-click My Computer and choose Properties; this should tell you what version you're using. (Of course this is off-topic here.)

science_man_88 2011-09-05 01:22

1 Attachment(s)
a few codes I've sent through PM:

[CODE]ali(n)=a=n-1;b=[];for(x=0,floor(.5*a),if(x==0,if(sigma(a^2)-a^2==n,b=concat(b,a^2)),if(sigma((x)*(a-x))-((x)*(a-x))==n,b=concat(b,(x)*(a-x)))));b=vecsort(b,,8)[/CODE]

checks up to floor(.5*a) in matching pairs multiplying them together and if the sigma checks go through puts them into b. sorts the vector at the end.


[CODE]for(z=6,6,print(z);for(x=1,#ali(z),print("\t"ali(z)[x]);for(y=1,#ali(ali(z)[x]),print("\t\t"ali(ali(z)[x])[y]);for(h=1,#ali(ali(z)[x])[y],print("\t\t\t"ali(ali(ali(z)[x])[y])[h]);for(i=1,#ali(ali(ali(z)[x])[y])[h],print("\t\t\t\t"ali(ali(ali(ali(z)[x])[y])[h])[i]))))))[/CODE]

z can be changed to any group of consecutive numbers this basically does the previous one on top of each other forming generation in later talk I believe I talk of it as aligen(n), please note these codes only find ones that have (n-1) split into 2 divisors.

the attachment has been scanned since I want to double check it, it represents most that I have tried with these codes.

science_man_88 2011-09-05 22:16

[QUOTE=science_man_88;270856]a few codes I've sent through PM:

[CODE]ali(n)=a=n-1;b=[];for(x=0,floor(.5*a),if(x==0,if(sigma(a^2)-a^2==n,b=concat(b,a^2)),if(sigma((x)*(a-x))-((x)*(a-x))==n,b=concat(b,(x)*(a-x)))));b=vecsort(b,,8)[/CODE]

checks up to floor(.5*a) in matching pairs multiplying them together and if the sigma checks go through puts them into b. sorts the vector at the end.


[CODE]for(z=6,6,print(z);for(x=1,#ali(z),print("\t"ali(z)[x]);for(y=1,#ali(ali(z)[x]),print("\t\t"ali(ali(z)[x])[y]);for(h=1,#ali(ali(z)[x])[y],print("\t\t\t"ali(ali(ali(z)[x])[y])[h]);for(i=1,#ali(ali(ali(z)[x])[y])[h],print("\t\t\t\t"ali(ali(ali(ali(z)[x])[y])[h])[i]))))))[/CODE]

z can be changed to any group of consecutive numbers this basically does the previous one on top of each other forming generation in later talk I believe I talk of it as aligen(n), please note these codes only find ones that have (n-1) split into 2 divisors.

the attachment has been scanned since I want to double check it, it represents most that I have tried with these codes.[/QUOTE]

made a remake of aligen:

[CODE]aligen2(w,s)=c=[];for(z=w,s,for(h=1,#c,if(z==c[h],next(2)));print(z);for(x=1,#ali(z),if(ali(z)[x]<s&&ali(z)[x]>w,c=concat(c,ali(z)[x]));print("\t"ali(z)[x]);for(y=1,#ali(ali(z)[x]),print("\t\t"ali(ali(z)[x])[y]))))[/CODE]

this checks the middle generation only ( my original thought did both generations ( I simplified to 2) back but was much slower I think), and puts the values between the limits in a vector that gets checked next z value etc. to check if it can be skipped without loss of information ( except maybe an extra generation, but for some the next one up is in the same limits and still does get checked) .

science_man_88 2011-09-05 23:58

connecting the loose ends for aliquot3.txt gives me:

[CODE]3
4
9
15
33
87
249
553
949
1273
247
1205
1673
3029
3893
4313
5129
9353
10229
11993
12629
13193
13529
13973
14453
14873
14933[/CODE]


All times are UTC. The time now is 22:54.

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