In Matula (1968), D.W. Matula described a bijection between N and the set of rooted trees; the number is called the Matula number of the rooted tree. The Gutman-Ivic-Matula (GIM) function g(n) computes the number of edges of the tree with Matula number n. Since there is a prefix-free code for the set of prime numbers such that the codelength of each prime p is 2g(p), we show how some results about the GIM function can be obtained trivially from coding theorems. (C) 2014 Elsevier B.V. All rights reserved.