cp's OEIS Frontend

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.

A354680 Terms of A354169 that are not powers of 2, in order of appearance.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist and N. J. A. Sloane, Jun 06 2022

Keywords

Comments

Apart from the initial 0, all terms have Hamming weight 2. See De Vlieger et al. (2022). - N. J. A. Sloane, Aug 29 2022

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.
		

Crossrefs

Cf. A000120, A057716, A354169, A354798 (corresponding indices).
See also A354767.

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

Formula

A000120(A354169(a(n))) <> 1.