A356918 Triangle read by rows where T(n,k) is Colijn and Plazzotta's distance metric d_1(n,k) between rooted binary tree numbers n and k, for 1 <= k <= n.
0, 2, 0, 4, 2, 0, 6, 4, 4, 0, 6, 4, 2, 4, 0, 8, 6, 4, 4, 4, 0, 10, 8, 6, 6, 6, 4, 0, 8, 6, 6, 2, 6, 4, 6, 0, 10, 8, 8, 4, 8, 6, 6, 4, 0, 12, 10, 8, 6, 8, 6, 6, 6, 4, 0, 14, 12, 12, 8, 12, 10, 10, 8, 6, 6, 0, 8, 6, 4, 6, 2, 4, 6, 6, 8, 8, 12, 0
Offset: 1
Examples
Triangle begins: k=1 2 3 4 5 6 7 8 n=1: 0, n=2: 2, 0, n=3: 4, 2, 0, n=4: 6, 4, 4, 0, n=5: 6, 4, 2, 4, 0, n=6: 8, 6, 4, 4, 4, 0, n=7: 10, 8, 6, 6, 6, 4, 0, n=8: 8, 6, 6, 2, 6, 4, 6, 0, ... For n=68,k=4, rows 68 and 4 from A356917 are as follows and their multiset symmetric difference has T(68,4) = 8 terms. n=68: 1,1,1,1,1,1, 2, 3, 5,12,68 k= 4: 1,1,1,1, 2,2, 4 diff: 1,1, 2, 3, 4, 5,12,68
Links
- Kevin Ryde, Table of n, a(n) for rows 1..150, flattened
- Caroline Colijn, Treetop, R Code, see labeldistance() and distunlab().
- Caroline Colijn and Giacomo Plazzotta, A Metric on Phylogenetic Tree Shapes, Systematic Biology, volume 67, number 1, January 2018, pages 113-126, see section 2.3 d_1.
- Kevin Ryde, PARI/GP Code
Crossrefs
Programs
-
PARI
\\ See links.
-
R
# See links.
Formula
T(n,k) = Sum_{s = subtree numbers in n or k} abs(v_n(s) - v_k(s)) where v_t(s) is the number of times s occurs in row t of A356917.
Comments