Wednesday, December 9, 2020

Prime numbers generator

Euler, my master made a terrific prime number generator years ago. The formula was m*m-m+41.

I thought m*m+m+1 was a great prime number generator. This was two years back when I wrote the paper on "Rational Number Series". Then I followed Euler somewhat and made it m*m+m+41. Also I tried m*m+m+2657.

With m*m+m+1, 311 prime numbers are generated for m equal to 1 to 1000.

With m*m+m+41, 580 prime numbers are generated for m equal to 1 to 1000.

With m*m+m+2657, 498 prime numbers are generated for m equal to 1 to 1000.

Here are the snapshots of the results.



Special thanks to onlinegdb.com for the C compiler.
My point in writing this article is this. Euler was so great. It was 17th century. Still he managed to get the magical number of 41. 
If you are curious how 2657; well it is nearest odd integer to 16.3 into 163. 163 being a favorite number of Ramanujan.
I think we can go ahead and try with nearest odd integer to 1.1 into 11, 1.9 into 19, 4.3 into 43 or 6.7 into 67.  Please try these if you are stuck up wondering what to do during COVID.
Have a nice day, dear blog readers. And in case you can beat by generating more prime numbers; do let me know.


No comments:

Post a Comment