SALEM – A Lynn father of five who admitted to dealing cocaine from his Green Street apartment in 2006 is headed to state prison 2 and a half to 4 years after confessing to a reduced charge.Victor Valera, 34, of 114 Green St., #3, changed his plea last week in Salem Superior Court to guilty to a charge of possession with the intent to distribute cocaine before Judge Howard J. Whitehead.The sentence imposed was the result of a recommendation by prosecutors and defense.Just before 9 p.m. on May 20, police raided his Green Street apartment and seized 26.82 grams (nearly an ounce) of cocaine.Police said they found a twist of cocaine in his possession and two more bags of cocaine in a bedroom along with a heat sealer and cocaine residue on it. They also found four cell phones and documentation linking Valera to the apartment.Valera had been charged with trafficking over 14 grams of cocaine, which carries a minimum mandatory punishment of 3 years in state prison and up to 10 years. However, as a part of a plea deal, the charge was reduced in exchange for his confession.Because he now has a drug conviction, Valera will lose his driving privileges in Massachusetts for the next five years.The judge credited him the 267 days he has spent in jail awaiting trial.Assistant District Attorney Karen H. Hopwood prosecuted the case and Russell Sobelman of Lynn was the defense lawyer.