Jordan-Pólya numbers: Difference between revisions

→‎{{header|jq}}: indentation
(added Raku programming solution)
(→‎{{header|jq}}: indentation)
Line 531:
| until(.k > .mx or .t > $lim;
.t *= .k
| if .t <= $lim
then reduce JordanPolya(($lim/.t)|floor; .t)[] as $rest (.;
.v += [.t * $rest] )
| .k += 1
else .
end)
| .v
| unique
Line 564:
| .m = (.m / .factorial[$i])
| if .m == 1 then .emit = .f else . end)
| if .emit then ., break $out else . end)
| if .emit then .emit
elif .i == 2 then Decompose($n; .start-1)
2,442

edits