%I #62 May 26 2024 15:00:05
%S 1,5,22,92,376,1520,6112,24512,98176,392960,1572352,6290432,25163776,
%T 100659200,402644992,1610596352,6442418176,25769738240,103079084032,
%U 412316598272,1649266917376,6597068718080,26388276969472,105553112072192,422212456677376
%N Sum of 2^n, ..., 2^(n+1) - 1.
%C a(n) = sum of next 2^n natural numbers. - _Amarnath Murthy_, Apr 17 2003
%C Sum of all proper binary numbers with n digits (i.e. those not beginning with 0). Cf. A101291 Sum of all numbers with n digits [base 10]. - _Jonathan Vos Post_, Sep 07 2006
%C a(n)/2^n gives the average eccentricity of the graphs of the Chinese rings puzzle with n+1 rings (also known as baguenaudier). - _Daniele Parisse_, Jun 02 2008
%H Alois P. Heinz, <a href="/A010036/b010036.txt">Table of n, a(n) for n = 0..1000</a>
%H A. M. Hinz, S. Klavžar, U. Milutinović, C. Petr, <a href="http://dx.doi.org/10.1007/978-3-0348-0237-6">The Tower of Hanoi - Myths and Maths</a>, Birkhäuser 2013. See page 59. <a href="http://tohbook.info">Book's website</a>
%H Andreas M. Hinz and Daniele Parisse, <a href="http://dx.doi.org/10.1007/s00373-011-1076-4">The Average Eccentricity of Sierpinski Graphs</a>, Graphs and Combinatorics, 2011.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6, -8).
%F a(n+1) = 4*a(n) + 2^n with a(0) = 1 (with a(0)=0, see A006516). a(n) = 2^(n-1)*A055010(n). - _Philippe Deléham_, Feb 20 2004
%F a(n) = 3*2^(2*n-1) - 2^(n-1). - _Daniele Parisse_, Jun 10 2007
%F From _Klaus Brockhaus_, Nov 27 2009: (Start)
%F a(n) = 6*a(n-1)-8*a(n-2) for n > 1; a(0) = 1, a(1) = 5.
%F G.f.: (1-x)/((1-2*x)*(1-4*x)). (End)
%F a(n) = Sum_{k, 0<=k<=n} A125185(n,k)*2^k. - _Philippe Deléham_, Feb 26 2012
%F a(n) = A006516(n+1)-A006516(n). - _R. J. Mathar_, Mar 06 2017
%p f:= n-> 3*2^(2*n-1)-2^(n-1): seq(f(n), n=0..30);
%t Table[2^n (2^n+(2^(n+1)-1))/2,{n,0,25}] (* or *) LinearRecurrence[{6,-8},{1,5},30] (* _Harvey P. Dale_, Jan 23 2012 *)
%t With[{nn=30},Total/@TakeList[Range[2^(nn+1)-1],2^Range[0,nn]]] (* _Harvey P. Dale_, May 26 2024 *)
%o (Magma) [ &+[ k: k in [2^n..2^(n+1)-1] ]: n in [0..21] ]; // _Klaus Brockhaus_, Nov 27 2009
%o (PARI) a(n)=3<<(2*n-1)-1<<(n-1) \\ _Charles R Greathouse IV_, Jul 02 2013
%o (Magma) [2^n *(2^n+(2^(n+1)-1))/2: n in [0..25]]; // _Vincenzo Librandi_, Sep 11 2015
%Y Cf. A010036.
%Y Partial sums are in A006516, A006095.
%K nonn,easy
%O 0,2
%A Steve King (ITTTUCSON(AT)aol.com)