List:General Discussion« Previous MessageNext Message »
From:shawn wilson Date:July 13 2011 6:38pm
Subject:Re: query for twin primes
View as plain text  
On Jul 13, 2011 2:26 PM, "Elim Qiu" <elim.qiu@stripped> wrote:
>
> I have a prime table
> +-----+------+---------+
> | oid | pv   | descipt |
> +-----+------+---------+
> |   1 |    2 | NULL    |
> |   2 |    3 | NULL    |
> |   3 |    5 | NULL    |
> |   4 |    7 | NULL    |
> |   5 |   11 | NULL    |
> |  .....................    |
> +-----+------+---------+
>
> what the query will be if i like to find all rows where pv+2's are
> also in colum 'pv', where oid < 1000000?
>

... where ('pv' *2) = pv and old < 1000000

Untested (might be issues with my string vs number)

> In other words, how to get the list of yonger brother of the twin
> primes within certain bound?
>

Thread
query for twin primesElim Qiu13 Jul
  • Re: query for twin primesshawn wilson13 Jul
  • Re: query for twin primesmos13 Jul
    • Re: query for twin primesElim Qiu13 Jul
  • Re: query for twin primesSimcha Younger14 Jul