
New Users Post up here and introduce yourself! 
 LinkBack  Thread Tools  Display Modes 
September 21st, 2018, 09:56 AM  #1 
Newbie Joined: Sep 2018 From: tunis Posts: 27 Thanks: 0  How to generate prime numbers without the sieve of Eratosthenes??
Looping aⁿ⁻¹ mod n=1 The output is Primes and pseudo Primes (carmichael) After (a being the base), tested that the algo works only if a = (n1). for exemple n=7 1^7mod 7=1 2^7mod 7=1 3^7mod 7=1 4^7mod 7=1 5^7mod 7=1 6^7mod 7=1 prime n=9 1^9mod 9=1 2^9mod 9=4 3^9mod 9=0 4^9mod 9=7 5^9mod 9=7 6^9mod 9=0 7^9mod 9=4 8^9mod 9=1 not prime With this method the calculation becomes long. 

Tags 
eratosthenes, generate, numbers, prime, sieve 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Searching Win prgm to generate and check prime numbers  pstein  Number Theory  2  September 12th, 2017 08:44 PM 
Tricky way to generate huge list of prime numbers  mobel  Number Theory  9  September 26th, 2015 05:54 AM 
sieve of prime form 12 * i + 5  miket  Number Theory  1  April 29th, 2014 06:42 AM 
Quick Question Regarding Prime Sieve  Marcel777  Number Theory  6  December 27th, 2010 01:47 PM 
is this faster than the Eratosthenes sieve !?  zander_hack  Number Theory  33  February 10th, 2009 01:35 PM 