A181743 The exponent k which defines A181741(n) = 2^t-2^k-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
Keywords
Programs
-
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 *)
-
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<
>=1 m<<=1 A181743_list=list(islice(A181743_gen(),30)) # Chai Wah Wu, Jul 08 2022
Formula
Extensions
Terms equivalent to insertions in A181741 inserted by R. J. Mathar, Nov 18 2010
More terms from Michel Marcus, Dec 17 2018