Product (k**2,(k,1,m))
factorial(m)**2
(Product(k**2, (k, 1, m))).doit()
Need more control? Try SymPy Live.