re: Solve the sum of natural numbers using Ruby. VIEW POST

VIEW FULL DISCUSSION
 

Almost any regularly increasing range of numbers can be generalized like this!

Not all are super obvious, but if you see something like this in a coding challenge, figure out the equation (the above is sum(x)) and then try it out on wolframalpha.com

code of conduct - report abuse