Points $A,$ $B,$ and $C$ are given in the coordinate plane. There exists a point $Q$ and a constant $k$ such that for any point $P$, PA^2 + PB^2 + PC^2 = 3PQ^2 + k. If $A = (2,4),$ $B = (-3,1),$ and $C = (1,7)$, then find the constant $k$.