RosettaCodeData/Task/Cuban-primes/00-TASK.txt

32 lines
1.6 KiB
Plaintext

The name   '''cuban'''   has nothing to do with   [https://en.wikipedia.org/wiki/Cuba Cuba  (the country)],   but has to do with the
fact that cubes &nbsp; (3<sup>rd</sup> powers) &nbsp; play a role in its definition.
;Some definitions of cuban primes:
::* &nbsp; primes which are the difference of two consecutive cubes.
::* &nbsp; primes of the form: &nbsp; (n+1)<sup>3</sup> - n<sup>3</sup>.
::* &nbsp; primes of the form: &nbsp; n<sup>3</sup> - (n-1)<sup>3</sup>.
::* &nbsp; primes &nbsp; ''p'' &nbsp; such that &nbsp; n<sup>2</sup>(''p''+n) &nbsp; is a cube for some &nbsp; n>0.
::* &nbsp; primes &nbsp; ''p'' &nbsp; such that &nbsp; 4''p'' = 1 + 3n<sup>2</sup>.
Cuban primes were named in 1923 by Allan Joseph Champneys Cunningham.
;Task requirements:
::* &nbsp; show the first &nbsp; 200 &nbsp; cuban primes &nbsp; (in a multi─line horizontal format).
::* &nbsp; show the &nbsp; 100,000<sup>th</sup> &nbsp; cuban prime.
::* &nbsp; show all cuban primes with commas &nbsp; (if appropriate).
::* &nbsp; show all output here.
Note that &nbsp; '''cuban prime''' &nbsp; isn't capitalized &nbsp; (as it doesn't refer to the nation of Cuba).
;Also see:
:* &nbsp; Wikipedia entry: &nbsp; &nbsp; [[wp:Cuban_prime|cuban prime]].
:* &nbsp; MathWorld entry: &nbsp; [http://mathworld.wolfram.com/CubanPrime.html cuban prime].
:* &nbsp; The OEIS entry: &nbsp; &nbsp; [[oeis:A002407|A002407]]. &nbsp; &nbsp; The &nbsp; 100,000<sup>th</sup> &nbsp; cuban prime can be verified in the &nbsp; 2<sup>nd</sup> &nbsp; ''example'' &nbsp; on this OEIS web page.
<br><br>