login
a(n) = least k such that 3*k*2^n-1 or 3*k*2^n+1 (or both) is prime.
1

%I #8 Aug 03 2019 16:58:44

%S 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,

%T 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

%N a(n) = least k such that 3*k*2^n-1 or 3*k*2^n+1 (or both) is prime.

%H Pierre CAMI, <a href="/A152145/b152145.txt">Table of n, a(n) for n = 0..1230</a>

%t 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 *)

%Y A152141

%K nonn

%O 0,10

%A _Pierre CAMI_, Nov 26 2008, Nov 27 2008