login
A181743
The exponent k which defines A181741(n) = 2^t-2^k-1.
1
2, 1, 3, 2, 1, 3, 1, 5, 4, 2, 1, 7, 6, 5, 4, 2, 7, 5, 3, 1, 5, 2, 1, 3, 9, 7, 4, 2, 1, 11, 13, 10, 8, 6, 1, 11, 7, 4, 11, 3, 17, 14, 13, 9, 8, 6, 5, 4, 2, 11, 19, 18, 17, 14, 12, 11, 10, 9, 7, 4, 2, 1, 17, 9, 7, 3, 16, 10, 5, 4, 1, 21, 15, 13, 10, 5, 4, 1, 13, 9, 2
OFFSET
1,1
FORMULA
k = A007814(A181741(n)+1). [R. J. Mathar, Nov 18 2010]
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
A181743_list=list(islice(A181743_gen(), 30)) # Chai Wah Wu, Jul 08 2022
CROSSREFS
Sequence in context: A240554 A107338 A118123 * A330727 A174737 A131756
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