cp's OEIS Frontend

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.

A343006 Internal path length of the rooted tree with Matula-Goebel number n.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 1, 0, 2, 3, 6, 1, 3, 1, 4, 0, 3, 2, 1, 3, 2, 6, 5, 1, 6, 3, 3, 1, 6, 4, 10, 0, 7, 3, 4, 2, 3, 1, 4, 3, 6, 2, 3, 6, 5, 5, 8, 1, 2, 6, 4, 3, 1, 3, 9, 1, 2, 6, 6, 4, 5, 10, 3, 0, 6, 7, 3, 3, 6, 4, 6, 2, 5, 3, 7, 1, 7, 4, 10, 3, 4, 6, 9, 2, 6, 3, 7, 6, 3, 5, 4, 5, 11, 8, 4, 1, 11, 2, 8, 6
Offset: 1

Views

Author

François Marques, Apr 02 2021

Keywords

Comments

The internal path length of a rooted tree is defined as the sum of the distances of all internal nodes to the root.
The Matula-Goebel number of a rooted tree is defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m >= 2 there corresponds the product of the Matula-Goebel numbers of the m branches of T.

Examples

			a(7) = 1 because the rooted tree with Matula-Goebel number 7 is the rooted tree Y (0+1).
a(2^m) = 0 because the rooted tree with Matula-Goebel number 2^m is a star with m edges and therefore has only one internal node: its root.
a(3^m) = m because the rooted tree with Matula-Goebel number 3^m is a star with m branches of length 2, so the internal nodes are the root and the m nodes attached to it.
		

Crossrefs

Programs

  • PARI
    InIpl(n)={ if(n==1, return([0,0]),
        my(f=factor(n)~, v=Mat(vector(#f,k,InIpl(primepi(f[1,k]))~))  );
        return( [ 1+sum(k=1,#f,v[1,k]*f[2,k]) , sum(k=1,#f,(v[1,k]+v[2,k])*f[2,k]) ] ) )
    };
    A343006(n) = InIpl(n)[2];

Formula

a(n) = A196047(n) - A196048(n).
a(r*s) = a(r) + a(s).