osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generating a specific list of intsgers


On Fri, Aug 24, 2018 at 3:47 PM <tomusatov at gmail.com> wrote:
>
> I am looking for a program able to output a set of integers meeting the following requirement:
>
> a(n) is the minimum k > 0 such that n*2^k - 3 is prime, or 0 if no such k exists
>
> Could anyone get me started? (I am an amateur)

Is there some known method of determining that no such k exists? The
obvious approach would be to try every possible value of k in order.
The problem is that there are infinitely many possible values of k, so
the program would not output 0; it would just never complete.