login
Numerator of Sum_{i=1..n} i/2^i.
4

%I #70 Sep 05 2023 16:16:52

%S 0,1,1,11,13,57,15,247,251,1013,509,4083,4089,16369,2047,65519,65527,

%T 262125,131067,1048555,1048565,4194281,1048573,16777191,16777203,

%U 67108837,33554425,268435427,268435441,1073741793,67108863,4294967263,4294967279,17179869149

%N Numerator of Sum_{i=1..n} i/2^i.

%D C. C. Clawson, The Beauty and Magic of Numbers. New York: Plenum Press (1996): 95.

%H Colin Barker, <a href="/A036295/b036295.txt">Table of n, a(n) for n = 0..1000</a>

%H A. F. Horadam, <a href="http://www.fq.math.ca/Scanned/12-3/horadam.pdf">Oresme numbers</a>, Fib. Quart., 12 (1974), 267-271.

%F a(n) = numerator(2-(n+2)/2^n).

%F If n+2=2^k*m with m odd, then a(n) = 2^(n+1-k) - m.

%F For n >= 1, a(n) = A000265(A000295(n+1)). - _Peter Munn_, May 30 2023

%F a(n) = A000295(n+1)/A006519(n+2). - _Ridouane Oudra_, Jul 16 2023

%F Numerators of coefficients in expansion of 2*x / ((1 - x) * (2 - x)^2). - _Ilya Gutkovskiy_, Aug 04 2023

%p seq(numer(2-(n+2)/2^n), n=0..50); # _Ridouane Oudra_, Jul 16 2023

%t a[n_] := Module[{k, m}, For[k = 0; m = n + 2, EvenQ[m], k++, m/=2]; 2^(n + 1 - k) - m]

%t Table[Numerator[Sum[i/2^i, {i, n}]], {n, 40}] (* _Alonso del Arte_, Aug 12 2012 *)

%o (PARI) concat(0, vector(100, n, numerator(sum(i=1, n, i/2^i)))) \\ _Colin Barker_, Nov 09 2014

%o (PARI) a(n) = numerator(2-(n+2)/2^n); \\ _Joerg Arndt_, Jul 17 2023

%o (Magma) [0] cat [Numerator(&+[i/2^i: i in [1..n]]): n in [1..40]]; // _Vincenzo Librandi_, Nov 09 2014

%Y Cf. A036296 (denominators).

%Y Cf. A000265, A000295, A006519.

%K nonn,easy,frac

%O 0,4

%A _N. J. A. Sloane_