cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A181743 #15 Jul 08 2022 18:02:47
%S A181743 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 A181743 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 A181743 1,17,9,7,3,16,10,5,4,1,21,15,13,10,5,4,1,13,9,2
%N A181743 The exponent k which defines A181741(n) = 2^t-2^k-1.
%F A181743 k = A007814(A181741(n)+1). [_R. J. Mathar_, Nov 18 2010]
%t A181743 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 A181743 (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 A181743 (Python)
%o A181743 from itertools import count, islice
%o A181743 from sympy import isprime
%o A181743 def A181743_gen(): # generator of terms
%o A181743     m = 2
%o A181743     for t in count(1):
%o A181743         r=1<<t-1
%o A181743         for k in range(t-1,0,-1):
%o A181743             if isprime(m-r-1):
%o A181743                 yield k
%o A181743             r>>=1
%o A181743         m<<=1
%o A181743 A181743_list=list(islice(A181743_gen(),30)) # _Chai Wah Wu_, Jul 08 2022
%Y A181743 Cf. A181741, A181742.
%K A181743 nonn
%O A181743 1,1
%A A181743 _Vladimir Shevelev_, Nov 08 2010
%E A181743 Terms equivalent to insertions in A181741 inserted by _R. J. Mathar_, Nov 18 2010
%E A181743 More terms from _Michel Marcus_, Dec 17 2018