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!)
A049929 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2^(p+1) + 2 - n 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) = 4. 1

%I #42 Aug 06 2021 16:08:53

%S 1,3,4,5,12,20,41,83,168,254,550,1121,2250,4507,9015,18031,36064,

%T 54098,117212,238932,480121,961371,1923313,3846922,7693930,15387945,

%U 30775932,61551885,123103778,246207563,492415127,984830255,1969660512

%N a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2^(p+1) + 2 - n 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) = 4.

%C Empirical: Lim_{n->infinity} a(n+1)/a(n) = 2. - _Iain Fox_, Dec 05 2017

%H Iain Fox, <a href="/A049929/b049929.txt">Table of n, a(n) for n = 1..3325</a>

%H Iain Fox, <a href="/A049929/a049929_1.txt">Table of n, a(n) for n = 1..8000</a>

%F a(n) = (Sum_{i=1..n-1} a(i)) - a(2^ceiling(log_2(n-1)) + 2 - n) for n > 3. - _Iain Fox_, Dec 06 2017

%F For n > 3, a(n) is the sum of all previous terms except a(A080079(n-2)). - _Iain Fox_, Dec 13 2017

%e For n = 4, 2^p < 3 <= 2^(p+1), so p = 1, m = 2^2 + 2 - 4 = 2, and a(n) = a(1) + a(2) + a(3) - a(2) = 1 + 3 + 4 - 3 = 5.

%e For n = 6, 2^p < 5 <= 2^(p+1), so p = 2, m = 2^3 + 2 - 6 = 4, and a(n) = a(1) + a(2) + a(3) + a(4) + a(5) - a(4) = 1 + 3 + 4 + 5 + 12 - 5 = 20.

%t Fold[Append[#1, Total@ #1 - #1[[2^Ceiling@ Log2@ #2 + 1 - #2]] ] &, {1, 3, 4}, Range[3, 32]] (* _Michael De Vlieger_, Dec 06 2017 *)

%o (PARI) first(n)= my(res = vector(n), s = 8); res[1]=1; res[2]=3; res[3]=4; for(x=4, n, res[x] = s - res[2*2^logint(x-2, 2)+2-x]; s += res[x]); res; \\ _Iain Fox_, Dec 05 2017

%Y Cf. A080079, A049933, A049937, A049945.

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Nov 06 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 March 28 17:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)