mersenneforum.org new formula for prime numbers?
 Register FAQ Search Today's Posts Mark Forums Read

 2022-11-15, 00:42 #1 Harklo73   Jan 2022 2×32 Posts new formula for prime numbers? Hello everyone, I found an interesting formula in a book. It is the formula n^2-9n+61. It produces a lot of prime numbers. Currently i am checking range 0k-100k Found a lot of primes! Hope to hear more about this. Best Regards.
 2022-11-15, 04:46 #2 LaurV Romulan Interpreter     "name field" Jun 2011 Thailand 240518 Posts Please post here the largest prime you found. Only one, please. Chose the largest, and tell us how you found it.
2022-11-15, 06:09   #3
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100111010010112 Posts

Quote:
 Originally Posted by Harklo73 new formula for prime numbers?
Please explain what do you think the word "formula" means.

 2022-11-15, 13:14 #4 Harklo73   Jan 2022 1810 Posts largest prime number i found so far with n^2-9n+61 This is the largest prime number i found so far: (2^27450)^2-(9*(2^27450))+61 Currently i am checking k until 30k. I found the prime with openPFGW. Best Regards.
 2022-11-15, 13:25 #5 Harklo73   Jan 2022 2×32 Posts its not a formula you are right You are right, it is not a formula but a sequence. Best Regards.
 2022-11-15, 14:28 #6 Dr Sardonicus     Feb 2017 Nowhere 22·32·173 Posts It's certainly not new. n^2 - 9*n + 61 = (n-4)^2 - (n-4) + 41 is merely a shift of Euler's "prime-generating polynomial" n^2 - n + 41.
2022-11-16, 17:27   #7
bhelmes

Mar 2016

1A416 Posts

Quote:
 Originally Posted by Harklo73 You are right, it is not a formula but a sequence. Best Regards.
The polynomial f(n)=n²-n+41 has the discriminant b²-4c=1-4*41=-163,

For this special case I recommend a sieve procedure similar like the sieve of Eratosthenes:
http://devalco.de/basic_polynomials/...?a=1&b=-1&c=41

For a more general point of view take:
http://devalco.de/poly_sec.php

If you want to speed up the finding for primes for f(n)=n²-n+41 I suggest a quadratic presieve
and then the check for primes.

Have a lot of fun with the theory and with the programming.

 2022-11-17, 14:34 #8 Harklo73   Jan 2022 2×32 Posts sequence Thank you! I will start with it immediately.
 2022-11-19, 19:35 #9 Harklo73   Jan 2022 2·32 Posts Siever Hello everyone, I made a siever for n^2-n+41. Its written in Python so its very slow. I am working on a c or freebasic version now. I keep you updated.

 Similar Threads Thread Thread Starter Forum Replies Last Post Bezzar Miscellaneous Math 4 2021-01-25 04:26 Hugo1177 Miscellaneous Math 9 2020-10-17 04:43 Hugo1177 Miscellaneous Math 1 2020-08-23 17:52 Godzilla Miscellaneous Math 10 2018-09-27 02:23 TimSorbet Miscellaneous Math 12 2009-03-04 16:51

All times are UTC. The time now is 23:07.

Mon Feb 6 23:07:24 UTC 2023 up 172 days, 20:35, 1 user, load averages: 1.19, 1.22, 1.11