Generalized Noether symmetry in f(T) gravity