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!)
A049934 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) = a(3) = 1. 3
1, 1, 1, 4, 8, 16, 32, 64, 131, 259, 518, 1036, 2075, 4154, 8316, 16648, 33328, 66593, 133186, 266372, 532747, 1065498, 2131004, 4262024, 8524080, 17048227, 34096582, 68193423, 136387364, 272775767, 545553613, 1091111388, 2182231108 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

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

MAPLE

s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:

a := proc(n) option remember;

`if`(n < 4, [1, 1, 1][n], s(n - 1) + a(-2^ceil(-1 + log[2](n - 1)) + n - 1)):

end proc:

seq(a(n), n = 1..40); # Petros Hadjicostas, Apr 25 2020

PROG

(PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa + va[n - 1 - 2^ceil(-1 + log(n-1)/log(2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, Apr 26 2020 (with nn > 2)

CROSSREFS

Cf. A049886 (similar, but with minus a(m)), A049887 (similar, but with minus a(2*m)), A049935 (similar, but with plus a(2*m)).

Sequence in context: A020707 A151821 A147639 * A328634 A089890 A338313

Adjacent sequences:  A049931 A049932 A049933 * A049935 A049936 A049937

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Name edited by Petros Hadjicostas, Apr 25 2020

STATUS

approved

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 May 25 06:43 EDT 2022. Contains 354049 sequences. (Running on oeis4.)