The Padmakar–Ivan ( P I ) index is a distance-based topological index and a molecular structure descriptor, which is the sum of the number of vertices over all edges u v of a graph such that these vertices are not equidistant from u and v. In this paper, we explore the results of P I -indices from trees to recursively clustered trees, the k-trees. Exact sharp upper bounds of PI indices on k-trees are obtained by the recursive relationships, and the corresponding extremal graphs are given. In addition, we determine the P I -values on some classes of k-trees and compare them, and our results extend and enrich some known conclusions.