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!)
A049923 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, a(2) = 3, and a(3) = 2. 3
1, 3, 2, 3, 6, 12, 24, 39, 51, 138, 276, 543, 1059, 2019, 3633, 5790, 7809, 21405, 42810, 85611, 171195, 342291, 684177, 1366878, 2729985, 5444355, 10824504, 21392328, 41760069, 79442661, 142937349, 227824365, 307267026, 842358414 (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) = { my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[2*n - 2 - 2^ceil(log(n-1)/log(2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, Apr 26 2020 (with nn > 2)

CROSSREFS

Cf. A049922 (similar, but with minus a(m/2)), A049970 (similar, but with plus a(m/2)), A049971 (similar, but with plus a(m)).

Sequence in context: A058533 A215413 A058644 * A184881 A007054 A084388

Adjacent sequences:  A049920 A049921 A049922 * A049924 A049925 A049926

KEYWORD

nonn,changed

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 08:11 EDT 2022. Contains 353826 sequences. (Running on oeis4.)