Penta-power prime seeds: Difference between revisions
Change descriptions to match task rename
Thundergnat (talk | contribs) m (Thundergnat moved page Quad-power plus prime seeds to Penta-power prime seeds: Better name IMO) |
Thundergnat (talk | contribs) (Change descriptions to match task rename) |
||
Line 1:
{{draft task}}
Generate the sequence of
<big>'''n<sup>0</sup> + n + 1, n<sup>1</sup> + n + 1, n<sup>2</sup> + n + 1, n<sup>3</sup> + n + 1''' and '''n<sup>4</sup> + n + 1''' are all prime.</big>
Line 7:
;Task
* Find and display the first thirty
Line 23:
<lang perl6>use Lingua::EN::Numbers;
my @
say "First thirty
say "\nFirst
for 1..10 {
my $threshold = Int(1e6 * $_);
my $key = @
say "{$threshold.&cardinal.fmt: '%13s'} is the {ordinal-digit $key + 1}: {@
}</lang>
{{out}}
<pre>First thirty
1 5 69 1,665 2,129 25,739 29,631 62,321 77,685 80,535
82,655 126,489 207,285 211,091 234,359 256,719 366,675 407,945 414,099 628,859
644,399 770,531 781,109 782,781 923,405 1,121,189 1,158,975 1,483,691 1,490,475 1,512,321
First
one million is the 26th: 1,121,189
two million is the 39th: 2,066,079
|