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