How will you do it ? (III)

a = 1 10 b = a 10 c = b 10 ( a × b + c ) \large \sum_{a=1}^{10} \sum_{b=a}^{10} \sum_{c=b}^{10}{\left( {a \times b+c} \right)}

What is the number of terms in the series given above?

Details and Assumptions:

  • ( 1 × 1 + 1 ) \left({1 \times 1+1}\right) and ( 1 × 1 + 2 ) \left({1 \times 1+2}\right) are the 1 st 1^{\textrm{st}} and the 2 nd 2^{\textrm{nd}} terms of the series respectively.

this problem is a part of the set Fundamental Programming
220 202 101 110

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Arulx Z
Jan 5, 2016

Python one-liner

1
sum(1 for a in xrange(1, 11) for b in xrange(a, 11) for c in xrange(b, 11))

Masbahul Islam
Jan 4, 2016

Excel vba code:

s = 0

For a = 1 To 10

For b = a To 10

For c = b To 10

s = s + 1

Next c, b, a

MsgBox s

Zeeshan Ali
Jan 3, 2016

Here is an algorithm which does your required work;

1
2
3
4
5
6
    terms<-0
    for a<-1 to 10
        for b<-a to 10
            for c<-b to 10
                terms<-terms+1
    return terms

Isn't that so simple.!?

Moderator note:

What is the combinatorics approach to this? In particular, note that ( 12 3 ) = 220 { 12 \choose 3 } = 220 .

I don't think it can be generalized in this way for any integer n such that the series is: a = 1 n b = a n c = b n ( a × b + c ) = ( 1 × 1 + 1 ) + ( 1 × 1 + 2 ) + . . . \large \sum_{a=1}^{n} \sum_{b=a}^{n} \sum_{c=b}^{n}{\left( {a \times b+c} \right)}=\left({1 \times 1+1}\right)+\left({1 \times 1+2}\right)+... Moreover I am NOT requiring the sum rather I wanna know the total number of terms of that series.

Zeeshan Ali - 5 years, 5 months ago

Algebraic: Basically, with a=1, c is from 1-10, plus 2-10, plus 3-10, etc... is 10+9+8...+1 terms with a=2, c is from 2-10, 3-10, 4-10, etc... --> is 9+8+7...+1 terms 1 ten, 2 nines, 3 eights, 4 sevens, 5 sixes. You can go all the way to ten or multiply that by 2 since the equation will be symmetrical. (10+9 2+8 3+7 4+6 5)*2

Alex Li - 5 years, 1 month ago

We can show that C(12,3) is the answer. For each triplet (a,b,1,c1) from C(12,3) we take triplet (a,b1-1,c1-2) and b1-1>=a, c1-2>=b so it is part of our sum.

Hasmik Garyaka - 3 years, 8 months ago
Hasmik Garyaka
Oct 15, 2017

(n+1)3-n3=3n2+3n+1

summa((0,n)3n2+3n+1)=(n+1)3

summa((0,n)3n2+3n)=(n+1)3-(n+1)=n(n+1)(n+2)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...