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

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

Hi;

I tried the following three expressions in M for n=10 and expected all of them to give the same answer, that being the sum of the first ten triangular numbers:

Sum[k(k+1)/2,{k,n}]

n(n+1)(n+2)/6

The output for the first two is 220 (as expected), but the third one gave this output:

1[2]/2 + 2[3]/2 + 3[4]/2 + 4[5]/2 + 5[6]/2 + 6[7]/2 + 7[8]/2 + 8[9]/2 + 9[10]/2 + 10[11]/2

That one also totals 220, but I'd like to know how to get M to output the total instead of the ten elements.

Thanks.

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Can I see your exact code that you used for the third one?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

I worked it out just now thanks, Bobby.

I hadn't entered Ctrl+Space to move the insertion point to the right of the Sigma.

*Edit 1: I've been unable to repeat the error since!* *Edit 2: Tried some more, and apparently I had a 'TraditionalForm expression' in a 'StandardForm cell' (whatever that means). So...nothing to do with the CTRL+Space insertion point move.*

*Last edited by phrontister (2015-05-06 04:30:54)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Okay, glad you are studying some M.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

Slowly, slowly.

My code was entered like this:

Esc sum Esc Ctrl+$ k=1 Ctrl+% n Ctrl+Space 1 Ctrl+/ 2 Ctrl+Space k(k+1)

This, in M-language code, converted to the following:

```
\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(k = 1\), \(n\)]\(
\*FractionBox[\(1\), \(2\)] k \((k + 1)\)\)\)
```

If you paste that converted code into M it will display in the Latex style.

*Last edited by phrontister (2015-05-06 03:59:12)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Slowly, slowly.

There is an old Chinese saying:

The oxen are slow but the earth is patient.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

Yes, good one. I can't find its origin, but there's some thought it originated in the 1983 Tom Selleck film, *High Road to China*.

I like this one too:

“It does not matter how slowly you go as long as you do not stop.” ― Confucius

*Last edited by phrontister (2015-05-05 21:44:49)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I am pretty sure they are right. That is the movie I heard it in.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

Re the quote from the movie:

The aphorism said by Struts (Jack Weston) was "The ox is slow but the earth is patient". Apparently, this saying is an ancient Buddhist proverb. Its meaning (according to a blog on Yahoo Answers) is :

The ox is universally a symbol of slow, plodding, working in the fields or rice paddies, dragging the plow. But it gets the job done. "The earth is patient" expresses the meaning that time does not matter to nature. On a symbolic level, the phrase refers to man, plowing the field with the ox. The earth (a symbolic representation of all nature) is not in a hurry. Seasons come and seasons go. All in its time...persistence and patience are virtues to be admired.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Persistence, the highest attribute anyone can have.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,613

Nothing in this world can take the place of persistence.

- Talent will not; nothing is more common than unsuccessful people with talent.

- Genius will not; unrewarded genius is almost a proverb.

- Education will not; the world is full of educated derelicts.

Persistence and determination alone are omnipotent.

Calvin Coolidge

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Here, here! Wunderbar!

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

Pages: **1**