Jump to content

Is there an easier way to do this?

Featured Replies

Is there an easier way to find the sum of all whole numbers between x and y (including x and y themselves) than to just sit there and painstakingly add every one up individually?

 

Like, for example, I know that an easier way to find the cumulative product of all whole numbers between 1 and x all multiplied together is to simply punch in the equation "x!" into a calculator, so you don't have to painstakingly multiply 1*2*3*4*5...*x. Is there a similar "shortcut" for addition?

  • 3 weeks later...

the sum of all integers between x and y included is equal to (y-x+1)*(x+y)/2.

 

Here's why: (x+y)/2 is the means of integers between x and y, and there are y-x+1 terms.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.