0% found this document useful (0 votes)
6 views5 pages

Lesson 02

Guide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Lesson 02

Guide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

LESSON 2

2.1 Summation
sum(f(k),k=m..n)
O sum(r,r=1..n);
1 2 1 1
n C1 K nK (1)
2 2 2
O factor(%);
1
n n C1 (2)
2
O sum(k,k=0..n-1);
1 2 1
n K n (3)
2 2
O factor(%);
1
n n K1 (4)
2
O sum(k+1,k=0..n);
1 2 1 1
n C1 C nC (5)
2 2 2
O sum(1/k!,k=0..infinity);
e (6)
O sum(1/(k-1)!,k=1..infinity);
e (7)
O sum((-1)^(k+1)*(4/(2*k-1)),k=1..infinity);
p (8)
O sum(r^2,r=1..100);
338350 (9)
O add(i^2,i=1..5);
55 (10)
O L:=[seq(i,i=1..5)];
1, 2, 3, 4, 5 (11)
O add(i,i=L);
15 (12)
sigma(n)
O with(numtheory);
GIgcd, bigomega, cfrac, cfracpol, cyclotomic, divisors, factorEQ, factorset, fermat, imagunit, (13)
index, integral_basis, invcfrac, invphi, iscyclotomic, issqrfree, jacobi, kronecker, l,
legendre, mcombine, mersenne, migcdex, minkowski, mipolys, mlog, mobius, mroot, msqrt,
nearestp, nthconver, nthdenom, nthnumer, nthpow, order, pdexpand, f, p, pprimroot,
primroot, quadres, rootsunity, safeprime, s, sq2factor, sum2sqr, t, thue
O divisors(20);
1, 2, 4, 5, 10, 20 (14)
O sigma(20);
42 (15)
O divisors(111);
1, 3, 37, 111 (16)
O sigma(111);
152 (17)
O divisors(2019);
1, 3, 673, 2019 (18)
O sigma(2019);
2696 (19)
EXERCISES
1)
O irem(sum(r!,r=1..100),2);
1 (20)
2)
a.
O sum(i,i=1..n);
1 2 1 1
n C1 K nK (21)
2 2 2
O factor(%);
1
n n C1 (22)
2
b.
O sum(i+(i-1),i=1..n);
2
n C1 K2 n K1 (23)
O factor(%);
2
n (24)
c.
O sum(i*(i+1),i=1..n);
1 1 1 3
K nK C n C1 (25)
3 3 3
O factor(%);
1
n n C2 n C1 (26)
3
d.
O sum(i*(i+2),i=1..n);
1 2 5 5 1 3
n C1 K nK C n C1 (27)
2 6 6 3
O factor(%);
1
n 2 n C7 n C1 (28)
6
e.
O sum(i*(i!),i=1..n);
n C1 ! K1 (29)
f.
O sum(1/(2^i),i=1..n);
n C1
1
K2 C1 (30)
2
O factor(%);
n C1
1
K2 C1 (31)
2
g.
O sum(i^3,i=1..n);
1 4 1 3 1 2
n C1 K n C1 C n C1 (32)
4 2 4
O factor(%);

1 2 2
n n C1 (33)
4

2.2 Theory of congruence


Integer modulo n
O 15 mod 5;
0 (34)
O 61 mod 13;
9 (35)
O modp(61,13);
9 (36)
O mods(61,13);
K4 (37)
O 12 mod 7;
5 (38)
O modp(12,7);
5 (39)
O mods(12,7);
K2 (40)
2.3 Complete Squares
O with(student);
D, Diff, Doubleint, Int, Limit, Lineint, Product, Sum, Tripleint, changevar, completesquare, (41)
distance, equate, integrand, intercept, intparts, leftbox, leftsum, makeproc, middlebox,
middlesum, midpoint, powsubs, rightbox, rightsum, showtangent, simpson, slope, summand,
trapezoid
O completesquare(9*x^2+24*x+16,x);
2
4
9 xC (42)
3
O completesquare(3*x^2+2*x,x);
2
1 1
3 xC K (43)
3 3
O completesquare(1/(sin(t)^2+2*sin(t)+1),sin(t));
(44)
1
2
(44)
sin t C1
O completesquare(x^2-2*x*a+a^2+y^2-2*y*b+b^2=23,x);
2 2 2
x Ka Cy K2 y b Cb = 23 (45)
O completesquare(%,y);
2 2
y Kb C x Ka = 23 (46)
2.4 Number Systems
convert(n,binary)
O convert(23,binary);
10111 (47)
O convert(-5,binary);
K101 (48)
O convert(0.375,binary);
0.01100000000 (49)
O convert(54.6875,binary);
5
1.101101011 10 (50)
O convert(12.34,binary);
1100.010101 (51)
O convert(789564,binary);
11000000110000111100 (52)
convert(n,decimal,binary)
O convert(101,decimal,binary);
5 (53)
O convert(101,decimal,binary);
5 (54)
O convert(11110101100,decimal,binary);
1964 (55)
O convert(11111111,decimal,2);
255 (56)
O convert(0.1101,decimal,2);
0.8125000000 (57)
O convert(1101.0111,decimal,2);
13.43750000 (58)
O convert(10101011101.01111,decimal,2);
1373.468750 (59)
EXERCISES
1)
O convert(57,binary);
111001 (60)
O convert(126,binary);
1111110 (61)
O convert(201,binary);
11001001 (62)
O convert(487956,binary);
1110111001000010100 (63)
O convert(7879564789,binary);
111010101101010001001110111110101 (64)
O convert(987.14562,binary);
9
1.111011011 10 (65)
O convert(-456,binary);
K111001000 (66)
O convert(8795.2356,binary);
13
1.000100101 10 (67)
O convert(-1213.78,binary);
10
K1.001011110 10 (68)
2)
O convert(1100110,decimal,binary);
102 (69)
O convert(1010101,decimal,2);
85 (70)
O convert(111100001,decimal,binary);
481 (71)
O convert(1010101010,decimal,binary);
682 (72)
O convert(101010.1010,decimal,binary);
42.62500000 (73)
O convert(1111.1111,decimal,2);
15.93750000 (74)
O convert(11001100.0011,decimal,2);
204.1875000 (75)

You might also like