Is `n` always between 0 and 11? If so, then I would just return a C++ `int`. So you can just change
`RCP<const Integer> &n` to `&n`. And in the caller, just pass in an `int`. That way you avoid all the overhead of creating an RCP Integer, just to get the basic `int` out of it in the caller.