OFFSET
1,1
FORMULA
MATHEMATICA
IntegerExponent[Select[Table[2^t-2^k-1, {t, 1, 20}, {k, 1, t-1}] // Flatten // Union, PrimeQ] + 1, 2] (* Amiram Eldar, Dec 17 2018 after Jean-François Alcover at A181741 *)
PROG
(PARI) listk(nn) = {for (n=3, nn, forstep(k=n-1, 1, -1, if (isprime(2^n-2^k-1), print1(k, ", ")); ); ); } \\ Michel Marcus, Dec 17 2018
(Python)
from itertools import count, islice
from sympy import isprime
def A181743_gen(): # generator of terms
m = 2
for t in count(1):
r=1<<t-1
for k in range(t-1, 0, -1):
if isprime(m-r-1):
yield k
r>>=1
m<<=1
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 08 2010
EXTENSIONS
Terms equivalent to insertions in A181741 inserted by R. J. Mathar, Nov 18 2010
More terms from Michel Marcus, Dec 17 2018
STATUS
approved