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!)
A049884 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 3, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n-1 <= 2^(p+1), with a(1) = a(2) = 1. 0

%I #14 Sep 26 2019 01:55:36

%S 1,1,1,2,4,8,16,29,46,107,214,425,838,1646,3124,5624,8962,21047,42094,

%T 84185,168358,336686,673204,1345784,2689282,5372726,10712320,21298376,

%U 42091906,82167734,156312430,281245274,448270024,1052852477

%N a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 3, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n-1 <= 2^(p+1), with a(1) = a(2) = 1.

%F a(n) = -a(A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 3 with a(1) = a(2) = 1. - _Petros Hadjicostas_, Sep 24 2019

%e From _Petros Hadjicostas_, Sep 24 2019:

%e a(3) = -a(A006257(3-2)) + a(1) + a(2) = -1 + 1 + 1 = 1.

%e a(4) = -a(A006257(4-2)) + a(1) + a(2) + a(3) = -1 + 1 + 1 + 1 = 2.

%e a(5) = -a(A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = -1 + 1 + 1 + 1 + 2 = 4.

%e a(6) = -a(A006257(6-2)) + a(1) + a(2) + a(3) + a(4) + a(5) = 8.

%e (End)

%p a := proc(n) local i; option remember; if n < 3 then return [1, 1][n]; end if; add(a(i), i = 1 .. n - 1) - a(2*n - 4 - Bits:-Iff(n - 2, n - 2)); end proc;

%p seq(a(n), n = 1 .. 37); # _Petros Hadjicostas_, Sep 24 2019, courtesy of _Peter Luschny_

%Y Cf. A006257.

%K nonn

%O 1,4

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Sep 24 2019

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 16 04:02 EDT 2024. Contains 371696 sequences. (Running on oeis4.)