Numbers with prime digits whose sum is 13: Difference between revisions

Content added Content deleted
m (→‎{{header|RPL}}: small loop counter tweak)
m (→‎{{header|Wren}}: Minor tidy)
Line 2,407: Line 2,407:
{{libheader|Wren-sort}}
{{libheader|Wren-sort}}
As the only digits which are prime are [2, 3, 5, 7], it is clear that a number must have between 3 and 6 digits for them to sum to 13.
As the only digits which are prime are [2, 3, 5, 7], it is clear that a number must have between 3 and 6 digits for them to sum to 13.
<syntaxhighlight lang="ecmascript">import "/math" for Nums
<syntaxhighlight lang="wren">import "./math" for Nums
import "/seq" for Lst
import "./seq" for Lst
import "/sort" for Sort
import "./sort" for Sort


var combrep // recursive
var combrep // recursive