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 A138290 #47 Mar 23 2024 20:01:39 %S A138290 6,14,22,26,30,36,38,42,54,57,62,70,78,81,90,94,110,122,126,132,134, %T A138290 138,142,147,150,158,166,168,171,172,174,178,182,190,194,198,206,210, %U A138290 222,238,254,285,294,312,315,318,334,336,350,366,372,382,405,414,416,432 %N A138290 Numbers m such that 2^(m+1) - 2^k - 1 is composite for all 0 <= k < m. %C A138290 The binary representation of 2^(m+1) - 2^k - 1 has m 1-bits and one 0-bit. Note that prime m are very rare: 577 is the first and 5569 is the second. %C A138290 A208083(a(n)+1) = 0 (cf. A081118). - _Reinhard Zumkeller_, Feb 23 2012 [Corrected by _Thomas Ordowski_, Feb 19 2024] %C A138290 Conjecture: 2^j - 2 are terms for j > 2. - _Chai Wah Wu_, Sep 07 2021 %C A138290 The proof of this conjecture is in A369375. - _Thomas Ordowski_, Mar 20 2024 %H A138290 Chai Wah Wu, <a href="/A138290/b138290.txt">Table of n, a(n) for n = 1..996</a> (terms 1..275 from T. D. Noe) %F A138290 For these m, A095058(m) = 0 and A110700(m) > 1. %F A138290 For n > 0, a(n) = A369375(n+1) - 1. - _Thomas Ordowski_, Mar 20 2024 %e A138290 6 is here because 95, 111, 119, 123, 125 and 126 are all composite. %t A138290 t={}; Do[num=2^(n+1)-1; k=0; While[k<n && !PrimeQ[num-2^k], k++ ]; If[k==n, AppendTo[t,n]], {n,100}]; t %t A138290 Select[Range[500],AllTrue[2^(#+1)-1-2^Range[0,#-1],CompositeQ]&] (* _Harvey P. Dale_, Apr 09 2022 *) %o A138290 (Haskell) %o A138290 import Data.List (elemIndices) %o A138290 a138290 n = a138290_list !! (n-1) %o A138290 a138290_list = map (+ 1) $ tail $ elemIndices 0 a208083_list %o A138290 -- _Reinhard Zumkeller_, Feb 23 2012 %o A138290 (Python) %o A138290 from sympy import isprime %o A138290 A138290_list = [] %o A138290 for n in range(1,10**3): %o A138290 k2, n2 = 1, 2**(n+1) %o A138290 for k in range(n): %o A138290 if isprime(n2-k2-1): %o A138290 break %o A138290 k2 *= 2 %o A138290 else: %o A138290 A138290_list.append(n) # _Chai Wah Wu_, Sep 07 2021 %o A138290 (PARI) isok(m) = my(nb=0); for (k=0, m-1, if (!ispseudoprime(2^(m+1) - 2^k - 1), nb++, break)); nb==m; \\ _Michel Marcus_, Sep 13 2021 %Y A138290 Many common terms with A092112. %Y A138290 Cf. A081118, A095058, A110700, A208083, A369375. %K A138290 nonn %O A138290 1,1 %A A138290 _T. D. Noe_, Mar 13 2008