login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049938 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), with a(1) = a(2) = 1 and a(3) = 2. 0
1, 1, 2, 5, 10, 20, 40, 81, 165, 326, 652, 1305, 2613, 5231, 10472, 20964, 41969, 83858, 167716, 335433, 670869, 1341743, 2683496, 5367012, 10734065, 21468214, 42936589, 85873504, 171747661, 343496630, 686995878, 1373996997, 2748004486, 5495988009, 10991976018, 21983952037, 43967904077 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..37.

FORMULA

a(n) = a(n - 1 - 2^ceiling(-1 + log_2(n-1))) + Sum_{i = 1..n-1} a(i) = a((1 + A006257(n-2))/2) + Sum_{i = 1..n-1} a(i) for n >= 4 with a(1) = a(2) = 1 and a(3) = 2. - Petros Hadjicostas, Oct 01 2019

EXAMPLE

From Petros Hadjicostas, Oct 01 2019: (Start)

a(4) = a(4 - 1 - 2^ceiling(-1 + log_2(3))) + a(1) + a(2) + a(3) = a(1) + a(1) + a(2) + a(3) = 5.

a(5) = a(5 - 1 - 2^ceiling(-1 + log_2(4))) + a(1) + a(2) + a(3) + a(4) = a(2) + a(1) + a(2) + a(3) + a(4) = 10.

a(6) = a(6 - 1 - 2^ceiling(-1 + log_2(5))) + a(1) + a(2) + a(3) + a(4) + a(5) = a(1) + a(1) + a(2) + a(3) + a(4) + a(5) = 20.

(End)

MAPLE

a := proc(n) local i; option remember; if n < 4 then return [1, 1, 2][n]; end if; add(a(i), i = 1 .. n - 1) + a(n - 3/2 - 1/2*Bits:-Iff(n - 2, n - 2)); end proc; # Petros Hadjicostas, Oct 01 2019

CROSSREFS

Cf. A006257, A049939, A049940, A049960, A049964, A049978.

Sequence in context: A284904 A084215 A024810 * A002460 A266613 A266462

Adjacent sequences:  A049935 A049936 A049937 * A049939 A049940 A049941

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

More terms from Petros Hadjicostas, Oct 01 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 13 21:26 EST 2019. Contains 329106 sequences. (Running on oeis4.)