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 A353654 #153 Apr 25 2024 11:34:06 %S A353654 1,3,7,10,15,22,26,31,36,46,54,58,63,76,84,94,100,110,118,122,127,136, %T A353654 156,172,180,190,204,212,222,228,238,246,250,255,280,296,316,328,348, %U A353654 364,372,382,392,412,428,436,446,460,468,478,484,494,502,506,511,528,568 %N A353654 Numbers whose binary expansion has the same number of trailing 0 bits as other 0 bits. %C A353654 Numbers k such that A007814(k) = A086784(k). %C A353654 To reproduce the sequence through itself, use the following rule: if binary 1xyz is a term then so are 11xyz and 10xyz0 (except for 1 alone where 100 is not a term). %C A353654 The number of terms with bit length k is equal to Fibonacci(k-1) for k > 1. %C A353654 Conjecture: 2*A247648(n-1) + 1 with rewrite 1 -> 1, 01 -> 0 applied to binary expansion is the same as a(n) without trailing 0 bits in binary. %C A353654 Odd terms are positive Mersenne numbers (A000225), because there is no 0 in their binary expansion. - _Bernard Schott_, Oct 12 2022 %H A353654 Robert Israel, <a href="/A353654/b353654.txt">Table of n, a(n) for n = 1..10000</a> %F A353654 a(n) = a(n-1) + A356385(n-1) for n > 1 with a(1) = 1. %F A353654 Conjectured formulas: (Start) %F A353654 a(n) = 2^g(n-1)*(h(n-1) + 2^A000523(h(n-1))*(2 - g(n-1))) for n > 2 with a(1) = 1, a(2) = 3 where f(n) = n - A130312(n), g(n) = [n > 2*f(n)] and where h(n) = a(f(n) + 1). %F A353654 a(n) = 1 + 2^r(n-1) + Sum_{k=1..r(n-1)} (1 - g(s(n-1, k)))*2^(r(n-1) - k) for n > 1 with a(1) = 1 where r(n) = A072649(n) and where s(n, k) = f(s(n, k-1)) for n > 0, k > 1 with s(n, 1) = n. %F A353654 a(n) = 2*(2 + Sum_{k=1..n-2} 2^(A213911(A280514(k)-1) + 1)) - 2^A200650(n) for n > 1 with a(1) = 1. %F A353654 A025480(a(n)-1) = A348366(A343152(n-1)) for n > 1. %F A353654 a(A000045(n)) = 2^(n-1) - 1 for n > 1. (End) %p A353654 N:= 10: # for terms <= 2^N %p A353654 S:= {1}; %p A353654 for d from 1 to N do %p A353654 for k from 0 to d/2-1 do %p A353654 B:= combinat:-choose([$k+1..d-2],k); %p A353654 S:= S union convert(map(proc(t) local s; 2^d - 2^k - add(2^(s),s=t) end proc,B),set); %p A353654 od od: %p A353654 sort(convert(S,list)); # _Robert Israel_, Sep 21 2023 %t A353654 Join[{1}, Select[Range[2, 600], IntegerExponent[#, 2] == Floor[Log2[# - 1]] - DigitCount[# - 1, 2, 1] &]] (* _Amiram Eldar_, Jul 16 2022 *) %o A353654 (PARI) isok(k) = if (k==1, 1, (logint(k-1, 2)-hammingweight(k-1) == valuation(k, 2))); \\ _Michel Marcus_, Jul 16 2022 %o A353654 (Python) %o A353654 from itertools import islice, count %o A353654 def A353654_gen(startvalue=1): # generator of terms >= startvalue %o A353654 return filter(lambda n:(m:=(~n & n-1).bit_length()) == bin(n>>m)[2:].count('0'),count(max(startvalue,1))) %o A353654 A353654_list = list(islice(A353654_gen(),30)) # _Chai Wah Wu_, Oct 14 2022 %Y A353654 Cf. A000045, A000120, A000523, A007814, A010056, A025480, A030109, A054429, A060142, A072649, A084471, A086784, A091892, A132665, A133512, A200650, A213911, A232559, A280514, A343152, A348366. %Y A353654 Cf. A356385 (first differences). %Y A353654 Subsequences with same number k of trailing 0 bits and other 0 bits: A000225 (k=0), 2*A190620 (k=1), 4*A357773 (k=2), 8*A360573 (k=3). %K A353654 nonn,base,easy %O A353654 1,2 %A A353654 _Mikhail Kurkov_, Jul 15 2022