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!)
A049906 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 and a(2) = a(3) = 2. 3
1, 2, 2, 4, 7, 15, 29, 58, 114, 231, 461, 922, 1842, 3681, 7354, 14694, 29359, 58775, 117549, 235098, 470194, 940385, 1880762, 3761510, 7522991, 15045926, 30091735, 60183240, 120366019, 240731118, 481460397, 962917121, 1925826902 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

PROG

(PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[n - 1 - 2^logint(n-2, 2)]; sa += va[n]; ); va; } \\ Petros Hadjicostas, May 03 2020

CROSSREFS

Cf. A049907 (similar with minus a(2*m)), A049954 (similar with plus a(m)), A049955 (similar with plus a(2*m)).

Sequence in context: A120363 A118988 A049904 * A014265 A153967 A052949

Adjacent sequences:  A049903 A049904 A049905 * A049907 A049908 A049909

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

Name edited by Petros Hadjicostas, May 03 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 10:39 EDT 2021. Contains 342845 sequences. (Running on oeis4.)