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!)
A049914 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) = 4. 3
1, 2, 4, 6, 11, 23, 45, 88, 174, 353, 705, 1408, 2814, 5623, 11234, 22446, 44849, 89785, 179569, 359136, 718270, 1436535, 2873058, 5746094, 11492145, 22984204, 45968229, 91936106, 183871509, 367741612, 735480415, 1470955219 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
PROG
(PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 4; 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. A049915 (similar, but with minus a(2*m)), A049962 (similar, but with plus a(m)), A049963 (similar, but with plus a(2*m)).
Sequence in context: A322051 A084353 A084979 * A056763 A190071 A189498
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 26 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 March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)