login
A360393
Complement of A360392.
14
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,2
LINKS
FORMULA
A360393(n) = A356133(n-2) + 2 for n>=3
MATHEMATICA
v = 2 + Accumulate[1 + ThueMorse /@ Range[0, 200]]; (* A360392 *)
Complement[Range[Max[v]], v] (* A360393 *)
PROG
(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
(PARI) a(n) = if(n < 3, [1, 2][n], 3*n - 5 - hammingweight(n-3)%2) \\ Winston de Greef, Mar 27 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 05 2023
STATUS
approved