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
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.
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.