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!)
A049886 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = n - 1 - 2^p and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1. 3
1, 1, 1, 2, 4, 8, 16, 32, 63, 127, 254, 508, 1015, 2028, 4052, 8096, 16176, 32383, 64766, 129532, 259063, 518124, 1036244, 2072480, 4144944, 8289857, 16579650, 33159173, 66318092, 132635677, 265270341, 530538658, 1061073272, 2122154639 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
PROG
(PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[n - 1 - 2^ceil(-1 + log(n-1)/log(2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, Apr 26 2020 (with nn > 2)
CROSSREFS
Cf. A049887 (similar, but with minus a(2*m)), A049934 (similar, but with plus a(m)), A049935 (similar, but with plus a(2*m)).
Sequence in context: A251762 A140134 A243084 * A128901 A025489 A160686
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 26 2020
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 May 9 23:14 EDT 2024. Contains 372354 sequences. (Running on oeis4.)