Jump to content

Recommended Posts

Posted

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

 

 

 

Posted
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? 
 

 

Posted
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

Posted
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.

 

  • 1 year later...
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.