Erdős-primes: Difference between revisions

Content deleted Content added
→‎{{header|REXX}}: added the computer programming language REXX.
m →‎{{header|REXX}}: changed some whitespace and comments.
Line 18:
primes= 0 /*initialize the number of Erdős primes*/
$= /*a list of Erdős primes (so far). */
do j=1 until j>=n; if \!.j then iterate /*Is J not a prime? Then skip /*lets now search for Erdős primesit. */
if_= \!.sumDigs(j); if \!._ then iterate /*Is sum of J's notdigs a prime? ThenNo, skip it. */
_= sumDigs(j); if \!._ then iterate /*Is sum of J's digs a prime? No, skip.*/
primes= primes + 1 /*bump the count of Erdős primes. */
if Ocols<1 then iterate then iterate /*Build the list (to be shown later)? */
$= $ right(j, w) /*add the Erdős prime to the $ list. */
if primes//cols\==0 then iterate then iterate /*have we populated a line of output? */
say substr($, 2); $= $= /*display what we have so far (cols). */
end /*j*/