We derived recusion formulas for the canonical partition functions for Bose-Einstein and Fermi-Dirac statistics. The numerical effort for the calculation of the partition functions grows only with the square of the particle number. E.g. the recursion for Bose-Einstein statistics could be applied to calculate the thermodynamic properties of Bose-Einstein condensates ( BEC ) in ion traps. ( A Fortran implementaion of the recusion formulas with multiple precision arithmetics is available upon Email request.)