A360392 a(n) = 2 + A026430(n); complement of A360393.
3, 5, 7, 8, 10, 11, 12, 14, 16, 17, 18, 20, 21, 23, 25, 26, 28, 29, 30, 32, 33, 35, 37, 38, 39, 41, 43, 44, 46, 47, 48, 50, 52, 53, 54, 56, 57, 59, 61, 62, 63, 65, 67, 68, 70, 71, 72, 74, 75, 77, 79, 80, 82, 83, 84, 86, 88, 89, 90, 92, 93, 95, 97, 98, 100
Offset: 1
Links
- Winston de Greef, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
2 + Accumulate[1 + ThueMorse /@ Range[0, 120]]
-
Python
from itertools import islice, accumulate def A360392_gen(): # generator of terms yield 3 blist, s = [1], 3 while True: c = [3-d for d in blist] blist += c yield from (s+d for d in accumulate(c)) s += sum(c) A360392_list = list(islice(A360392_gen(),30)) # Chai Wah Wu, Feb 22 2023
-
Python
def A360392(n): return n+2+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)) # Chai Wah Wu, Mar 01 2023