Generalization of Euler and Ramanujan’s Partition Functions