The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 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 with minus a(2*m)), A049934 (similar with plus a(m)), A049935 (similar with plus a(2*m)). Sequence in context: A251762 A140134 A243084 * A128901 A025489 A160686 Adjacent sequences:  A049883 A049884 A049885 * A049887 A049888 A049889 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 7 13:08 EST 2021. Contains 349581 sequences. (Running on oeis4.)