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 A354680 #53 Nov 29 2023 13:08:01 %S A354680 0,3,12,17,34,68,136,768,1025,18,2080,12288,16388,72,32896,196608, %T A354680 262400,524800,1048577,2098176,4194306,48,8390656,50331648,67112960, %U A354680 134225920,268435460,536887296,1073741832,192,2147516416,12884901888,17179934720,34359869440 %N A354680 Terms of A354169 that are not powers of 2, in order of appearance. %C A354680 Apart from the initial 0, all terms have Hamming weight 2. See De Vlieger et al. (2022). - _N. J. A. Sloane_, Aug 29 2022 %H A354680 Rémy Sigrist, <a href="/A354680/b354680.txt">Table of n, a(n) for n = 1..3320</a> %H A354680 Michael De Vlieger, Thomas Scheuerle, Rémy Sigrist, N. J. A. Sloane, and Walter Trump, <a href="http://arxiv.org/abs/2209.04108">The Binary Two-Up Sequence</a>, arXiv:2209.04108 [math.CO], Sep 11 2022. %H A354680 Rémy Sigrist, <a href="/A354680/a354680.gp.txt">PARI program</a> %H A354680 Rémy Sigrist, <a href="/A354680/a354680_1.gp.txt">PARI program (optimized version)</a> %F A354680 A000120(A354169(a(n))) <> 1. %e A354680 The initial terms of A354169 are: %e A354680 0, 1, 2, 4, 8, 3, 16, 32, 64, 12, 128, 256. %e A354680 The initial terms of this sequence are therefore: 0, 3, 12. %e A354680 and the initial terms of A354798 are %e A354680 0, 5, 9. %o A354680 (PARI) See Links section. %o A354680 (Python 3.10+) %o A354680 from itertools import count, islice %o A354680 from collections import deque %o A354680 from functools import reduce %o A354680 from operator import or_ %o A354680 def A354680_gen(): # generator of terms %o A354680 aset, aqueue, b, f = {0,1,2}, deque([2]), 2, False %o A354680 yield 0 %o A354680 while True: %o A354680 for k in count(1): %o A354680 m, j, j2, r, s = 0, 0, 1, b, k %o A354680 while r > 0: %o A354680 r, q = divmod(r,2) %o A354680 if not q: %o A354680 s, y = divmod(s,2) %o A354680 m += y*j2 %o A354680 j += 1 %o A354680 j2 *= 2 %o A354680 if s > 0: %o A354680 m += s*2**b.bit_length() %o A354680 if m not in aset: %o A354680 if m.bit_count() > 1: %o A354680 yield m %o A354680 aset.add(m) %o A354680 aqueue.append(m) %o A354680 if f: aqueue.popleft() %o A354680 b = reduce(or_,aqueue) %o A354680 f = not f %o A354680 break %o A354680 A354680_list = list(islice(A354680_gen(),40)) # _Chai Wah Wu_, Jun 06 2022 %Y A354680 Cf. A000120, A057716, A354169, A354798 (corresponding indices). %Y A354680 See also A354767. %K A354680 nonn,base %O A354680 1,2 %A A354680 _Rémy Sigrist_ and _N. J. A. Sloane_, Jun 06 2022