Nice primes: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: changed a comment.)
(Realize in F#)
Line 231: Line 231:
</pre>
</pre>


=={{header|F_Sharp|F#}}==
This task uses [http://www.rosettacode.org/wiki/Extensible_prime_generator#The_functions Extensible Prime Generator (F#)]
<lang fsharp>
// Nice primes. Nigel Galloway: March 22nd., 2021
let fN g=1+((g-1)%9) in primes32()|>Seq.skipWhile((>)500)|>Seq.takeWhile((>)1000)|>Seq.filter(fN>>isPrime)|>Seq.iter(printf "%d "); printfn ""
</lang>
{{out}}
<pre>
509 547 563 569 587 599 601 617 619 641 653 659 673 677 691 709 727 743 761 797 821 839 853 857 887 907 911 929 941 947 977 983 997
</pre>
=={{header|Factor}}==
=={{header|Factor}}==
Using the following formula to find the digital root of a base 10 number:
Using the following formula to find the digital root of a base 10 number: