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!)
A049891 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) 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 #14 May 06 2022 13:12:15

%S 1,1,2,3,4,10,18,29,39,106,210,413,807,1537,2767,4410,5947,16303,

%T 32604,65201,130383,260689,521071,1041018,2079163,4146433,8243968,

%U 16292448,31804567,60503719,108861423,173511575,234015294,641542162

%N a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) 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[2*(n - 1 - 2^logint(n-2, 2))]; sa += va[n]; ); va; } \\ _Petros Hadjicostas_, May 03 2020

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

%K nonn

%O 1,3

%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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)