driver-core/src/main/com/mongodb/client/model/Filters.java
public static Bson mod(final String fieldName, final long divisor, final long remainder) {
        return new OperatorFilter<BsonArray>("$mod", fieldName, new BsonArray(asList(new BsonInt64(divisor), new BsonInt64(remainder))));
    }
public static Bson mod(final String fieldName, final long divisor, final long remainder) {
        return new OperatorFilter<BsonArray>("$mod", fieldName, new BsonArray(asList(new BsonInt64(divisor), new BsonInt64(remainder))));
    }
Creates a filter that matches all documents where the value of a field divided by a divisor has the specified remainder (i.e. perform
a modulo operation to select documents).

@param fieldName the field name
@param divisor   the modulus
@param remainder the remainder
@return the filter
@mongodb.driver.manual reference/operator/query/mod $mod