|
|
A049959
|
|
a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1, a(2) = 2, and a(3) = 3.
|
|
4
|
|
|
1, 2, 3, 8, 22, 38, 82, 194, 544, 896, 1798, 3626, 7408, 15518, 33766, 79424, 222754, 366086, 732178, 1464386, 2928928, 5858558, 11719846, 23451584, 46967074, 94220810, 189539920, 383474012, 784541050, 1639851326, 3568955854
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
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, 2, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|