309
Объяснение:
F(1) = 1
F(2) = 3
F(n) = F(n – 1) * n + F(n – 2) * (n – 1) при n > 2
Немного посчитаем подставляя значения n и предыдущих F(n)
n = 3 F(1) = 1 F(2) = 3
F(3) = F(3 – 1) * 3 + F(3 – 2) * (3 – 1) = F(2) * 3 + F(1) * 2 = 3 * 3 + 1 * 2 = 9 + 2 = 11
n = 4 F(2) = 3 F(3) = 11
F(4) = F(4 – 1) * 4 + F(4 – 2) * (4 – 1) = F(3) * 4 + F(2) * 3 = 11 * 4 + 3 * 3 = 44 + 9 = 53
n = 5 F(3) = 11 F(4) = 53
F(5) = F(5 – 1) * 5 + F(5 – 2) * (5 – 1) = F(4) * 5 + F(3) * 4 = 53 * 5 + 11 * 4 = 265 + 44 = 309
309
Объяснение:
F(1) = 1
F(2) = 3
F(n) = F(n – 1) * n + F(n – 2) * (n – 1) при n > 2
Немного посчитаем подставляя значения n и предыдущих F(n)
n = 3 F(1) = 1 F(2) = 3
F(3) = F(3 – 1) * 3 + F(3 – 2) * (3 – 1) = F(2) * 3 + F(1) * 2 = 3 * 3 + 1 * 2 = 9 + 2 = 11
n = 4 F(2) = 3 F(3) = 11
F(4) = F(4 – 1) * 4 + F(4 – 2) * (4 – 1) = F(3) * 4 + F(2) * 3 = 11 * 4 + 3 * 3 = 44 + 9 = 53
n = 5 F(3) = 11 F(4) = 53
F(5) = F(5 – 1) * 5 + F(5 – 2) * (5 – 1) = F(4) * 5 + F(3) * 4 = 53 * 5 + 11 * 4 = 265 + 44 = 309