jonas garden Posted December 10, 2020 Share Posted December 10, 2020 hey everyone , i need your help about this exercice , i coudn't find the solution ''write a program in php console which finds the largest sequence of prime numbers such as their sum and product is a prime number '' Spoiler Spoiler Link to comment Share on other sites More sharing options...
Ghideon Posted December 10, 2020 Share Posted December 10, 2020 1 hour ago, jonas garden said: ''write a program in php console which finds the largest sequence of prime numbers such as their sum and product is a prime number '' Are you sure about the formulation? If you multiply primes from a sequence of primes how could the result be a prime number? Link to comment Share on other sites More sharing options...
jonas garden Posted December 10, 2020 Author Share Posted December 10, 2020 Just now, Ghideon said: Are you sure about the formulation? If you multiply primes from a sequence of primes how could the result be a prime number? YES , wait and if we will say sum/product Link to comment Share on other sites More sharing options...
Ghideon Posted December 10, 2020 Share Posted December 10, 2020 1 hour ago, jonas garden said: YES , wait and if we will say sum/product Sorry, that is not very clear. Please explain, preferably with an example. There is something about the exercise formulation I do not understand. Two primes A and B have the product C=A*B. The product, C, can't be a prime. Link to comment Share on other sites More sharing options...
Doctor Derp Posted September 30, 2022 Share Posted September 30, 2022 The modulus operator is the barebones method of determining prime numbers. Keyword search: modulus operator prime. There is a wealth of knowledge plastered across the internet on the topic. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now