O.J. Simpson is concerned Bill Cosby will be attacked by some "nut" in prison -- and he would know, right?
Juice spent 9 years behind bars in Nevada for kidnapping and armed robbery and warns that people like Cosby -- convicted sex offenders -- don't do well behind bars.
"The problem is the nature of the crime," O.J. said while golfing out in Nevada ... "Rapists are frowned upon in prison."
"I'm sure there will be guys protecting him but they're gonna have to put him in protective custody ... because it takes one nut, ya know?"
81-year-old Cosby was convicted of 3 counts of aggravated indecent assault -- stemming from a 2004 incident in which officials say he drugged Andrea Constand at his Pennsylvania home and molested her.
He's been sentenced to 3 to 10 years in state prison.
But, Simpson thinks the punishment is too severe -- and he's calling for mercy.
"With his health and his age and the nature of the crime, there's not a warden in this country wants the responsibility of a Bill Cosby. I think they should let him do his time under house arrest."