Vrijeme: 23:14

From Poland, with love #1

Neka je d(n) funkcija koja broji djelitelje broja n. Definirajmo vrijednost (rezultat) za cijeli broj na sljedeći način: Vrijednost cijelog broja, označena kao S(n), jest najmanji broj primjena funkcije d potreban da se kao rezultat dobije broj 2. Primjer:d(9) = 3, d(d(9)) = 2. Budući da smo funkciju d morali primijeniti dvaput kako bismo dobili 2, S(9)=2. S(2)=0. Nasumično se bira cijeli broj veći od 1 i manji od 27. Izračunajte očekivanu vrijednost njegove vrijednosti (S(n)).

Define the d(n) function as a counter of the number of divisors of n. Define a score of an integer as follows: The score of an integer, written as S(n) is the minimum number of times you need to apply the d function to it, to get the number 2 as a result. Example:d(9) = 3, d(d(9)) = 2. Since we needed to apply the d function twice to get 2 as a result, S(9) = 2. S(2) = 0. A number is picked randomly from integers bigger than 1 and smaller than 27. Calculate the expected value of its score.