mersenneforum.org  

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

Reply
 
Thread Tools
Old 2011-08-08, 19:19   #2289
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

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)
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 is offline   Reply With Quote
Old 2011-08-08, 21:01   #2290
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
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)
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.
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.
found a typo in the code. never mind it's twice as slow.

Last fiddled with by science_man_88 on 2011-08-08 at 21:08
science_man_88 is offline   Reply With Quote
Old 2011-08-12, 15:23   #2291
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Pardon the question, but has anyone found the (1013)th prime? Or (1014)th prime?

I've only found up to 1012

Edit: Scratch that, found way more past 1013 and 1014.

Last fiddled with by 3.14159 on 2011-08-12 at 15:28
3.14159 is offline   Reply With Quote
Old 2011-08-13, 03:00   #2292
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

prime(10^19) = 465675465116607065549.
CRGreathouse is offline   Reply With Quote
Old 2011-08-13, 12:20   #2293
cmd
 
cmd's Avatar
 
"(^r'°:.:)^n;e'e"
Nov 2008
;t:.:;^

17478 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
prime(10^19) = 465675465116607065549.
http://factordb.com/index.php?id=1100000000442493681

i)..prp<309>

|\| |_| |_ |_

Last fiddled with by cmd on 2011-08-13 at 12:29 Reason: cf1234
cmd is offline   Reply With Quote
Old 2011-08-13, 13:57   #2294
cmd
 
cmd's Avatar
 
"(^r'°:.:)^n;e'e"
Nov 2008
;t:.:;^

33·37 Posts
Question ..*9<73

Quote:
Originally Posted by cmd View Post
http://factordb.com/index.php?id=1100000000442497462

|) |= |\/| ()

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

Demo=andiamo (venice~it)s|_ang

Last fiddled with by cmd on 2011-08-13 at 14:13 Reason: |_= L
cmd is offline   Reply With Quote
Old 2011-09-01, 00:13   #2295
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default 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).
science_man_88 is offline   Reply With Quote
Old 2011-09-01, 04:11   #2296
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
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).
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.)
CRGreathouse is offline   Reply With Quote
Old 2011-09-05, 01:22   #2297
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

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)
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]))))))
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.
Attached Files
File Type: zip aliquot197.zip (192.8 KB, 69 views)

Last fiddled with by science_man_88 on 2011-09-05 at 01:38
science_man_88 is offline   Reply With Quote
Old 2011-09-05, 22:16   #2298
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
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)
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]))))))
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.
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]))))
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) .

Last fiddled with by science_man_88 on 2011-09-05 at 22:48
science_man_88 is offline   Reply With Quote
Old 2011-09-05, 23:58   #2299
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

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

Last fiddled with by science_man_88 on 2011-09-05 at 23:58
science_man_88 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 15:31.


Fri Aug 6 15:31:41 UTC 2021 up 14 days, 10 hrs, 1 user, load averages: 2.36, 2.72, 2.83

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.