|
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
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)
(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
|
|
|
STATUS
|
approved
|
|
|
|