Sum[Boole[i != 5]*(3*i + 2), {i, 1, 10}]
Thank you very much my dear friend, I do feel grateful to you.