 My Math Forum How to generate prime numbers without the sieve of Eratosthenes??
 User Name Remember Me? Password

 New Users Post up here and introduce yourself!

 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 = (n-1). 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 Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post pstein Number Theory 2 September 12th, 2017 08:44 PM mobel Number Theory 9 September 26th, 2015 05:54 AM miket Number Theory 1 April 29th, 2014 06:42 AM Marcel777 Number Theory 6 December 27th, 2010 01:47 PM zander_hack Number Theory 33 February 10th, 2009 01:35 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top

Copyright © 2019 My Math Forum. All rights reserved.      