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 A357774 #34 Dec 19 2024 23:40:42 %S A357774 1001,10011,10101,11001,100111,101011,101101,110011,110101,111001, %T A357774 1001111,1010111,1011011,1011101,1100111,1101011,1101101,1110011, %U A357774 1110101,1111001,10011111,10101111,10110111,10111011,10111101,11001111,11010111,11011011,11011101,11100111,11101011 %N A357774 Binary expansions of odd numbers with two zeros in their binary expansion. %C A357774 For m >= 4, there are A000217(m-3) terms with m digits. %F A357774 a(n) = A007088(A357773(n)). %t A357774 FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[1, 250, 2], DigitCount[#, 2, 0] == 2 &] (* _Amiram Eldar_, Oct 19 2022 *) %o A357774 (Python) %o A357774 from itertools import combinations, count, islice %o A357774 def agen(): # generator of terms %o A357774 for d in count(4): %o A357774 b, c = 2**d - 1, 2**(d-1) %o A357774 for i, j in combinations(range(1, d-1), 2): %o A357774 yield int(bin(b - (c >> i) - (c >> j))[2:]) %o A357774 print(list(islice(agen(), 30))) # _Michael S. Branicky_, Oct 19 2022 %o A357774 (Python) %o A357774 from itertools import count, islice %o A357774 def A357774_gen(): # generator of terms %o A357774 for l in count(2): %o A357774 m = (10**(l+2)-1)//9 %o A357774 for i in range(l,0,-1): %o A357774 k = m-10**i %o A357774 yield from (k-10**j for j in range(i-1,0,-1)) %o A357774 A357774_list = list(islice(A357774_gen(),30)) # _Chai Wah Wu_, Feb 19 2023 %o A357774 (Python) %o A357774 from math import isqrt, comb %o A357774 from sympy import integer_nthroot %o A357774 def A357774(n): %o A357774 a = (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2,3))+3 %o A357774 b = isqrt((j:=comb(a-1,3)-n+1)<<3)+3>>1 %o A357774 c = j-comb((r:=isqrt(w:=j<<1))+(w>r*(r+1)),2) %o A357774 return (10**a-1)//9-10**b-10**c # _Chai Wah Wu_, Dec 19 2024 %o A357774 (PARI) isok(k) = (k%2) && (#binary(k) == hammingweight(k)+2); \\ A357773 %o A357774 f(n) = fromdigits(binary(n), 10); \\ A007088 %o A357774 lista(nn) = apply(f, select(isok, [1..nn])); \\ _Michel Marcus_, Oct 19 2022 %Y A357774 Cf. A000217, A007088, A357773. %Y A357774 A267524 \ {1, 10, 100} and A267705 \ {1, 10} are two subsequences. %Y A357774 Similar, but with k zeros in their binary expansion: A000042 (k=0), A190619 (k=1). %K A357774 nonn,base %O A357774 1,1 %A A357774 _Bernard Schott_, Oct 19 2022