cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A298043 #25 Jul 03 2025 15:24:29
%S A298043 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,
%T A298043 35,38,42,44,48,52,57,32,34,36,39,40,43,46,50,48,51,54,58,60,64,68,73,
%U A298043 64,67,70,74,76,80,84,89,88,92,96,101,104,109,114,120,64,66
%N 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.
%C A298043 This sequence is similar to A298011.
%H A298043 Rémy Sigrist, <a href="/A298043/b298043.txt">Table of n, a(n) for n = 0..8192</a>
%F A298043 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).
%F A298043 a(n) >= n with equality iff n = 0 or n = 2^k for some k >= 0.
%F A298043 a(2 * n) = 2 * a(n).
%F A298043 a(2^n - 1) = A000295(n + 1).
%F A298043 a(2 ^ i + n) = a(n) + 2 ^ i + n for 2 ^ i > n. - _David A. Corneth_, Jan 14 2018
%e A298043 For n = 42:
%e A298043   42 = 32 + 8 + 2,
%e A298043   hence a(42) = 1*32 + 2*8 + 3*2 = 54.
%o A298043 (PARI) a(n) = my (b=binary(n), z=0); for (i=1, #b, if (b[i], b[i] = z++)); return (fromdigits(b,2))
%Y A298043 Cf. A000120, A000295, A053645.
%Y A298043 Cf. A083741, A298011.
%K A298043 nonn,base,easy,look
%O A298043 0,3
%A A298043 _Rémy Sigrist_, Jan 11 2018