It is well known that the knowledge of the characteristic polynomial $p(x)$ and of the minimal polynomial $m(x)$ of an $3 \times 3$ matrix , determines its Jordan Normal form. But for an $n \times n$ matrix with $n>3$ we can have more than one Jordan form for given $p(x)$ and $m(x)$.
As an example, for a $6\times 6$ matrix with $p(x)=(x-2)^4(x-3)^2$ and $m(x)=(x-2)^2(x-3)^2$ we can have two (not similar) Jordan forms, one with one block of dimension $2$ for the eigenvalue $x=2$ and the other with two blocks of dimension $2$ for this same eigenvalue.
Given the dimension of the matrix and the two polynomials $p(x)$ and $m(x)$, I can enumerate the possible Jordan forms, using the fact that the $p(x)$ gives all the eigenvalues with their algebraic multiplicity and $m(x)$ gives the maximum dimension of the Jordan blocks for any eigenvalue.
But, for increasing $n$, this procedure becomes a long road, so I'm searching if there is some formula that counts the possible Jordan forms for given $p(x)$ and $m(x)$, also for matrices of great dimension.
More general: for an $n \times n$ matrix how many consistent couples of factorizations of the characteristic and minimal polynomial we can have? And how many non similar Jordan forms are compatible with any couple of factorizations? And eventually, how many are all the possible Jordan forms (not similar) for a given set of eigenvalues?
PS: this question is related to the other question that, maybe, can be useful for an answer (but I don't see how...)
I dont know if it helps but I reprased the question in combinatorial terms. Let $T(n,k)$ be the number of distinct ways you can obtain $n$ as the sum of non zero naturals less than or equal to $k$. eg: $$3=1+1+1=2+1 \implies T(3,2)=2$$
Let the following be the factorizations of the polinomials: $$\begin{align}p(x)=\prod_{ k=1 } ^{l} (x-\lambda_k)^{i_k} && m(x)=\prod_{ k=1 }^{l}(x-\lambda_k)^{j_k} \end{align} $$ Whe know that $\forall k, 1 \leq k \leq l$ the jordan form has at least a block of type $( \lambda_k,j_k)$, the sum of the sizes of all jordan bloks realative to $\lambda_k$ is equal to $i_k$ and the size of each block is comprised between $1$ and $j_k$. The number of classes of equivalence of matrices with the given polynomials is then $$\prod_{k=1}^l T(i_k - j_k,j_k) $$ A recursive formula for $T(n,k)$ lifted from OEIS - A026820 is: $$T(n,k) = T(n,k-1) + T(n-k,k)$$