login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181743 The exponent k which defines A181741(n) = 2^t-2^k-1. 1

%I #15 Jul 08 2022 18:02:47

%S 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,

%T 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,

%U 1,17,9,7,3,16,10,5,4,1,21,15,13,10,5,4,1,13,9,2

%N The exponent k which defines A181741(n) = 2^t-2^k-1.

%F k = A007814(A181741(n)+1). [_R. J. Mathar_, Nov 18 2010]

%t 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 *)

%o (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

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime

%o def A181743_gen(): # generator of terms

%o m = 2

%o for t in count(1):

%o r=1<<t-1

%o for k in range(t-1,0,-1):

%o if isprime(m-r-1):

%o yield k

%o r>>=1

%o m<<=1

%o A181743_list=list(islice(A181743_gen(),30)) # _Chai Wah Wu_, Jul 08 2022

%Y Cf. A181741, A181742.

%K nonn

%O 1,1

%A _Vladimir Shevelev_, Nov 08 2010

%E Terms equivalent to insertions in A181741 inserted by _R. J. Mathar_, Nov 18 2010

%E More terms from _Michel Marcus_, Dec 17 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 01:19 EDT 2024. Contains 375418 sequences. (Running on oeis4.)