Write a function `right_insertion(a, x)` that determines the index at which a specified value `x` should be inserted into a sorted list `a` to maintain the sorted order. If `x` is already present in the list, the function should return the index after the last occurrence of `x`.
#### Example Usage
```python [main.nopy]
right_insertion([1, 2, 4, 5], 6) # Output: 4
right_insertion([1, 2, 4, 5], 3) # Output: 2
right_insertion([1, 2, 4, 5], 7) # Output: 4
```
#### Constraints
- The input list `a` is guaranteed to be sorted in ascending order.
- The function should have a time complexity of O(log n).
- You may use Python's built-in libraries to assist in solving the problem.