login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027874 Minimal degree path length of a tree with n leaves. 0
0, 4, 9, 16, 23, 30, 38, 46, 54, 64, 74, 84, 94, 104, 114, 124, 134, 144, 155, 166, 177, 188, 199, 210, 221, 232, 243, 256, 269, 282, 295, 308, 321, 334, 347, 360, 373, 386, 399, 412, 425, 438, 451, 464, 477, 490, 503, 516, 529, 542, 555, 568, 581, 594, 608 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

REFERENCES

Theorem 5.4.9L in D. E. Knuth, `The Art of Computer Programming', Volume 3.

LINKS

Table of n, a(n) for n=1..55.

Index entries for sequences related to trees

FORMULA

a(n)=3*q*n+2*(n-3^q), if 2*3^(q-1)<=n<=3^q; 3*q*n+4*(n-3^q), if 3^q<=n<=2*3^q.

MATHEMATICA

a[n_] := For[q = 0, True, q++, If[2*3^(q-1) <= n <= 3^q, Return[3*q*n + 2*(n-3^q)], If[3^q <= n <= 2*3^q, Return[3*q*n + 4*(n-3^q)]]]]; Array[a, 55] (* Jean-Fran├žois Alcover, Oct 26 2015 *)

CROSSREFS

Cf. A003314.

Sequence in context: A162207 A092614 A085899 * A009850 A009853 A008030

Adjacent sequences:  A027871 A027872 A027873 * A027875 A027876 A027877

KEYWORD

nonn,easy,nice

AUTHOR

Don Knuth

EXTENSIONS

More terms from James A. Sellers

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 6 03:18 EST 2016. Contains 278772 sequences.