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!)
 A049930 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) = 1, a(2) = 3, and a(4) = 4. 0
 1, 3, 4, 7, 12, 26, 50, 99, 195, 396, 790, 1579, 3155, 6305, 12596, 25168, 50287, 100672, 201342, 402683, 805363, 1610721, 3221428, 6442832, 12885615, 25771134, 51542067, 103083740, 206166691, 412331806, 824660462, 1649314633 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS PROG (PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 4; 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 CROSSREFS Sequence in context: A049859 A124636 A231337 * A102938 A076784 A279815 Adjacent sequences:  A049927 A049928 A049929 * A049931 A049932 A049933 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 2 13:13 EST 2021. Contains 349443 sequences. (Running on oeis4.)