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!)
A049942 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 3, 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. 4
1, 1, 3, 6, 12, 24, 48, 98, 199, 393, 786, 1574, 3151, 6308, 12628, 25280, 50610, 101123, 202246, 404494, 808991, 1617988, 3235988, 6472000, 12944050, 25888201, 51776596, 103553585, 207107958, 414217493, 828438143, 1656882606, 3313777864, 6627530449, 13255060898, 26510121798, 53020243599 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
From Petros Hadjicostas, Oct 25 2019: (Start)
a(n) = a(n - 1 - 2^ceiling(-1 + log_2(n-1))) + Sum_{i = 1..n-1} a(i) for n >= 3.
a(n) = a((1 + A006257(n-2))/2) + Sum_{i = 1..n-1} a(i) for n >= 3.
(End)
EXAMPLE
From Petros Hadjicostas, Oct 25 2019: (Start)
a(3) = a(3 - 1 - 2^ceiling(-1 + log_2(3-1))) + a(1) + a(2) = a(1) + a(1) + a(2) = 3.
a(4) = a(4 - 1 - 2^ceiling(-1 + log_2(4-1))) + a(1) + a(2) + a(3) = a(1) + a(1) + a(2) + a(3) = 6.
a(5) = a(5 - 1 - 2^ceiling(-1 + log_2(5-1))) + a(1) + a(2) + a(3) + a(4) = a(2) + a(1) + a(2) + a(3) + a(4) = 12.
a(6) = a(6 - 1 - 2^ceiling(-1 + log_2(6-1))) + a(1) + a(2) + a(3) + a(4) + a(5) = a(1) + a(1) + a(2) + a(3) + a(4) + a(5) = 24.
(End)
MAPLE
s := proc(n) option remember; `if`(n<1, 0, a(n)+s(n-1)) end:
a := proc(n) option remember; `if`(n<3, 1, s(n-1)+
a(n-3/2-1/2*Bits:-Iff(n-2, n-2)))
end:
seq(a(n), n=1..50); # Petros Hadjicostas, Oct 25 2019
CROSSREFS
Cf. A006257, A049894 (similar, but with minus a(m)), A049895 (similar, but with minus a(2*m)), A049943 (similar, but with plus a(2*m)).
Sequence in context: A170684 A003945 A007283 * A200463 A099844 A165929
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Petros Hadjicostas, Oct 25 2019
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 24 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)