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!)
A049890 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) = a(2) = 1 and a(3) = 2. 3
1, 1, 2, 3, 6, 12, 24, 47, 93, 188, 376, 751, 1501, 2999, 5992, 11972, 23921, 47888, 95776, 191551, 383101, 766199, 1532392, 3064772, 6129521, 12258996, 24517897, 49035606, 98070837, 196140924, 392280350, 784557707, 1569109434 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
PROG
(PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; 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, Apr 27 2020
CROSSREFS
Cf. A049891 (similar, but with minus a(2*m)), A049938 (similar, but with plus a(m)), A049939 (similar, but with plus a(2*m)).
Sequence in context: A321048 A038085 A124313 * A351915 A262236 A246878
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 27 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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)