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: Return the indices i, j of the primes that bound n.
  
  If n is prime then i == j.
  
  Although n can be an expression, if ceiling cannot convert
  it to an integer then an n error will be raised.
  
  Examples
  ========
  
  >>> from sympy import sieve
  >>> sieve.search(25)
  (9, 10)
  >>> sieve.search(23)
  (9, 9)
docstr_tok: ["Return","the","indices","i",",","j","of","the","primes","that","bound","n.","If","n","is","prime","then","i","==","j",".","Although","n","can","be","an","expression",",","if","ceiling","can","not","convert","it","to","an","integer","then","an","n","error","will","be","raised",".","Examples","========",">",">",">","from","sympy","import","sieve",">",">",">","sieve.search","(","25",")","(","9",",","10",")",">",">",">","sieve.search","(","23",")","(","9",",","9",")"]
code: def search(self, n):
      """Return the indices i, j of the primes that bound n.
  
      If n is prime then i == j.
  
      Although n can be an expression, if ceiling cannot convert
      it to an integer then an n error will be raised.
  
      Examples
      ========
  
      >>> from sympy import sieve
      >>> sieve.search(25)
      (9, 10)
      >>> sieve.search(23)
      (9, 9)
      """
      test = _as_int_ceiling(n)
      n = as_int(n)
      if n < 2:
          raise ValueError("n should be >= 2 but got: %s" % n)
      if n > self._list[-1]:
          self.extend(n)
      b = bisect(self._list, n)
      if self._list[b - 1] == test:
          return b, b
      else:
          return b, b + 1
  
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 10 for calling the Sieve obj's underlying member method code with example usage: obj.search(n) and returns: b,  b, b,  unknown