   while go 
     await srf.recharge defer()
     p = new BigInteger nbits, srf
-    p = prime_search p, 2 * sieve.length * nbits, sieve, iters
+    p = prime_search p, nbits/4, sieve, iters
     go = (p.compareTo(BigInteger.ZERO) is 0)
     console.log "iter #{i++} -> #{go}"
   cb p

  # @return {BigInteger} the next weak prime
  #
  next_weak : () ->
    try_again = true
    while try_again

      step = @sieve[@sievepos]
      @sievepos = (@sievepos + step) % @sieve.length
      @inc += step
      if @inc > @maxinc or @maxinc < 0
        @tmp = nbv(0)
        return @tmp
      @calcmods() if @inc < 0
      try_again = @decrement_mods_find_divisor()

    @tmp = @p.add nbv @inc
    @tmp

  #-----------------------


      t = t.shiftLeft(1)
  if t.compareTo(n) > 0
    t = t.mod(n)
  #console.log t.toString()
  ret = (t.compareTo(nbv(2)) is 0)
  fta.stop()
  ret
