OFFSET
1,3
FORMULA
From Petros Hadjicostas, Oct 06 2019: (Start)
a(n) = a(2 - n + 2^ceiling(log_2(n-1))) + Sum_{i = 1..n-1} a(i) for n >= 3.
a(n) = a(n - 1 - A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 3.
(End)
EXAMPLE
From Petros Hadjicostas, Oct 06 2019: (Start)
a(3) = a(2 - 3 + 2^ceiling(log_2(3-1))) + a(1) + a(2) = a(1) + a(1) + a(2) = 3.
a(4) = a(2 - 4 + 2^ceiling(log_2(4-1))) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 6.
a(5) = a(5 - 1 - A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = a(1) + a(1) + a(2) + a(3) + a(4) = 12.
(End)
MAPLE
a := proc(n) local i; option remember; if n < 3 then return [1, 1][n]; end if; add(a(i), i = 1 .. n - 1) + a(3 - n + Bits:-Iff(n - 2, n - 2)); end proc;
seq(a(n), n = 1 .. 35); # Petros Hadjicostas, Oct 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Petros Hadjicostas, Oct 06 2019
STATUS
approved