SALEM – A Lynn man who bragged about robbing a local bank of an undetermined amount of cash three months ago pleaded guilty and received four-and-one-half to six years in state prison.Richard C. Thorne, 29, who had been living at a rooming house on Washington Street, Lynn, made his plea Wednesday afternoon in Salem Superior Court to a charge of armed robbery before Judge Howard J. Whitehead.Assistant District Attorney Jean M. Curran said the charge arises out of an incident shortly before 1 p.m. on March 12 when a man, later identified as Thorne, walked into the Bank of America branch bank located at 2 State St. in Lynn.The female bank teller told authorities the would-be robber was wearing a red ball cap and red Boston T-shirt. He approached her, handed a note that read, “I got a gun and will use. Give me money and this note back. Wait 3 min to call police. This is no joke.”The frightened teller turned over an undetermined amount of cash and the robber left the bank, but without the note.A few days later, police were tipped by an anonymous caller who fingered Thorne as the robber, saying Thorne was telling everyone he robbed the bank.Police arrested Thorne about two weeks later in Peabody following an investigation.Curran was looking for a harsher punishment, proposing a seven- to eight-year prison term based on the fact that Thorne had a prior conviction for armed robbery in which he had received three to five years in state prison and was violated.Defense lawyer Rebecca E. Whitehill asked for a four-year penalty, telling Whitehead that her client was a drinker and had recently got involved with heroin use but, from the onset of the case, he was willing to take responsibility for his actions.The judge credited Thorne the 83 days he has spent in jail in lieu of bail awaiting trial on the case.