If aux / i is less than M - aux and is not included earlier .
if ( aux + int ( aux / i ) <= M and not visited [ aux + int ( aux / i ) ] ) : NEW_LINE INDENT Q . append ( [ aux + int ( aux / i ) , cont + 1 ] ) NEW_LINE visited [ aux + int ( aux / i ) ] = True NEW_LINE DEDENT i += 1 NEW_LINE