login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049958 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) = 1, a(2) = 2, and a(3) = 3. 3
1, 2, 3, 7, 15, 29, 59, 119, 242, 478, 957, 1915, 3834, 7676, 15366, 30762, 61584, 123050, 246101, 492203, 984410, 1968828, 3937670, 7875370, 15750800, 31501723, 63003682, 126007843, 252016644, 504035207, 1008074256, 2016156202 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

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, 2, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1) - 1) + n - 1)); end proc;

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

CROSSREFS

Cf. A049910 (similar, but with minus a(m)), A049911 (similar, but with minus a(2*m)), A049959 (similar, but with plus a(2*m)).

Sequence in context: A006884 A074742 A020873 * A298403 A177487 A153010

Adjacent sequences: A049955 A049956 A049957 * A049959 A049960 A049961

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Name edited by Petros Hadjicostas, Apr 23 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 November 30 01:31 EST 2022. Contains 358431 sequences. (Running on oeis4.)