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!)
A049890 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) = 1 and a(3) = 2. 3

%I #23 May 06 2022 13:12:15

%S 1,1,2,3,6,12,24,47,93,188,376,751,1501,2999,5992,11972,23921,47888,

%T 95776,191551,383101,766199,1532392,3064772,6129521,12258996,24517897,

%U 49035606,98070837,196140924,392280350,784557707,1569109434

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

%o (PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; 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_, Apr 27 2020

%Y Cf. A049891 (similar, but with minus a(2*m)), A049938 (similar, but with plus a(m)), A049939 (similar, but with plus a(2*m)).

%K nonn

%O 1,3

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Apr 27 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)