login
This site is supported by donations 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. 2
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

Rémy Sigrist, Table of n, a(n) for n = 0..8192

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

Cf. A000120, A000295, A053645, A298011.

Sequence in context: A263021 A112921 A215205 * A325245 A241064 A292671

Adjacent sequences:  A298040 A298041 A298042 * A298044 A298045 A298046

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 16:34 EDT 2019. Contains 325185 sequences. (Running on oeis4.)