%I #30 Sep 08 2022 08:45:11
%S 1,7,36,164,704,2928,11968,48448,195072,783104,3138560,12567552,
%T 50298880,201256960,805158912,3220914176,12884246528,51538231296,
%U 206155546624,824627691520,3298522300416,13194113318912,52776503607296
%N a(n) = 3*4^n - (n+4)*2^(n-1).
%C Binomial transform of A060188.
%C The depth i nodes of a perfect binary tree are numbered 2^i through 2^(i+1) - 1, so that the root has number 1, depth 1 nodes have numbers 2 and 3, depth 2 nodes have numbers 4, 5, 6 and 7 and so on. We sum all the numbers in the path connecting a leaf node to the root. For a height n tree, a(n) is the sum of these sums for all leaves nodes. So for instance a height 1 tree has paths 1, 2 and 1, 3 connecting the root to the leaves, and (1+2) + (1+3) = a(1) = 7. This interpretation suggests a recursive formula for computing a(n) by completing the paths covered in a(n-1) and adding the leaves. - _Jean M. Morales_, Oct 24 2013
%H Vincenzo Librandi, <a href="/A085354/b085354.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (8,-20,16).
%F a(n) = Sum_{m = 2^n..2^(n+1)} A005187(m). a(n) = 2^n*(2^(n+1)-1) + Sum_{k = 0..(n-1)} a(k). - _Philippe Deléham_, Feb 19 2004
%F G.f.: (1-x)/((1-4*x)*(1-2*x)^2). - _Bruno Berselli_, Sep 05 2011
%F a(n) = 2*a(n-1) + 3*2^(2n-1) - 2^(n-1), a(0) = 1. - _Jean M. Morales_, Oct 24 2013
%t Table[3 * 4^n - (n + 4) * 2^(n - 1), {n, 0, 19}] (* _Alonso del Arte_, Oct 23 2013 *)
%t LinearRecurrence[{8,-20,16},{1,7,36},30] (* _Harvey P. Dale_, Apr 08 2019 *)
%o (Magma) [3*4^n-(n+4)*2^(n-1): n in [0..30]]; // _Vincenzo Librandi_, Sep 05 2011
%K nonn,easy
%O 0,2
%A _Paul Barry_, Jun 24 2003
|