Sum of square and cube digits of an integer are primes: Difference between revisions

Realize in F#
m (Added Algol 68)
(Realize in F#)
Line 34:
</pre>
 
=={{header|F_Sharp|F#}}==
===The function===
This task uses [http://www.rosettacode.org/wiki/Extensible_prime_generator#The_functions Extensible Prime Generator (F#)]
<lang fsharp>
// Sum of square and cube digits of an integer are primes. Nigel Galloway: December 22nd., 2021
let rec fN g=function 0->g |n->fN(g+n%10)(n/10)
[1..99]|>List.filter(fun g->isPrime(fN 0 (g*g)) && isPrime(fN 0 (g*g*g)))|>List.iter(printf "%d "); printfn ""
</lang>
{{out}}
<pre>
16 17 25 28 34 37 47 52 64
</pre>
=={{header|Phix}}==
<!--<lang Phix>(phixonline)-->
2,171

edits