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.

A360393 Complement of A360392.

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 15, 19, 22, 24, 27, 31, 34, 36, 40, 42, 45, 49, 51, 55, 58, 60, 64, 66, 69, 73, 76, 78, 81, 85, 87, 91, 94, 96, 99, 103, 106, 108, 112, 114, 117, 121, 124, 126, 129, 133, 135, 139, 142, 144, 148, 150, 153, 157, 159, 163, 166, 168, 171, 175
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2023

Keywords

Crossrefs

Programs

  • Mathematica
    v = 2 + Accumulate[1 + ThueMorse /@ Range[0, 200]]; (* A360392 *)
    Complement[Range[Max[v]], v]    (* A360393 *)
  • PARI
    a(n) = if(n < 3, [1, 2][n], 3*n - 5 - hammingweight(n-3)%2) \\ Winston de Greef, Mar 27 2023
  • Python
    from itertools import islice
    def A360393_gen(): # generator of terms
        yield from (1,2)
        blist, s = [1], 3
        while True:
            c = [3-d for d in blist]
            blist += c
            for d in c:
                yield from range(s+1,s:=s+d)
    A360393_list = list(islice(A360393_gen(),30)) # Chai Wah Wu, Feb 22 2023
    

Formula

A360393(n) = A356133(n-2) + 2 for n>=3