I have a logic for this one....

Firstly, I develop a program that will search for unique primes of a given no. n, and store them in an array a, and return it.
Secondly, for each aaray element, I store the maximum power of the prime a[i] that divides n in the i'th place of another array b, having the same size of a.
Finally I print the sequence as....

Code:
printf("n=");
for(i=0;i<m;i++)                                /* m is the no. of elements in a (or b) */
    printf("%d^%d.", a[i], b[i]);             /* I use ^ to implement the "to the power" symbol */
Thus the output will be....
Code:
54=2.3^3
I think this will work....cheers everyone...