Jump to content

Featured Replies

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

 

 

 

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? 
 

 

  • Author
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

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

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

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.