@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <https://eyereasoner.github.io/ns#>.

{
    1000 log:repeat ?N0.
    (?N0 1) math:sum ?N.
    ?N :collatz (1 ?M).
} => {
    ?N :collatz (1 ?M).
}.
