Function primeRange

  • Obtain a range of primes starting at the given ordinal. Prime 2 has ordinal 0.

    Parameters

    • start: number

      1-based ordinal of the nth odd prime to start from, or zero to include prime two.

    • Optional end: number

      Range end. end - start elements are returned.

    Returns number[]

    The primes in the range.