$$$a_1 = 1$$$

$$$a_2 = 5$$$

$$$a_n = a_{n-1} + n^2(a_{n-2}+1)$$$

**Prove** $$$a_n=(n+1)!-1$$$

P.S. Original problem

# | User | Rating |
---|---|---|

1 | tourist | 3686 |

2 | LHiC | 3330 |

3 | wxhtxdy | 3329 |

4 | Benq | 3315 |

5 | Um_nik | 3301 |

6 | sunset | 3279 |

7 | V--o_o--V | 3275 |

8 | yutaka1999 | 3190 |

9 | Radewoosh | 3179 |

10 | Petr | 3115 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 193 |

2 | Radewoosh | 184 |

3 | rng_58 | 163 |

4 | PikMike | 162 |

5 | Vovuh | 159 |

6 | 300iq | 153 |

7 | Petr | 148 |

8 | Um_nik | 147 |

9 | majk | 146 |

10 | neal | 144 |

10 | kostka | 144 |

$$$a_1 = 1$$$

$$$a_2 = 5$$$

$$$a_n = a_{n-1} + n^2(a_{n-2}+1)$$$

**Prove** $$$a_n=(n+1)!-1$$$

P.S. Original problem

↑

↓

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/19/2019 01:29:17 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Auto comment: topic has been updated by NewFlow (previous revision, new revision, compare).Putting $$$n = 1$$$ we get $$$a_1 = (1 + 1)! - 1 = 1$$$.

Putting $$$n = 2$$$ we get $$$a_2 = (2 + 1)! - 1 = 6 - 1 = 5$$$.

Now let the given statement is true for each $$$k < n$$$, let's prove this for $$$k = n$$$. $$$a_n = a_{n - 1} + n^2(a_{n - 2} + 1)$$$, then $$$a_n = n! - 1 + n^2((n - 1)! - 1 + 1) = n! - 1 + n^2 \cdot (n - 1)! = n! - 1 + n \cdot n! = n! \cdot (n + 1) - 1 = (n + 1)! - 1$$$. So, the statement is true for $$$k = n$$$.

By the principle of mathematical induction this is true for each $$$n > 1$$$.

Auto comment: topic has been updated by NewFlow (previous revision, new revision, compare).