bash should also know (( )) arythmetic as an equivalent for the let command:
(( a=a%5 ))
(( a=a % 5 ))
And there's really no need for the $s, "let" knows about the value of variables or tokens without the need for variable substitution by the shell...
let a=a%5
let a=$a%5
let a=${a}%5
let a='a % 5'
let a="a % 5"
let a="$a % 5"
let a="${a} % 5"
If you do want to use "let" and $s and spaces for clarity, you also have to use double quotes or the shell won't substitute the variable values. (Variable substitution doesn't occur inside single quotes)
HTH,
p5wizard