Page 1 of 1

Using python : Problem 2 (4 marks) Consider the following series: 𝑎0=1,a0=1, 𝑎1=1,a1=1, 𝑎2=2,a2=

Posted: Fri Apr 29, 2022 6:42 am
by answerhappygod
Using python : Problem 2 (4 marks)
Consider the following series:
π‘Ž0=1,a0=1,
π‘Ž1=1,a1=1,
π‘Ž2=2,a2=2,
π‘Žπ‘›=π‘Žπ‘›βˆ’1+π‘Žπ‘›βˆ’3an=anβˆ’1+anβˆ’3
for example:
π‘Ž3=π‘Ž2+π‘Ž0=2+1=3a3=a2+a0=2+1=3
π‘Ž4=π‘Ž3+π‘Ž1=3+1=4a4=a3+a1=3+1=4
π‘Ž5=π‘Ž4+π‘Ž2=4+2=6a5=a4+a2=4+2=6
Let us list the factors of the first eight numbers in the
series:
We can see that 6 is the first number
in the series to have over 3 divisors.
Write a function a_n that takes one input, namely the
upper bound K. This function must find and return the first
number in the series to have over K divisors.