|
|
A085354
|
|
a(n) = 3*4^n - (n+4)*2^(n-1).
|
|
2
|
|
|
1, 7, 36, 164, 704, 2928, 11968, 48448, 195072, 783104, 3138560, 12567552, 50298880, 201256960, 805158912, 3220914176, 12884246528, 51538231296, 206155546624, 824627691520, 3298522300416, 13194113318912, 52776503607296
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
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
|
|
LINKS
|
|
|
FORMULA
|
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
a(n) = 2*a(n-1) + 3*2^(2n-1) - 2^(n-1), a(0) = 1. - Jean M. Morales, Oct 24 2013
|
|
MATHEMATICA
|
Table[3 * 4^n - (n + 4) * 2^(n - 1), {n, 0, 19}] (* Alonso del Arte, Oct 23 2013 *)
LinearRecurrence[{8, -20, 16}, {1, 7, 36}, 30] (* Harvey P. Dale, Apr 08 2019 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|