20100404, 18:09  #23 
Sep 2008
Kansas
3·17·59 Posts 
Did we just

20100405, 22:17  #24 
May 2007
Kansas; USA
2×5,087 Posts 
Thanks guys for all of the input. I'll see how much of it I can absorb and may get back with you if I have some questions.
One big reason I asked for this is that I want to incorporate algebraic factors into our starting bases script in the near future. Gary 
20100405, 22:20  #25  
May 2007
Kansas; USA
27BE_{16} Posts 
Quote:
Yep, I get it. lol Thanks. Saved me a bunch of time. Previously I had to manually come up with x and y values by trial and error. It needs to be extended to base 1024 but thanks to you guys, I can come up with the rest of them fairly easily now without having to resort to the trialanderror method. Thanks again. Last fiddled with by gd_barnes on 20100405 at 22:21 

20100405, 22:26  #26  
May 2007
Kansas; USA
2×5,087 Posts 
Quote:
Part of the reason that mine rambled so much is that it was something that was discovered over a period of 2 years and was edited overandover until the "pattern" of all such f became completely obvious to me; just in the last week. And...the reason it went on so long is that the project started out with only bases 332, then up to base 100, and then finally to base 1024. 

20100405, 23:29  #27 
May 2007
Kansas; USA
2×5,087 Posts 
I was able to understand most of the PARI code but could not understand the (Mod(1,p)) part, even after googling a PARI tutorial. To me, (Mod(1,p)) is the equivalent of saying:
z == (1 mod p) Therefore z would always have to be p1. So wouldn't it be easier to code: x=lift(sqrt(p1)) ? But that still doesn't make sense. Let me demonstrate: First, I'll restate the entire PARI code given for reference and change it to where it would create a table of factors <= 1024: for(m=1,255,p=4*m+1;if(isprime(p),x=lift(sqrt(Mod(1,p)));print(4*m" "x", "px))) Using an example for an fvalue (factor) (or pvalue in the PARI code) of 13, we have: p=4*m+1 Let m=3 so that p=13. Since p = 13 is prime, then: x=lift(sqrt(Mod(1,13))) x=lift(sqrt(12)) x=lift(3.46) How can x = 3.46? Even rounding up or down gives x = 3 or 4. But that is incorrect. For a factor (pvalue) of 13, x must be 5 or 8 as previously demonstrated. Can someone please tell me what I am missing? 10metreh, how did you come up with your f=250 thru 1000 table? Gary Last fiddled with by gd_barnes on 20100405 at 23:54 
20100406, 00:50  #28  
Aug 2006
11·13·41 Posts 
Quote:
The square root of 12 is about 3.46. It is an irrational real number x such that x * x = 12. The square root of 12 mod 13 is 5. It is an integer x such that x * x ≡ 12 (mod 13). 5 * 5 ≡ 25 ≡ 12 (mod 13). Pari has a special type, intmod, for numbers modulo integers. Mod(12, 13) is not 12 but the object "12 mod 13". If you square 12 you get 144, but if you square Mod(12, 13) you get Mod(1, 13) since 12^2 ≡ 144 ≡ 1 (mod 13). lift() is a command that transforms intmods to integers by dropping the modulus. centerlift() is the other Pari command for converting intmods to integers; while lift() chooses the smallest positive representative, centerlift() chooses the one with the smallest absolute value. So lift(Mod(1, 13)) == centerlift(Mod(1, 13)) since they're both 1, but lift(Mod(12, 13)) == 12 while centerlift(Mod(12, 13)) == 1. Last fiddled with by CRGreathouse on 20100406 at 00:54 

20100406, 01:04  #29  
May 2007
Kansas; USA
2×5,087 Posts 
Quote:
Ah, object oriented. I should have suspected as much. I've only had vague dealings with it in my programming career but enough to make clear sense of this now. Thanks for the detailed explanation. Now that I understand it, that's a brilliant piece of code. Not so much in its complexity but in how short and simplistic that it is. One of these days, I need to buy Pari and play around with it. For the various demonstrations I've seen on these forums, it's clearly very powerful. Last fiddled with by gd_barnes on 20100406 at 01:10 

20100406, 01:22  #30  
Aug 2006
11·13·41 Posts 
Yes, that's what I love about Pari: programs can be very short (and simple... but not simplistic). There's no need to mess around with all the stuff you'd have to do with lowerlevel, nonmathoriented languages.
Quote:
http://pari.math.ubordeaux.fr/download.html It's free! And easy to learn, to boot. Last fiddled with by CRGreathouse on 20100406 at 01:23 

20100406, 02:01  #31 
May 2007
Kansas; USA
2×5,087 Posts 
Excellent! Thanks.

20100406, 02:04  #32 
Aug 2006
16E7_{16} Posts 
If you have any trouble, let me know  I'd be happy to help.

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Algebraic factors in sieve files  pepi37  Conjectures 'R Us  95  20170704 13:37 
Riesel and Sierp numbers bases <= 1024  R. Gerbicz  Conjectures 'R Us  22  20091229 20:21 
Riesel/Sierp #'s for bases 3, 7, and 15  Siemelink  Conjectures 'R Us  105  20090904 06:40 
Algebraic factors  henryzz  ElevenSmooth  13  20071218 09:12 
Sierpinski/ Riesel bases 6 to 18  robert44444uk  Conjectures 'R Us  139  20071217 05:17 