Math. Scientist 31, 58–59 (2006) Printed in England Applied Probability Trust 2006 LETTERS TO THE EDITOR Dear Editor, An improved prime-number generator In the history of science, we find that many mathematicians have tried to obtain a prime- number generator for all primes, and failed to do so. Among those partially successful prime-number generators are 4n - 1, 6n + 5, n 2 + n + 17, n n + n + 41, n 2 - 79n + 1601, 4n 2 + 170n + 1847, 4n 2 + 4n + 59, .... The formula for primes (n 2 + n + 41) given by the famous Swiss mathematician Leonhard Euler (1707–1783) can generate all primes up to n = 39 starting with n = 0. But, while it can generate 40 primes, for n = 40, the formula gives 1681 = 41 2 which is not a prime. In India, Srinivasa Ramanujan (1887–1920) also tried to obtain prime-number generators. He had tried to express primes in the form ax 2 + by 2 , where a and b are constant numbers and x and y are variables, see table 1. In order to make table 1 clearer, consider n = 3 in (4n + 1) for which the prime thus obtained is 13 where 13 = 2 2 + 3 2 , i.e. x = 2 and y = 3. An attractive feature of primes is their irregular distribution. It is thus very difficult to establish any of their properties successfully. The Prussian mathematician Christian Goldbach (1690–1769) conjectured that any even number greater than 2 could be expressed as the sum of two primes. But, so far, no mathematician has been able to prove this conjecture. I have formulated a prime-number generator which can generate more primes than Euler’s formula, so that I may claim my prime-number generator to be an improvement on his. Table 1. Structure of primes Form of expression 4n + 1 x 2 + y 2 8n + 1, 8n + 3 x 2 + 2y 2 8n + 1, 8n - 1 x 2 - 2y 2 60n - 7 5x 2 - 3y 2 28n + 1, 28n + 9, 28n + 25 x 2 - 7y 2 Received 23 February 2005; revision received 27 April 2005. 58