A resource is a resource. It can change, mutate, flip upside-down, or anything over its lifetime. Your resource in the first case isn't the random number, but the random number generator.
As Darrel said, it's not essential that all given resources support all HTTP's methods to be RESTful. Heck, I've a RESTful system that has various collection resources that allow GET (to fetch the collection), and POST (to append a new resource to the collection and possibly other collections at the same time, which then points to the newly created resource elsewhere), whereas other resources support GET, PUT (for updates), and DELETE. The key thing about a RESTful interface is that it's universally applicable--i.e., the protocol's methods can plausibly be applied in a general manner to many different kinds of resource--which is quite universally used, which would mean that all resources would need to implement the full interface.
HTTPs methods have well defined semantics. If their semantics apply to your resource in a sane manner, then implement them. If not, don't, or construct a separate resource that does.
In the context of HTTP, GET is a perfectly fine way to do something like your example of summation. Look at any search engine: they all use GET to do search, which is perfectly RESTful. Note though that your browser doesn't have out of band information on how to construct the URL of the resource representing your search, but by downloading a page containing a form, it downloads instructions on how to do it. This is part of the essence of HATEOAS and self description, which you're bound to stumble across as you learn more.