#P9781. [HUSTFC 2023] 近似递增序列
[HUSTFC 2023] 近似递增序列
Problem Description
For an integer sequence of length with , if there exists at most one integer such that , then this sequence is called an approximate increasing sequence. We define the weight of such an approximate increasing sequence as .
Let denote the number of approximate increasing sequences whose weight is . duoluoluo wants to know the value of , but he cannot even compute . Can you help him? Since the answer may be very large, you only need to output it modulo .
Input Format
One line contains an integer , whose meaning is as described in the statement.
Output Format
Output one integer, representing modulo .
2
7
5
26
Hint
In sample 1, the approximate increasing sequences are: , , , , , , .
Translated by ChatGPT 5