Jump to content

Special odd numbers: Difference between revisions

m
→‎{{header|REXX}}: change some comments.
m (→‎{{header|REXX}}: changed a comment.)
m (→‎{{header|REXX}}: change some comments.)
Line 70:
if cols>0 then say '───────┼'center("" , 1 + cols*(w+1), '─')
idx= 1 /*initialize the index of output lines.*/
$=; ss.= 0 /*a list of odd squarefree semiprimes. */
do j=2 while @.j < hi /*generategen odd squarefree semiprimes < HI.*/
do k=j+1 while @.k < hi /*ensure primes are squarefree & < HI.*/
_= @.j * @.k /*calculate the product of 2 odd primes*/
Line 78:
end /*k*/
end /*j*/
sss= 0 /*the number of odd squarefree semiprimes. */
do m=3 by 2 to hi-1 /*search a list of possible candicates.*/
if \ss.m then iterate /*Does this number exist? No, skip it.*/
sss= sss + 1 /*bump count of squarefreeodd sq─free semiprimes. */
if cols==0 then iterate /*Build the list (to be shown later)? */
c= commas(m) /*maybe add commas to the number. */
Cookies help us deliver our services. By using our services, you agree to our use of cookies.