Question 3
OCR A Further Maths June 2017 Decision mathematics 1 (4736-01)Older specification13 marks
On the specification
- (i)
- 7.03 Algorithms
- (ii)
- 7.03 Algorithms
- (iii)
- 7.03 Algorithms8.02 Number Theory
Question text
3 The following algorithm displays three values for each positive integer input. Line 10 Input a positive integer, N Line 20 If N is an odd number jump to line 80 Line 30 Let P = 1 Line 40 Let M = N Line 50 Divide the value of M by 2 and make this the new value of M Line 60 If M is an odd number jump to line 90 Line 70 Increase P by 1 and go back to line 50 Line 80 Let P = 0 and let M = N 2 (P–1) Line 90 Let A = (M + 1) × 2 p Line 100 Let B = A – 2 Line 110 Display N, B, A and stop (i) Apply the algorithm to the input N = 5. You only need to write down values when they change. You should record the line numbers but there is no need to record passing through lines 20 and 60. [4] (ii) Apply the algorithm to the input N = 20. [5] x (iii) Explain what happens when N = 2 , for some positive integer x. [4]