Arithmetic Progression

Arithmetic Progression (A.P.)

Let us recall some formulae and properties studied earlier. 
A sequence a1, a2, a3,…, an,… is called arithmetic sequence or arithmetic progression if an + 1 = an+ d, n ∈ N, where a1 is called the first term and the constant term d is called the common difference of the A.P. 
Let us consider an A.P. (in its standard form) with first term a and common difference d, i.e., a, a + d, a + 2d, ... 
Then the nth term (general term) of the A.P. is an = a + (n – 1) d. 
We can verify the following simple properties of an A.P. : 
(i) If a constant is added to each term of an A.P., the resulting sequence is also an A.P. 
(ii) If a constant is subtracted from each term of an A.P., the resulting sequence is also an A.P. 
(iii) If each term of an A.P. is multiplied by a constant, then the resulting sequence is also an A.P. 
(iv) If each term of an A.P. is divided by a non-zero constant then the resulting sequence is also an A.P. 

Here, we shall use the following notations for an arithmetic progression: 
a = the first term, l = the last term, d = common difference, 
n = the number of terms. 
Sn= the sum to n terms of A.P. 

Let a, a + d, a + 2d, …, a + (n – 1) d be an A.P. Then 
l = a + (n – 1) d 
Sn = n/2[2a + (n-1)d] 
We can also write, Sn = n/2[a + l] 

Let us consider some examples. 

Example In an A.P. if mth term is n and the nth term is m, where m ≠ n, find the pth term. 

Solution We have am = a + (m – 1) d = n,      ... (1) 
                       And an = a + (n – 1) d = m      ... (2) 
                  Solving (1) and (2), we get 
                    (m – n) d = n – m, or d = – 1,     ... (3) 
                          and a = n + m – 1       ... (4) 
                  Therefore ap= a + (p – 1)d 
                                      = n + m – 1 + ( p – 1) (–1) = n + m – p 
                  Hence, the pth term is n + m – p. 

Example If the sum of n terms of an A.P. is nP + ½ n(n – 1)Q , where P and Q are constants, find the common difference. 

Solution Let a1, a2, … an be the given A.P. Then 
Sn = a1 + a2 + a3 +...+ an-1 + an = nP + ½ n (n – 1) Q 
Therefore S1 = a1 = P, S2 = a1 + a2 = 2P + Q 
So that a2 = S2 – S1 = P + Q 
Hence, the common difference is given by d = a2 – a1 = (P + Q) – P = Q. 

Example The income of a person is Rs. 3,00,000, in the first year and he receives an increase of Rs.10,000 to his income per year for the next 19 years. Find the total amount, he received in 20 years. 

Solution Here, we have an A.P. with a = 3,00,000, d = 10,000, and n = 20. 
Using the sum formula, we get, 
S20 = 20/2 [600000 + 19 x 10000] = 10 (790000) = 79,00,000. 
Hence, the person received Rs. 79,00,000 as the total amount at the end of 20 years.

Arithmetic mean 
Given two numbers a and b. We can insert a number A between them so that a, A, b is an A.P. Such a number A is called the arithmetic mean (A.M.) of the numbers a and b. Note that, in this case, we have 
A – a = b – A, i.e., A = (a + b) / 2 

We may also interpret the A.M. between two numbers a and b as their average (a + b) / 2. For example, the A.M. of two numbers 4 and 16 is 10. We have, thus constructed an A.P. 4, 10, 16 by inserting a number 10 between 4 and 16. The natural question now arises : Can we insert two or more numbers between given two numbers so that the resulting sequence comes out to be an A.P. ? Observe that two numbers 8 and 12 can be inserted between 4 and 16 so that the resulting sequence 4, 8, 12, 16 becomes an A.P. More generally, given any two numbers a and b, we can insert as many numbers as we like between them such that the resulting sequence is an A.P. 

Let A1, A2, A3, …, An be n numbers between a and b such that a, A1, A2, A3, …, An, b is an A.P. 
Here, b is the (n + 2)th term, i.e., b = a + [(n + 2) – 1]d = a + (n + 1) d. This gives d = (b – a)/(n + 1). 
Thus, n numbers between a and b are as follows: 
arithmetic mean example 

Example Insert 6 numbers between 3 and 24 such that the resulting sequence is an A.P. 

Solution Let A1, A2, A3, A4, A5 and A6 be six numbers between 3 and 24 such that 
3, A1, A2, A3, A4, A5, A6, 24 are in A.P. Here, a = 3, b = 24, n = 8. 
Therefore, 24 = 3 + (8 –1) d, so that d = 3. 
Thus A1 = a + d = 3 + 3 = 6;     A2 = a + 2d = 3 + 2 × 3 = 9; 
A3 = a + 3d = 3 + 3 × 3 = 12;     A4 = a + 4d = 3 + 4 × 3 = 15; 
A5 = a + 5d = 3 + 5 × 3 = 18;     A6 = a + 6d = 3 + 6 × 3 = 21. 
Hence, six numbers between 3 and 24 are 6, 9, 12, 15, 18 and 21.

以下是ArithProgression类的代码实现: ```java public class ArithProgression extends Progression { private int d; public ArithProgression() { this(2, 1); // 默认构造函数,第一个值为2,差为1 } public ArithProgression(int first, int diff) { super(first); d = diff; } protected void advance() { current += d; } } ``` 以下是SquareProgression类的代码实现: ```java public class SquareProgression extends Progression { private int prev; public SquareProgression() { this(2, 200); // 默认构造函数,前两个值为2和200 } public SquareProgression(int first, int second) { super(first); prev = second; } protected void advance() { long temp = current; current = prev + current; prev = (int) temp; } } ``` 以下是TesterProgression类的代码实现: ```java public class TesterProgression { public static void main(String[] args) { Progression prog; // 测试ArithProgression System.out.print("Arithmetic progression with default increment: "); prog = new ArithProgression(); prog.printProgression(10); System.out.print("Arithmetic progression with increment 5: "); prog = new ArithProgression(0, 5); prog.printProgression(10); System.out.print("Arithmetic progression with increment -3: "); prog = new ArithProgression(100, -3); prog.printProgression(10); // 测试SquareProgression System.out.print("Square progression with default increment: "); prog = new SquareProgression(); prog.printProgression(10); System.out.print("Square progression with increment 5: "); prog = new SquareProgression(0, 5); prog.printProgression(10); } } ``` 输出结果如下: ``` Arithmetic progression with default increment: 2 3 4 5 6 7 8 9 10 11 Arithmetic progression with increment 5: 0 5 10 15 20 25 30 35 40 45 Arithmetic progression with increment -3: 100 97 94 91 88 85 82 79 76 73 Square progression with default increment: 2 200 40402 1638402 268435458 1152921504323036162 13292279957849158729038070628 4440892098500626161694526672363282 3958241859999999844545075342655225257974237661030382090624 784637716923335095479473677900958558536110197388646042750041348296731841 Square progression with increment 5: 0 5 25 150 1225 13650 191125 3135375 59166625 1270413125 ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值