Definirajmo niz Squarebonaccijevih brojeva na sljedeći način:

Definirajmo Fibonaccijeve brojeve na sljedeći način:

Imamo posudu sa 7 kuglica označenih brojevima od 1 do 7.
Igra 1: Nasumično izvlačimo jednu kuglicu iz posude. Isplata je jednaka broju djelitelja broja S(n), pri čemu je n broj na kuglici.
Igra 2: Nasumično izvlačimo kuglicu iz posude. Gubimo iznos novca jednak broju djelitelja broja F(n), pri čemu je n broj na kuglici.
Jednom igramo Igru 1, a zatim jednom Igru 2. Kolika je naša očekivana ukupna isplata? Za potrebe ovog zadatka pretpostavimo da broj 0 ima 1 djelitelja.
Define the Squarebonacci number sequence as follows:

Define the Fibonacci numbers as follows:

We have a pot with 7 balls, numbered 1-7.
Game 1: We draw, randomly, a single ball from the pot. The payout is the number of divisors of S(n), where n is the number on the ball.
Game 2: We draw, randomly, a ball from the pot. We lose the amount of money equal to the number of divisors of F(n), where n is the number on the ball.
We play Game 1 once, then Game 2 once. What is our expected total payout? For this problem, let's assume 0 has 1 divisor.
[lang=hr]
Definirajmo niz Squarebonaccijevih brojeva na sljedeći način:
$$S(1) = 0, S(2) = 1$$
$$S(n+2) = S(n)^2 + S(n+1)^2.$$
Definirajmo Fibonaccijeve brojeve na sljedeći način:
$$F(1) = 0, F(2) = 1, F(n+2) = F(n) + F(n+1).$$
Imamo posudu sa 7 kuglica označenih brojevima od 1 do 7.
Igra 1: Nasumično izvlačimo jednu kuglicu iz posude. Isplata je jednaka broju djelitelja broja S(n), pri čemu je n broj na kuglici.
Igra 2: Nasumično izvlačimo kuglicu iz posude. Gubimo iznos novca jednak broju djelitelja broja F(n), pri čemu je n broj na kuglici.
Jednom igramo Igru 1, a zatim jednom Igru 2. Kolika je naša očekivana ukupna isplata? Za potrebe ovog zadatka pretpostavimo da broj 0 ima 1 djelitelja.
[/lang]
[lang=en]
Define the Squarebonacci number sequence as follows:
$$S(1) = 0, S(2) = 1$$
$$S(n+2) = S(n)^2 + S(n+1)^2.$$
Define the Fibonacci numbers as follows:
$$F(1) = 0, F(2) = 1, F(n+2) = F(n) + F(n+1).$$
We have a pot with 7 balls, numbered 1-7.
Game 1: We draw, randomly, a single ball from the pot. The payout is the number of divisors of S(n), where n is the number on the ball.
Game 2: We draw, randomly, a ball from the pot. We lose the amount of money equal to the number of divisors of F(n), where n is the number on the ball.
We play Game 1 once, then Game 2 once. What is our expected total payout? For this problem, let's assume 0 has 1 divisor.
[/lang]