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

m
Line 1,021:
observation that the only digits which are prime are [2, 3, 5, 7]
so the numbers of interest cannot have more than 6 digits.
To save space, both alsoonly present the count of the number of solutions; this is done using the stream counter:
using the stream counter:
 
def count(s): reduce s as $_ (0; .+1);
2,467

edits