class_docstr: A list of prime numbers, implemented as a dynamically
  growing sieve of Eratosthenes. When a lookup is requested involving
  an odd number that has not been sieved, the sieve is automatically
  extended up to that number. Implementation details limit the number of
  primes to ``2^32-1``.
  
  Examples
  ========
  
  >>> from sympy import sieve
  >>> sieve._reset() # this line for doctest only
  >>> 25 in sieve
  False
  >>> sieve._list
  array('L', [2, 3, 5, 7, 11, 13, 17, 19, 23])
class_docstr_tok: ["A","list","of","prime","numbers",",","implemented","as","a","dynamically","growing","sieve","of","Eratosthenes",".","When","a","lookup","is","requested","involving","an","odd","number","that","has","not","been","sieved",",","the","sieve","is","automatically","extended","up","to","that","number",".","Implementation","details","limit","the","number","of","primes","to","``","2^32-1","``",".","Examples","========",">",">",">","from","sympy","import","sieve",">",">",">","sieve._reset","(",")","#","this","line","for","doctest","only",">",">",">","25","in","sieve","False",">",">",">","sieve._list","array","(","'","L","'",",","[","2",",","3",",","5",",","7",",","11",",","13",",","17",",","19",",","23","]",")"]
docstr: Generate all mobius numbers for the range [a, b).
  
  Parameters
  ==========
  
  a : integer
      First number in range
  
  b : integer
      First number outside of range
  
  Examples
  ========
  
  >>> from sympy import sieve
  >>> print([i for i in sieve.mobiusrange(7, 18)])
  [-1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1]
docstr_tok: ["Generate","all","mobius","numbers","for","the","range","[","a",",","b",")",".","Parameters","==========","a",":","integer","First","number","in","range","b",":","integer","First","number","outside","of","range","Examples","========",">",">",">","from","sympy","import","sieve",">",">",">","print","(","[","i","for","i","in","sieve.mobiusrange","(","7",",","18",")","]",")","[","-1",",","0",",","0",",","1",",","-1",",","0",",","-1",",","1",",","1",",","0",",","-1","]"]
code: def mobiusrange(self, a, b):
      """Generate all mobius numbers for the range [a, b).
  
      Parameters
      ==========
  
      a : integer
          First number in range
  
      b : integer
          First number outside of range
  
      Examples
      ========
  
      >>> from sympy import sieve
      >>> print([i for i in sieve.mobiusrange(7, 18)])
      [-1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1]
      """
      a = max(1, _as_int_ceiling(a))
      b = _as_int_ceiling(b)
      n = len(self._mlist)
      if a >= b:
          return
      elif b <= n:
          for i in range(a, b):
              yield self._mlist[i]
      else:
          self._mlist += _array("i", [0] * (b - n))
          for i in range(1, n):
              mi = self._mlist[i]
              startindex = (n + i - 1) // i * i
              for j in range(startindex, b, i):
                  self._mlist[j] -= mi
              if i >= a:
                  yield mi
  
          for i in range(n, b):
              mi = self._mlist[i]
              for j in range(2 * i, b, i):
                  self._mlist[j] -= mi
              if i >= a:
                  yield mi
  
imports: from bisect import bisect, bisect_left
  from itertools import count
  from array import array
  from sympy.core.function import Function
  from sympy.core.random import randint
  from sympy.core.singleton import S
  from sympy.external.gmpy import sqrt
  from .primetest import isprime
  from sympy.utilities.misc import as_int
label_desc: Use image node_id 9 for calling the Sieve obj's underlying member method code with example usage: obj.mobiusrange(a, b) without return types