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.
%I A367081 #34 Nov 11 2023 00:15:41 %S A367081 1,3,4,6,8,12,38,24,18,36,48,20,248,588,144,252,5520,168,7200,2400, %T A367081 2850 %N A367081 The least k such that exactly n binary near-repunit primes can be formed from 2^k-1 by changing one digit from 1 to 0. %C A367081 Similar to A065083 but using binary repdigits instead of base 10. %C A367081 Note that as in A065083, the most significant digit/bit is not replaced with a zero in determining a prime. %C A367081 a(21) > 7800. %C A367081 a(25) = 11520 and a(n) > 12000 for n in 21..24 and n > 25 using A272143. - _Michael S. Branicky_, Nov 09 2023 %e A367081 a(3)=6 because 2^6 - 1 = 111111_2 and %e A367081 1) 111101_2 = 61, %e A367081 2) 111011_2 = 59, %e A367081 3) 101111_2 = 47, %e A367081 and no other k < 6 yields exactly three primes. %o A367081 (PARI) a(n) = my(k=1); while(sum(i=1, k-2, ispseudoprime(2^k-1-2^i)) != n, k++); k \\ _Thomas Scheuerle_, Nov 07 2023 %o A367081 (Python) %o A367081 from itertools import count %o A367081 from sympy import isprime %o A367081 def A367081(n): %o A367081 for k in count(1): %o A367081 a, c = (1<<k)-1, 0 %o A367081 for i in range(k-2,0,-1): %o A367081 if isprime(a^(1<<i)): %o A367081 c += 1 %o A367081 if c >= n+1: %o A367081 break %o A367081 if c == n: %o A367081 return k # _Chai Wah Wu_, Nov 11 2023 %Y A367081 Cf. A002275, A034093, A065074, A065083, A272143. %K A367081 nonn,base,more %O A367081 0,2 %A A367081 _Robert Price_, Nov 06 2023