A354680 Terms of A354169 that are not powers of 2, in order of appearance.
0, 3, 12, 17, 34, 68, 136, 768, 1025, 18, 2080, 12288, 16388, 72, 32896, 196608, 262400, 524800, 1048577, 2098176, 4194306, 48, 8390656, 50331648, 67112960, 134225920, 268435460, 536887296, 1073741832, 192, 2147516416, 12884901888, 17179934720, 34359869440
Offset: 1
Examples
The initial terms of A354169 are: 0, 1, 2, 4, 8, 3, 16, 32, 64, 12, 128, 256. The initial terms of this sequence are therefore: 0, 3, 12. and the initial terms of A354798 are 0, 5, 9.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..3320
- Michael De Vlieger, Thomas Scheuerle, Rémy Sigrist, N. J. A. Sloane, and Walter Trump, The Binary Two-Up Sequence, arXiv:2209.04108 [math.CO], Sep 11 2022.
- Rémy Sigrist, PARI program
- Rémy Sigrist, PARI program (optimized version)
Programs
-
PARI
See Links section. (Python 3.10+) from itertools import count, islice from collections import deque from functools import reduce from operator import or_ def A354680_gen(): # generator of terms aset, aqueue, b, f = {0,1,2}, deque([2]), 2, False yield 0 while True: for k in count(1): m, j, j2, r, s = 0, 0, 1, b, k while r > 0: r, q = divmod(r,2) if not q: s, y = divmod(s,2) m += y*j2 j += 1 j2 *= 2 if s > 0: m += s*2**b.bit_length() if m not in aset: if m.bit_count() > 1: yield m aset.add(m) aqueue.append(m) if f: aqueue.popleft() b = reduce(or_,aqueue) f = not f break A354680_list = list(islice(A354680_gen(),40)) # Chai Wah Wu, Jun 06 2022
Comments