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!)
A049907 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) 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, 3, 5, 11, 21, 34, 45, 122, 243, 478, 933, 1778, 3200, 5100, 6878, 18854, 37707, 75406, 150789, 301490, 602624, 1203948, 2404574, 4795394, 9534236, 18842388, 36782318, 69973190, 125899386, 200667970, 270641160, 741950288 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

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[2*(n - 1 - 2^logint(n-2, 2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, May 03 2020

CROSSREFS

Cf. A049906 (similar with minus a(m/2)), A049954 (similar with plus a(m/2)), A049955 (similar with plus a(m)).

Sequence in context: A080008 A058697 A030427 * A078445 A127166 A103596

Adjacent sequences:  A049904 A049905 A049906 * A049908 A049909 A049910

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 June 21 11:31 EDT 2021. Contains 345363 sequences. (Running on oeis4.)