I think you miscounted the number of edges in the octahedron. An octahedron looks like two pyramids glued together at their square base. There are four edges from the vertex of each pyramid and another four edges around the square base for a total of 12 edges in all.
But even with the correct three values it is impossible to find a formula. You need more data. You might want to add to this list: