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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A049922 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(3) = 2. 3
 1, 3, 2, 5, 8, 18, 34, 69, 135, 274, 546, 1093, 2183, 4363, 8716, 17416, 34797, 69662, 139322, 278645, 557287, 1114571, 2229132, 4458248, 8916461, 17832856, 35665573, 71330874, 142661201, 285321312, 570640444, 1141276535, 2282544370 (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] = 2; 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. A049923 (similar, but with minus a(2*m)), A049970 (similar, but with plus a(m)), A049971 (similar, but with plus a(2*m)). Sequence in context: A127299 A342138 A029619 * A160106 A243786 A278743 Adjacent sequences:  A049919 A049920 A049921 * A049923 A049924 A049925 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.

Last modified May 22 10:56 EDT 2022. Contains 353949 sequences. (Running on oeis4.)