Anonymous user
Primes whose first and last number is 3: Difference between revisions
Primes whose first and last number is 3 (view source)
Revision as of 12:44, 24 July 2021
, 2 years ago→{{header|REXX}}: added stretch goal solution.
m (→{{header|REXX}}: elided a word from the REXX section header.) |
m (→{{header|REXX}}: added stretch goal solution.) |
||
Line 112:
if Td\==dig then iterate /* " " " " trailing ? ? */ /* ◄■■■■■■■ a filter.*/
found= found + 1 /*bump the number of primes found. */
if cols<
c= commas(@.j) /*maybe add commas to the number. */
$= $ right(c, max(w, length(c) ) ) /*add a prime ──► $ list, allow big #*/
Line 151:
Found 33 primes N (in base ten) that have a leading and ending digit of 3 where N < 4,000
</pre>
{{out|output|text= when using the default inputs of: <tt> 1000000 -1 </tt>}}
<pre>
Found 2,251 primes N (in base ten) that have a leading and ending digit of 3 where N < 1,000,000
</pre>
|