login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049889 a(n) = a(1) + a(2) + ... + a(n-1) - a(m), where m = 2^(p+1) + 2 - n 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) = 2. 0
1, 1, 2, 3, 6, 10, 21, 43, 86, 130, 282, 575, 1154, 2311, 4623, 9247, 18494, 27742, 60108, 122528, 246213, 493005, 986303, 1972758, 3945560, 7891163, 15782348, 31564707, 63129418, 126258839, 252517679, 505035359, 1010070718, 1515106078, 3282729836, 6691718512, 13446566445 (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, 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
Sequence in context: A242563 A240513 A036650 * A014270 A127076 A137208
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by and more terms from Petros Hadjicostas, Nov 09 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:31 EDT 2024. Contains 371240 sequences. (Running on oeis4.)