|
|
|
|
|
|
|
|
CTK Exchange
ranjitr303
Member since Nov-23-10
|
Dec-01-10, 10:02 AM (EST) |
|
"prime finder"
|
take m as a number such that (m-1)and (m+1) are prime. eg: 4, 6, 12, etc. therefore either (n*m +1) and/or (n*m -1) is prime. where n is any natural number. eg: 2*4+1=9 and 2*4-1=7 ; 7 is prime 3*4+1=11 and 3*4-1=10 ; 11 is prime 7*6+1=43 and 7*6-1=41 ;43 and 41 are prime.values of n cannot be (n*m +1)*(n*m -1)+n and (n*m +1)*(n*m -1)-n. eg: for 2*4+1=9 and 2*4-1=7 ;with m=4; n cannot be 9*7+2=65 and 9*7-2=61 i.e. 65*4+1=261; 65*4-1=259; 61*4+1=245; 61*4-1=243; 261, 259, 245, and 243 are not primes. ranjitr |
|
Alert | IP |
Printer-friendly page |
Reply |
Reply With Quote | Top |
|
|
C Reineke
Member since Jul-9-10
|
Dec-02-10, 07:44 AM (EST) |
|
1. "RE: prime finder"
In response to message #0
|
< …where n is any natural number.> What happens if n=m? n^2-1=(n+1)*(n-1) is never a prime number! Hence we have to check n^2+1. For n=m=12 we have n^2+1=145 ! For n=m=18 (17,19) we have n^2+1=325! Regards Chris
|
|
Alert | IP |
Printer-friendly page |
Reply |
Reply With Quote | Top |
|
|
You may be curious to have a look at the old CTK Exchange archive. Please do not post there.
Copyright © 1996-2018 Alexander Bogomolny
|
|