login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A152145
a(n) = least k such that 3*k*2^n-1 or 3*k*2^n+1 (or both) is prime.
1
1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 1, 1, 3, 3, 3, 4, 2, 1, 9, 6, 3, 9, 15, 13, 11, 9, 5, 4, 2, 1, 5, 4, 2, 1, 2, 1, 2, 1, 4, 2, 1, 2, 1, 5, 18, 9, 9, 5, 18, 9, 7, 8, 4, 2, 1, 9, 17, 18, 9, 15
OFFSET
0,10
MATHEMATICA
lk[n_]:=Module[{k=1}, While[NoneTrue[3*k*2^n+{1, -1}, PrimeQ], k++]; k]; Array[ lk, 70, 0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 03 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 26 2008, Nov 27 2008
STATUS
approved