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!)
A298043 If n = Sum_{i=1..h} 2^b_i with b_1 > ... > b_h >= 0, then a(n) = Sum_{i=1..h} i * 2^b_i. 3
0, 1, 2, 4, 4, 6, 8, 11, 8, 10, 12, 15, 16, 19, 22, 26, 16, 18, 20, 23, 24, 27, 30, 34, 32, 35, 38, 42, 44, 48, 52, 57, 32, 34, 36, 39, 40, 43, 46, 50, 48, 51, 54, 58, 60, 64, 68, 73, 64, 67, 70, 74, 76, 80, 84, 89, 88, 92, 96, 101, 104, 109, 114, 120, 64, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is similar to A298011.
LINKS
FORMULA
a(n) = Sum_{k = 0..A000120(n)-1} A053645^k(n) for any n > 0 (where A053645^k denotes the k-th iterate of A053645).
a(n) >= n with equality iff n = 0 or n = 2^k for some k >= 0.
a(2 * n) = 2 * a(n).
a(2^n - 1) = A000295(n + 1).
a(2 ^ i + n) = a(n) + 2 ^ i + n for 2 ^ i > n. - David A. Corneth, Jan 14 2018
EXAMPLE
For n = 42:
42 = 32 + 8 + 2,
hence a(42) = 1*32 + 2*8 + 3*2 = 54.
PROG
(PARI) a(n) = my (b=binary(n), z=0); for (i=1, #b, if (b[i], b[i] = z++)); return (from digits(b, 2))
CROSSREFS
Sequence in context: A112921 A339905 A215205 * A325245 A241064 A292671
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Jan 11 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 31 19:57 EDT 2024. Contains 373003 sequences. (Running on oeis4.)