Difference between revisions of "Manuals/calci/ITHPRIME"

From ZCubes Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
*<math>n</math> is the maximum limit
 
*<math>n</math> is the maximum limit
  
ITHPRIME() calculates the ith prime number less than a maximum value 'n'.
+
ITHPRIME() calculates the 'ith' prime number less than a maximum value 'n'.
  
 
== Description ==
 
== Description ==
Line 14: Line 14:
 
ITHPRIME(4,25) returns ''7'' as a result.
 
ITHPRIME(4,25) returns ''7'' as a result.
  
*ITHPRIME() calculates the <math>i</math>th prime number from the Prime Number Series (2,3,5,7,11,13,17..........) and displays as an output if it is less than <math>n</math>.
+
*ITHPRIME() calculates the <math>i</math>th prime number from the Prime Number Series (2,3,5,7,11,13,17..........) and displays as an output, if it is less than <math>n</math>.
 
*<math>i</math> and <math>n</math> should be real numbers, else Calci displays #NULL error message.
 
*<math>i</math> and <math>n</math> should be real numbers, else Calci displays #NULL error message.
 
*<math>n</math> should be &gt; 2.
 
*<math>n</math> should be &gt; 2.
Line 43: Line 43:
 
</div>
 
</div>
  
  =ITHPRIME(A1,A2): calculates the 3rd prime number in the series, checks if it is &lt; 6. ''Displays 5'' as a result.
+
  =ITHPRIME(A1,A2): Calculates the 3rd prime number in the series, checks if it is &lt; 6. ''Displays 5'' as a result.
  =ITHPRIME(B1,B2): calculates the 6th prime number in the series, checks if it is &lt; 30. ''Displays 13'' as a result.
+
  =ITHPRIME(B1,B2): Calculates the 6th prime number in the series, checks if it is &lt; 30. ''Displays 13'' as a result.
  
 
== See Also ==
 
== See Also ==

Revision as of 18:12, 23 January 2014

ITHPRIME(i, n)

where,

  • is any real number
  • is the maximum limit

ITHPRIME() calculates the 'ith' prime number less than a maximum value 'n'.

Description

ITHPRIME(i, n)

For Example,

ITHPRIME(4,25) returns 7 as a result.

  • ITHPRIME() calculates the th prime number from the Prime Number Series (2,3,5,7,11,13,17..........) and displays as an output, if it is less than .
  • and should be real numbers, else Calci displays #NULL error message.
  • should be > 2.
  • If is less than the th prime number value, Calci displays #NULL error message.

Examples

Consider the following example in Calci, that shows the use of ITHPRIME function:

3 6
6 30
=ITHPRIME(A1,A2): Calculates the 3rd prime number in the series, checks if it is < 6. Displays 5 as a result.
=ITHPRIME(B1,B2): Calculates the 6th prime number in the series, checks if it is < 30. Displays 13 as a result.

See Also

References