login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360392
a(n) = 2 + A026430(n); complement of A360393.
14
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,1
LINKS
MATHEMATICA
2 + Accumulate[1 + ThueMorse /@ Range[0, 120]]
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 05 2023
STATUS
approved