The OEIS is supported by the many generous donors to the OEIS 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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A049906 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 and a(2) = a(3) = 2. 3

%I

%S 1,2,2,4,7,15,29,58,114,231,461,922,1842,3681,7354,14694,29359,58775,

%T 117549,235098,470194,940385,1880762,3761510,7522991,15045926,

%U 30091735,60183240,120366019,240731118,481460397,962917121,1925826902

%N 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 and a(2) = a(3) = 2.

%o (PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[n - 1 - 2^logint(n-2, 2)]; sa += va[n]; ); va; } \\ _Petros Hadjicostas_, May 03 2020

%Y Cf. A049907 (similar, but with minus a(2*m)), A049954 (similar, but with plus a(m)), A049955 (similar, but with plus a(2*m)).

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, May 03 2020

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 November 28 10:39 EST 2022. Contains 358411 sequences. (Running on oeis4.)