20220313, 03:41  #12  
"Tucker Kao"
Jan 2020
Head Base M168202123
2·389 Posts 
Quote:
When the thread title showed up, I immediately thought all the multiples of 6 were ended in the dozenal 0 or 6. 6n+1 end in 1 or 7, 6n+5 end in 5 or Ɛ. Last fiddled with by tuckerkao on 20220313 at 03:50 

20220313, 14:15  #13 
Feb 2017
Nowhere
1011101101111_{2} Posts 
If memory serves, the PariGP function nextprime(n) merely insures that candidates ≥ n are in one of the residue classes relatively prime to the modulus 210 = 2*3*5*7 before doing a "brutal" BPSW pseudoprime test. (The function is written to make sure it doesn't overlook the primes 2, 3, 5, and 7. It may have other provisions for "small" inputs.) The function returns the first number ≥ n that "passes" the test.
Obviously, this function is not intended for very large inputs. As to using the binomial theorem to determine 2^{n}  1 (mod 3), it might be clearer to note that 2 = 3 + (1), so that 2^{n} = (3 + (1))^{n}. In the binomial expansion of (3 + (1))^{n}, every term except (1)^{n} is divisible by 3. Thus 2^{n} == (1)^{n} (mod 3). Of course, one can skip the binomial theorem altogether and just say, 2 == 1 (mod 3) whence 2^{n} == (1)^{n} (mod 3). 
20220313, 18:18  #14  
"Καλός"
May 2018
5·73 Posts 
Quote:
The case considered in their thread is concerned with the quoted positive integer n being an even number and 2^{n} = 3 × Quotient + (1)^{n} with (1)^{n} = 1 so that 2^{n} = 3 × Quotient + 1, 2(2^{n}) = 2(3 × Quotient + 1), 2^{n+1} = 6 × Quotient + 2, and finally 2^{n+1}  1 = 6 × Quotient + 1, where the odd number p in my previous post is p = n + 1. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How do I calculate chances of finding a prime, while testing multiple exponents?  drkirkby  Math  4  20210413 12:58 
Linux and multiple GPU  bgbeuning  GPU Computing  52  20160609 05:26 
Using multiple PCs  numbercruncher  Information & Answers  18  20140417 00:17 
Are multiple gpu's necessary for CUDA...  WraithX  GPU Computing  16  20120322 10:44 
Multiple systems/multiple CPUs. Best configuration?  BillW  Software  1  20030121 20:11 