OFFSET
1,3
MAPLE
s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
a := proc(n) option remember;
`if`(n < 4, [1, 1, 2][n], s(n - 1) - a(2^ceil(log[2](n - 1)) + 2 - n)):
end proc:
seq(a(n), n = 1..34); # Petros Hadjicostas, Nov 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by and more terms from Petros Hadjicostas, Nov 09 2019
STATUS
approved