0,10

Pierre CAMI, Table of n, a(n) for n = 0..1600

3*2^0*(2^1-1)-1=2 is prime so a(0)=1;

3*2^1*(2^1-1)-1=5 is prime as well as 7 so a(1)=1;

3*2^2*(2^1-1)-1=23 is prime so a(2)=1.

(PARI) a(n) = my(k=1); while ((x=3*2^n*(2^k-1)-1) && !isprime(x) && !isprime(x+1), k++); k; \\ Michel Marcus, Sep 16 2019

Sequence in context: A255916 A107333 A161642 * A098505 A178395 A330958

Adjacent sequences: A152138 A152139 A152140 * A152142 A152143 A152144

nonn

Pierre CAMI, Nov 26 2008

approved