Difference between revisions of "Manuals/calci/LISTPRIMES"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | <div style="font-size:30px">'''LISTPRIMES( | + | <div style="font-size:30px">'''LISTPRIMES (Max,Min,IndexOnly)'''</div><br/> |
− | *<math> | + | *<math>Max</math> is the upper limit. |
− | *<math> | + | *<math>Min</math> is the lower limit. |
− | *<math> | + | *<math>IndexOnly</math> is the specified position of a prime number. |
==Description== | ==Description== | ||
Line 10: | Line 10: | ||
*But 6 is not prime, because 6 can be divided by 1,2,3 and 6. Such numbers are called composite numbers. | *But 6 is not prime, because 6 can be divided by 1,2,3 and 6. Such numbers are called composite numbers. | ||
*Also the number 0 and 1 are neither prime nor composite. | *Also the number 0 and 1 are neither prime nor composite. | ||
− | *In <math> LISTPRIMES( | + | *In <math> LISTPRIMES(Max,Min,IndexOnly)</math>, gives the list of prime numbers between the range <math> max </math> and <math>min</math>. |
− | *<math> | + | *<math>Max </math> is the upper limit value and <math>Min</math> is the lower limit value |
− | *And <math> | + | *And <math>IndexOnly</math> is the position of the prime number value. <math>IndexOnly</math> value is optional. |
*Suppose we are not giving the Index value, it will show all the prime numbers in given range. | *Suppose we are not giving the Index value, it will show all the prime numbers in given range. | ||
*This function will give the result as error when | *This function will give the result as error when | ||
# Any one of the argument is nonnumeric. | # Any one of the argument is nonnumeric. | ||
− | #<math> | + | #<math> Max < Min </math> or <math>IndexOnly </math> is the beyond the range number of prime numbers |
− | #<math> | + | #<math>Max </math> or <math> Min<0</math>. |
==ZOS== | ==ZOS== | ||
− | *The syntax is to display the prime numbers list in ZOS is <math>LISTPRIMES( | + | *The syntax is to display the prime numbers list in ZOS is <math>LISTPRIMES(Max,Min,IndexOnly)</math>. |
− | **<math> | + | **<math>Max</math> is the upper limit. |
− | **<math> | + | **<math>Min</math> is the lower limit. |
− | **<math> | + | **<math>IndexOnly</math> is the specified position of a prime number. |
*For e.g.,LISTPRIMES(500,390,7) | *For e.g.,LISTPRIMES(500,390,7) | ||
{{#ev:youtube|CxMBgoBSxCg|280|center|Listing Prime Numbers}} | {{#ev:youtube|CxMBgoBSxCg|280|center|Listing Prime Numbers}} |
Revision as of 16:16, 25 June 2018
LISTPRIMES (Max,Min,IndexOnly)
- is the upper limit.
- is the lower limit.
- is the specified position of a prime number.
Description
- This function is listing the set of prime numbers for the given set of numbers.
- A prime number is a natural number, it can be divided, without a remainder, only by itself and by 1.
- For e.g. the number 11 is a prime, because 11 is divided by 1 and 11 without any remainder.
- But 6 is not prime, because 6 can be divided by 1,2,3 and 6. Such numbers are called composite numbers.
- Also the number 0 and 1 are neither prime nor composite.
- In , gives the list of prime numbers between the range and .
- is the upper limit value and is the lower limit value
- And is the position of the prime number value. value is optional.
- Suppose we are not giving the Index value, it will show all the prime numbers in given range.
- This function will give the result as error when
- Any one of the argument is nonnumeric.
- or is the beyond the range number of prime numbers
- or .
ZOS
- The syntax is to display the prime numbers list in ZOS is .
- is the upper limit.
- is the lower limit.
- is the specified position of a prime number.
- For e.g.,LISTPRIMES(500,390,7)
Examples
- =LISTPRIMES(20,11) = 11 13 17 19
- =LISTPRIMES(20,11,3) = 17
- =LISTPRIMES(150,130) = 131,137,139,149
- =LISTPRIMES(10,-1) = 2 3 5 7
- =LISTPRIMES(-10,1) = Null
- =LISTPRIMES(90,70) = 71 73 79 83 89
- =LISTPRIMES(90,70,4) = 83
- =LISTPRIMES(90,70,6) = Null
Related Videos
See Also
References