The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A321154 a(n) = s(n)*r - s(2^r + n), where s(n) = A002487(n) starting at n = 0 and r = 1 + floor(log_2(n)). 0
-1, -1, 0, 1, 1, 4, 3, 5, 2, 9, 7, 12, 5, 13, 8, 11, 3, 16, 13, 23, 10, 27, 17, 24, 7, 25, 18, 29, 11, 26, 15, 19, 4, 25, 21, 38, 17, 47, 30, 43, 13, 48, 35, 57, 22, 53, 31, 40, 9, 41, 32, 55, 23, 60, 37, 51, 14, 47, 33, 52, 19, 43, 24, 29, 5, 36, 31, 57, 26, 73, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
The same sequence arises for any integer value r > 1 + floor(log_2(n)).
The maximum value of a(n) between n=2^k and n=2^(k+1) is the k-th term of A023619.
LINKS
FORMULA
a(0)=-1; a(1)=-1;
a(2n) = a(n) + s(n);
a(2n+1) = a(n) + a(n+1) + s(2n+1).
a(n) = A156140(n) - A002487(n).
MATHEMATICA
s[0] = 0; s[1] = 1; s[n_?EvenQ] := s[n] = s[n/2]; s[n_?OddQ] := s[n] = s[(n + 1)/2] + s[(n - 1)/2];
a[0]=-1; a[1]=-1; a[n_?EvenQ] := a[n] = a[n/2]+s[n/2]; a[n_?OddQ] := a[n] = s[(n + 1)/2] + s[(n - 1)/2]+a[(n + 1)/2] + a[(n - 1)/2]
CROSSREFS
Sequence in context: A081665 A131911 A254037 * A011206 A326768 A328237
KEYWORD
sign
AUTHOR
Aubrey Laskowski, Oct 28 2018
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 27 19:11 EDT 2024. Contains 372882 sequences. (Running on oeis4.)