|
|
A049975
|
|
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 and a(2) = a(3) = 3.
|
|
0
|
|
|
1, 3, 3, 10, 27, 47, 101, 239, 670, 1104, 2215, 4467, 9126, 19117, 41597, 97844, 274415, 450989, 901985, 1804007, 3608206, 7217277, 14437917, 28890484, 57859695, 116072535, 233498088, 472409446, 966492099, 2020166249
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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, 3, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|