Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °




Not registered yet?

#1 2013-12-17 07:45:09


building an equation

I am looking for an equation that will sum the number of digits of a number i.e. for 4, 1 + 2 +3 + 4 = 10 for 5, 1 +2 +3 + 4 + 5 = 15. I want to replace 4 and 5 with a variable so that any number can be added up to give an answer.

#2 2013-12-17 07:52:39

Real Member


Re: building an equation

So, you want the sum 1+2+3+...+(n-1)+n?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#3 2013-12-17 08:37:14

bob bundy


Re: building an equation

hi Mitchell

Welcome to the forum.

Known as the sum of counting numbers (or triangle numbers) formula,  what you want is:

The diagram below shows where it comes from.

If you stack up n then n-1, then n-2 ....... 3, 2, 1 squares it makes a sort of right angled triangle.

Then make the same again but turn this stack up-side-down and slot it into the triangle to make a rectangle.

The rectangle is 'n' high and n+1 wide so its area is n(n+1).

But we've made twice the sum you want, so divide by 2.

That's it.  smile


Uploaded Images
View Image: triangle numbers.gif      

Last edited by bob bundy (2013-12-17 08:39:16)

You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Board footer

Powered by FluxBB