|
|
A049892
|
|
a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = 1 and a(3) = 3.
|
|
0
|
|
|
1, 1, 3, 4, 6, 14, 26, 49, 78, 181, 360, 717, 1414, 2776, 5270, 9486, 15116, 35501, 71000, 141997, 283974, 567896, 1135510, 2269966, 4536076, 9062306, 18068728, 35924482, 70997428, 138594290, 263655928, 474383156, 756107812
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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, 3][n], s(n - 1) - a(-2^ceil(log[2](n - 1)) + 2*n - 3)):
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|