1,3

When k(n)=1 n+1 is prime and the prime is a Mersenne-prime when k(n)=3 then k(n+1)=2 and same prime for n and n+1

Table of n, a(n) for n=1..86.

1*2*2^1-1=3 prime so k(1)=1

1*2*2^2-1=7 prime so k(2)=1

2*3*2^3-1=47 prime so k(3)=2

9*10*2^7-1=11519 prime so k(7)=9

lk[n_]:=Module[{k=1, c=2^n}, While[!PrimeQ[k(k+1)c-1], k++]; k]; Array[lk, 90] (* Harvey P. Dale, Aug 06 2017 *)

Sequence in context: A260897 A342920 A066772 * A062347 A124781 A124151

Adjacent sequences: A104057 A104058 A104059 * A104061 A104062 A104063

nonn

Pierre CAMI, Mar 31 2005

Reformulated the definition - R. J. Mathar, Nov 13 2009

approved