as all prime no. greater than 3 are of the form 6n+1 or 6n-1 so start checking for all these numbers and if they both are prime then they will make pair count the pair no. as well as u move on
Ankit On Jan 11, 9:23 pm, snehal jain <[email protected]> wrote: > you will be given an input no. n u have to output nth twin pair.. > for eg input 1 output(3,5) > input 5 output (29,31) > > twin pair is a pair in which prime no. differ by 2.. (3,5) , (5,7) > (11,13), (17,19) (29,31) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
