login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049902 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) = 1. 1
1, 2, 1, 3, 5, 11, 21, 43, 84, 170, 339, 679, 1356, 2710, 5414, 10818, 21614, 43270, 86539, 173079, 346156, 692310, 1384614, 2769218, 5538414, 11076787, 22153488, 44306807, 88613274, 177225871, 354450388, 708898072, 1417790740 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

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, 2, 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, Nov 19 2019

CROSSREFS

Sequence in context: A316994 A316993 A092944 * A096631 A144057 A272891

Adjacent sequences:  A049899 A049900 A049901 * A049903 A049904 A049905

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Name edited by Petros Hadjicostas, Nov 19 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 April 14 21:21 EDT 2021. Contains 342962 sequences. (Running on oeis4.)