You are on page 1of 4

CS-210 Discrete Mathematics LUMS

CS-210 Assignment 3
Shabbir Kamal Student ID: 25100132
October 10, 2022

1 Question 2
P8
1. j=0 (2j+1 − 2j )

= (20+1 − 20 ) + (21+1 − 21 ) + (22+1 − 22 ) + (23+1 − 23 ) + (24+1 − 24 ) + (25+1 −


25 ) + (26+1 − 26 ) + (27+1 − 27 ) + (28+1 − 28 )

= (2 − 1) + (4 − 2) + (8 − 4) + (16 − 8) + (32 − 16) +


(64 − 32) + (128 − 64) + (256 − 128) + (512 − 256)

= 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256

= 511

P5 P5
2. i=1 i2 + i=1 7

= (1)2 + (2)2 + (3)2 + (4)2 + (5)2 + 7 + 7 + 7 + 7 + 7

= 1 + 4 + 9 + 16 + 25 + 7 + 7 + 7 + 7 + 7

= 90

P4
3. i=1 (i2 + i)

= (12 + 1) + (22 + 2) + (32 + 3) + (42 + 4)

= (1 + 1) + (4 + 2) + (9 + 3) + (16 + 4)

= 2 + 6 + 12 + 20

= 40

P4 P4
4. k=1 k2 + k=1 k

= (1)2 + (2)2 + (3)2 + (4)2 + (1) + (2) + (3) + (4)

= 1 + 4 + 9 + 16 + 1 + 2 + 3 + 4

= 40

Shabbir Kamal: 25100132@lums.edu.pk 1


CS-210 Discrete Mathematics LUMS

P4
5. i=0 (3i2 + 2i)

= (3(02 ) + 2(0)) + (3(12 ) + 2(1)) + (3(22 ) + 2(2)) + (3(32 ) + 2(3)) + (3(42 ) + 2(4))

= (0 + 0) + (3 + 2) + (12 + 4) + (27 + 6) + (48 + 8)

= 0 + 5 + 16 + 33 + 56

= 110

P4 P4
6. 3 k=0 k2 + 2 k=0 k

= 3(02 ) + 3(12 ) + 3(22 ) + 3(32 ) + 3(42 ) + 2(0) + 2(1) + 2(2) +


2(3) + 2(4)

= 0 + 3 + 12 + 27 + 48 + 0 + 2 + 4 + 6 + 8

= 110

P3000
7. k=111 k

= 111 + 112 + 113 + 114 + ... + 2997 + 2998 + 2999 + 3000

= 495395

Pn
8. k=−n k

= (−n) + (−n + 1) + (−n + 2) + ... + (n − 2) + (n − 1) + n

= 0

2 Question 4
1. General Rule : n2 + 2
N ext T hree T erms : 123, 146, 171

2. General Rule : 3 + 4n
N ext T hree T erms : 47, 51, 55

3. General Rule : Convert n to binary


N ext T hree T erms : 1100, 1101, 1110

4. General Rule : 3n−1 − 1


N ext T hree T erms : 559048 177146 531440

(2n)!
5. General Rule : n!∗2 n

N ext T hree T erms : 654729075, 13749310575, 316234143225

Shabbir Kamal: 25100132@lums.edu.pk 2


CS-210 Discrete Mathematics LUMS

6. GeneralRule : Only two digits exist in the series (0, 1). These digits appear alternatively in the
series. The digits repeat n times starting from 1.
The first term is 1 with nterm = 1 and hence is repeated only once
The second term is 0 (following the alternative pattern) with nterm = 2 and hence is repeated 2 times.
N ext T hree T erms : 0, 0, 0

n−1
7. General Rule : 22
N ext T hree T erms : 18446744073709551616, 340282366920938463463374607431768211456,
115792089237316195423570985008687907853269984665640564039457584007913129639936

3 Question 6
x (x − 1)
F ormula f or T riangular N umber : 2 , Tx−1 = (x − 1)th T riangular N umber
Let an = a x (x − 1)
2

x (x − 1)
=⇒ n = 2

=⇒ 2 n = x2 − x
=⇒ x2 − x − 2 n = 0

−b± b2 − 4 a c
U sing Quadratic F ormula : 2a

1± 1+8n
=⇒ x = 2

∵ T he Sequence only contains P ositive Integers.


Hence, Only the positive value of x will be considered.
The sequence is: 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, ...

F or n = 3 , x = 3 [in the series ,→ 3]


F or n = 4 , x = 3.372 [in the series ,→ 3]
F or n = 5 , x = 3.7 [in the series ,→ 3]

Therefore, the floor of the value of x equals an

Moreover, The trend shows n ≤ x < n+1 =⇒ an = ⌊x⌋


√ q
⌊x⌋ = ⌊ 1 ± 12 + 8 n ⌋ = ⌊ 12 + 2 n + 14 ⌋

4 Question 7
P∞
Let S = i=0 i ri
P∞
S = 0(r)0 + i=1 i ri
P∞
S = i=1 i ri
S = r + 2r2 + 3r3 + 4r4 + ...
S = r + 2r2 + 3r3 + 4r4 + ...
2 3 4
S = (r + r + r + r + ... ) + r (r + 2r2 + 3r3 + ... )

Shabbir Kamal: 25100132@lums.edu.pk 3


CS-210 Discrete Mathematics LUMS

P∞ i
∵ (r + r2 + r3 + r4 + ... ) = i=1 r
P∞
∵ r (r + 2r2 + 3r3 + ... ) = r i=0 i ri
P∞ i P∞
S = i=1 r + r i=0 i ri
P∞ i
S = i=1 r
+ rS
P∞ i
S − rS = i=1 r
P∞ i
S (1 − r) = i=1 r
P∞ a
∵ |r |≤ 1 =⇒ i=1 ri = 1−r

∵ i = 1 f or a which is the f irst term


=⇒ a = (1) r1 = r
P∞ i r
Hence, i=1 r = 1−r
r
S (1 − r) = 1−r
r
S = (1 − r) × (1 − r)
r
S = (1 − r)2

Shabbir Kamal: 25100132@lums.edu.pk 4

You might also like