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: Extend to include the ith prime number.
  
  Parameters
  ==========
  
  i : integer
  
  Examples
  ========
  
  >>> from sympy import sieve
  >>> sieve._reset() # this line for doctest only
  >>> sieve.extend_to_no(9)
  >>> sieve._list
  array('L', [2, 3, 5, 7, 11, 13, 17, 19, 23])
  
  Notes
  =====
  
  The list is extended by 50% if it is too short, so it is
  likely that it will be longer than requested.
docstr_tok: ["Extend","to","include","the","ith","prime","number",".","Parameters","==========","i",":","integer","Examples","========",">",">",">","from","sympy","import","sieve",">",">",">","sieve._reset","(",")","#","this","line","for","doctest","only",">",">",">","sieve.extend_to_no","(","9",")",">",">",">","sieve._list","array","(","'","L","'",",","[","2",",","3",",","5",",","7",",","11",",","13",",","17",",","19",",","23","]",")","Notes","=====","The","list","is","extended","by","50","%","if","it","is","too","short",",","so","it","is","likely","that","it","will","be","longer","than","requested","."]
code: def extend_to_no(self, i):
      """Extend to include the ith prime number.
  
      Parameters
      ==========
  
      i : integer
  
      Examples
      ========
  
      >>> from sympy import sieve
      >>> sieve._reset() # this line for doctest only
      >>> sieve.extend_to_no(9)
      >>> sieve._list
      array('L', [2, 3, 5, 7, 11, 13, 17, 19, 23])
  
      Notes
      =====
  
      The list is extended by 50% if it is too short, so it is
      likely that it will be longer than requested.
      """
      i = as_int(i)
      while len(self._list) < i:
          self.extend(int(self._list[-1] * 1.5))
  
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 6 for calling the Sieve obj's underlying member method code with example usage: obj.extend_to_no(i) without return types