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!)
A049918 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) = 3, and a(3) = 1. 3
1, 3, 1, 4, 6, 14, 26, 54, 105, 213, 424, 850, 1697, 3392, 6776, 13540, 27052, 54157, 108312, 216626, 433249, 866496, 1732984, 3465956, 6931884, 13863717, 27727326, 55454441, 110908456, 221816065, 443630435, 887257486, 1774508208 (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] = 3; va[3] = 1; 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. A049919 (similar with minus a(2*m)), A049966 (similar with plus a(m)), A049967 (similar with plus a(2*m)).

Sequence in context: A024934 A186358 A170839 * A028861 A081521 A213224

Adjacent sequences:  A049915 A049916 A049917 * A049919 A049920 A049921

KEYWORD

nonn

AUTHOR

Clark Kimberling

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 13:04 EDT 2021. Contains 343995 sequences. (Running on oeis4.)