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.
%I A289399 #21 Apr 26 2021 02:44:47 %S A289399 0,3,21,102,426,1641,6015,21324,73812,250959,841449,2790066,9167358, %T A289399 29893557,96855123,312088728,1000836264,3196219035,10169787837, %U A289399 32252755710,101988443730,321655860993,1012039172391,3177332285412,9955641160956,31137856397031 %N A289399 Total path length of the complete ternary tree of height n. %H A289399 Colin Barker, <a href="/A289399/b289399.txt">Table of n, a(n) for n = 0..1000</a> %H A289399 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-15,9). %F A289399 From _Colin Barker_, Jul 05 2017: (Start) %F A289399 G.f.: 3*x / ((1 - x)*(1 - 3*x)^2). %F A289399 a(n) = 3*(1 - 3^n + 2*3^n*n) / 4. %F A289399 a(n) = 7*a(n-1) - 15*a(n-2) + 9*a(n-3) for n>2. %F A289399 (End) %e A289399 The complete ternary tree of height two consists of one root node (at depth 0), three children of the root (at depth 1) and 9 leaf nodes (at depth 2). Thus a(2) = 0 + 3*1 + 9*2 = 21. %o A289399 (PARI) concat(0, Vec(3*x / ((1 - x)*(1 - 3*x)^2) + O(x^30))) \\ _Colin Barker_, Jul 05 2017 %Y A289399 Partial sums of A036290. %K A289399 nonn,easy %O A289399 0,2 %A A289399 _F. Skerman_, Jul 05 2017